@@ -237,15 +237,39 @@ matrix *vm_angle_2_matrix(matrix *m, float a, int angle_index);
237237//computes a matrix from a forward vector and an angle
238238matrix * vm_vec_ang_2_matrix (matrix * m , const vec3d * v , float a );
239239
240- //computes a matrix from one or more vectors. The forward vector is required,
241- //with the other two being optional. If both up & right vectors are passed,
242- //the up vector is used. If only the forward vector is passed, a bank of
243- //zero is assumed
244- //returns ptr to matrix
240+ /**
241+ * @brief Generates a matrix from one or more vectors
242+ *
243+ * @param[out] matrix The generated matrix. Does not need to be an Identity matrix
244+ * @param[in] fvec Vector referencing the forward direction
245+ * @param[in] uvec Vector referencing the up direction (Optional)
246+ * @param[in] rvec Vector referencing the right-hand direction (Optional)
247+ *
248+ * @returns Pointer to the generated matrix
249+ *
250+ * @note If all three vectors are given, rvec is ignored.
251+ * @note If uvec was bogus (either being in the same direction of fvec or -fvec) then only fvec is used
252+ *
253+ * @sa vm_vector_2_matrix_norm
254+ */
245255matrix * vm_vector_2_matrix (matrix * m , const vec3d * fvec , const vec3d * uvec , const vec3d * rvec );
246256
247- //this version of vector_2_matrix requires that the vectors be more-or-less
248- //normalized and close to perpendicular
257+
258+ /**
259+ * @brief Generates a matrix from one or more normalized vectors
260+ *
261+ * @param[out] matrix The generated matrix. Does not need to be an Identity matrix
262+ * @param[in] fvec Normalized Vector referencing the forward direction
263+ * @param[in] uvec Normalized Vector referencing the up direction (Optional)
264+ * @param[in] rvec Normalized Vector referencing the right-hand direction (Optional)
265+ *
266+ * @returns Pointer to the generated matrix
267+ *
268+ * @note If all three vectors are given, rvec is ignored.
269+ * @note If uvec was bogus (either being in the same direction of fvec or -fvec) then only fvec is used
270+ *
271+ * @sa vm_vector_2_matrix
272+ */
249273matrix * vm_vector_2_matrix_norm (matrix * m , const vec3d * fvec , const vec3d * uvec = NULL , const vec3d * rvec = NULL );
250274
251275//rotates a vector through a matrix. returns ptr to dest vector
0 commit comments