| void lib3ds_vector_add | ( | Lib3dsVector | c, | |
| Lib3dsVector | a, | |||
| Lib3dsVector | b | |||
| ) |
Add two vectors.
| c | Result. | |
| a | First addend. | |
| b | Second addend. |
Definition at line 99 of file vector.c.
Referenced by lib3ds_mesh_calculate_normals().
| void lib3ds_vector_copy | ( | Lib3dsVector | dest, | |
| Lib3dsVector | src | |||
| ) |
Copy a vector.
| dest | Destination vector. | |
| src | Source vector. |
Definition at line 63 of file vector.c.
Referenced by lib3ds_lin3_key_setup(), lib3ds_lin3_track_eval(), lib3ds_mesh_calculate_normals(), lib3ds_mesh_dump(), and lib3ds_mesh_read().
| void lib3ds_vector_cross | ( | Lib3dsVector | c, | |
| Lib3dsVector | a, | |||
| Lib3dsVector | b | |||
| ) |
Compute cross product.
| c | Result. | |
| a | First vector. | |
| b | Second vector. |
Definition at line 155 of file vector.c.
Referenced by lib3ds_matrix_camera(), and lib3ds_vector_normal().
| void lib3ds_vector_cubic | ( | Lib3dsVector | c, | |
| Lib3dsVector | a, | |||
| Lib3dsVector | p, | |||
| Lib3dsVector | q, | |||
| Lib3dsVector | b, | |||
| Lib3dsFloat | t | |||
| ) |
Compute a point on a cubic spline.
Computes a point on a parametric Bezier spline.
| c | Result. | |
| a | First endpoint of the spline. | |
| p | First tangent vector of the spline. | |
| q | Second tangent vector of the spline. | |
| b | Second endpoint of the spline. | |
| t | Spline parameter [0. 1.] |
Definition at line 315 of file vector.c.
Referenced by lib3ds_lin3_track_eval().
| Lib3dsFloat lib3ds_vector_dot | ( | Lib3dsVector | a, | |
| Lib3dsVector | b | |||
| ) |
Compute dot product.
| a | First vector. | |
| b | Second vector. |
Definition at line 174 of file vector.c.
Referenced by lib3ds_mesh_calculate_normals().
| Lib3dsFloat lib3ds_vector_length | ( | Lib3dsVector | c | ) |
| void lib3ds_vector_max | ( | Lib3dsVector | c, | |
| Lib3dsVector | a | |||
| ) |
c[i] = max(c[i], a[i]);
Computes maximum values of x,y,z independently.
Definition at line 357 of file vector.c.
Referenced by lib3ds_file_bounding_box_of_objects(), and lib3ds_mesh_bounding_box().
| void lib3ds_vector_min | ( | Lib3dsVector | c, | |
| Lib3dsVector | a | |||
| ) |
c[i] = min(c[i], a[i]);
Computes minimum values of x,y,z independently.
Definition at line 338 of file vector.c.
Referenced by lib3ds_file_bounding_box_of_objects(), and lib3ds_mesh_bounding_box().
| void lib3ds_vector_neg | ( | Lib3dsVector | c | ) |
| void lib3ds_vector_normal | ( | Lib3dsVector | n, | |
| Lib3dsVector | a, | |||
| Lib3dsVector | b, | |||
| Lib3dsVector | c | |||
| ) |
Compute a vector normal to two line segments.
Computes the normal vector to the lines b-a and b-c.
| n | Returned normal vector. | |
| a | Endpoint of first line. | |
| b | Base point of both lines. | |
| c | Endpoint of second line. |
Definition at line 268 of file vector.c.
References lib3ds_vector_cross(), lib3ds_vector_normalize(), and lib3ds_vector_sub().
Referenced by lib3ds_mesh_read().
| void lib3ds_vector_normalize | ( | Lib3dsVector | c | ) |
Normalize a vector.
Scales a vector so that its length is 1.0.
| c | Vector to normalize. |
Definition at line 226 of file vector.c.
Referenced by lib3ds_matrix_camera(), lib3ds_mesh_calculate_normals(), and lib3ds_vector_normal().
| void lib3ds_vector_scalar | ( | Lib3dsVector | c, | |
| Lib3dsFloat | k | |||
| ) |
| Lib3dsFloat lib3ds_vector_squared | ( | Lib3dsVector | c | ) |
| void lib3ds_vector_sub | ( | Lib3dsVector | c, | |
| Lib3dsVector | a, | |||
| Lib3dsVector | b | |||
| ) |
Subtract two vectors.
| c | Result. | |
| a | Addend. | |
| b | Minuend. |
Definition at line 118 of file vector.c.
Referenced by lib3ds_lin3_key_setup(), lib3ds_matrix_camera(), and lib3ds_vector_normal().
| void lib3ds_vector_transform | ( | Lib3dsVector | c, | |
| Lib3dsMatrix | m, | |||
| Lib3dsVector | a | |||
| ) |
Multiply a point by a transformation matrix.
Applies the given transformation matrix to the given point. With some transformation matrices, a vector may also be transformed.
| c | Result. | |
| m | Transformation matrix. | |
| a | Input point. |
Definition at line 292 of file vector.c.
Referenced by lib3ds_mesh_read().
| void lib3ds_vector_zero | ( | Lib3dsVector | c | ) |
Clear a vector to zero.
| c | Vector to clear. |
Definition at line 45 of file vector.c.
Referenced by lib3ds_lin3_key_setup(), lib3ds_lin3_track_eval(), lib3ds_lin3_track_setup(), and lib3ds_mesh_calculate_normals().
|
|
||
|