|
liba 0.1.15
An algorithm library based on C/C++
|
three-dimensional point More...
Go to the source code of this file.
Data Structures | |
| struct | a_point3 |
| instance structure for three-dimensional point More... | |
Macros | |
| #define | A_POINT3_C(x, y, z) |
| #define | a_point3_c(x) |
| #define | a_point3_(_, x) |
Typedefs | |
| typedef struct a_point3 | a_point3 |
| typedef struct a_point3 | a::point3 |
Functions | |
| void | a_vector3_set (a_vector3 *ctx, a_point3 const *p, a_point3 const *q) |
| set a 3D vector as the difference from point p to point q. | |
| void | a_point3_val (a_point3 const *ctx, a_real *x, a_real *y, a_real *z) |
| get the cartesian coordinates of a 3D point. | |
| void | a_point3_set_val (a_point3 *ctx, a_real x, a_real y, a_real z) |
| set the cartesian coordinates of a 3D point. | |
| void | a_point3_cyl (a_point3 const *ctx, a_real *rho, a_real *theta, a_real *z) |
| get the cylindrical coordinates of a 3D point. | |
| void | a_point3_set_cyl (a_point3 *ctx, a_real rho, a_real theta, a_real z) |
| set the cylindrical coordinates of a 3D point. | |
| void | a_point3_sph (a_point3 const *ctx, a_real *rho, a_real *theta, a_real *alpha) |
| get the spherical coordinates of a 3D point. | |
| void | a_point3_set_sph (a_point3 *ctx, a_real rho, a_real theta, a_real alpha) |
| set the spherical coordinates of a 3D point. | |
| void | a_point3_add (a_point3 const *lhs, a_vector3 const *rhs, a_point3 *res) |
| add a 3D vector to a 3D point. | |
| void | a_point3_sub (a_point3 const *lhs, a_vector3 const *rhs, a_point3 *res) |
| subtract a 3D vector from a 3D point. | |
| void | a_point3_mul (a_point3 const *lhs, a_real rhs, a_point3 *res) |
| multiplie a 3D point by a scalar. | |
| void | a_point3_div (a_point3 const *lhs, a_real rhs, a_point3 *res) |
| divide a 3D point by a scalar. | |
| void | a_point3_pos (a_point3 const *ctx, a_vector3 *res) |
| convert it into a vector from the origin to the point. | |
| void | a_point3_neg (a_point3 const *ctx, a_vector3 *res) |
| convert it into a vector from the point to the origin. | |
| a_real | a_point3_dist (a_point3 const *lhs, a_point3 const *rhs) |
| compute the distance between two 3D points. | |
| a_real | a_point3_dist2 (a_point3 const *lhs, a_point3 const *rhs) |
| compute the squared distance between two 3D points. | |
| a_real | a_point3_mindist (a_point3 const *ctx, a_point3 const *i_p, a_size i_n, a_point3 *o_p, a_size *o_i) |
| compute the minimum distance from a reference point to a point set. | |
| a_real | a_point3_maxdist (a_point3 const *ctx, a_point3 const *i_p, a_size i_n, a_point3 *o_p, a_size *o_i) |
| compute the maximum distance from a reference point to a point set. | |
| int | a_point3_cmpxy (a_point3 const *lhs, a_point3 const *rhs) |
| compare two 3D points primarily by X, then by Y, and finally by Z. | |
| int | a_point3_cmpyx (a_point3 const *lhs, a_point3 const *rhs) |
| compare two 3D points primarily by Y, then by X, and finally by Z. | |
three-dimensional point