|
liba 0.1.15
An algorithm library based on C/C++
|
instance structure for three-dimensional point More...
#include <point3.h>
Public Member Functions | |
| void | val (a_real &x_, a_real &y_, a_real &z_) const |
| get the cartesian coordinates of a 3D point. | |
| void | set_val (a_real x_, a_real y_, a_real z_) |
| set the cartesian coordinates of a 3D point. | |
| void | cyl (a_real &rho, a_real &theta, a_real &z_) const |
| get the cylindrical coordinates of a 3D point. | |
| void | set_cyl (a_real rho, a_real theta, a_real z_) |
| set the cylindrical coordinates of a 3D point. | |
| void | sph (a_real &rho, a_real &theta, a_real &alpha) const |
| get the spherical coordinates of a 3D point. | |
| void | set_sph (a_real rho, a_real theta, a_real alpha) |
| set the spherical coordinates of a 3D point. | |
| void | add (a_vector3 const &rhs, a_point3 &res) const |
| add a 3D vector to a 3D point. | |
| void | sub (a_vector3 const &rhs, a_point3 &res) const |
| subtract a 3D vector from a 3D point. | |
| void | mul (a_real rhs, a_point3 &res) const |
| multiplie a 3D point by a scalar. | |
| void | div (a_real rhs, a_point3 &res) const |
| divide a 3D point by a scalar. | |
| void | pos (a_vector3 &res) const |
| convert it into a vector from the origin to the point. | |
| void | neg (a_vector3 &res) const |
| convert it into a vector from the point to the origin. | |
| a_real | dist (a_point3 const &rhs) const |
| compute the distance between two 3D points. | |
| a_real | dist2 (a_point3 const &rhs) const |
| compute the squared distance between two 3D points. | |
| a_real | mindist (a_point3 const *i_p, a_size i_n, a_point3 *o_p=NULL, a_size *o_i=NULL) const |
| compute the minimum distance from a reference point to a point set. | |
| a_real | maxdist (a_point3 const *i_p, a_size i_n, a_point3 *o_p=NULL, a_size *o_i=NULL) const |
| compute the maximum distance from a reference point to a point set. | |
Data Fields | |
| a_real | x |
| a_real | y |
| a_real | z |
Friends | |
| void | operator+= (a_point3 &lhs, a_vector3 const &rhs) |
| add a 3D vector to a 3D point. | |
| a_point3 | operator+ (a_point3 const &lhs, a_vector3 const &rhs) |
| add a 3D vector to a 3D point. | |
| void | operator-= (a_point3 &lhs, a_vector3 const &rhs) |
| subtract a 3D vector from a 3D point. | |
| a_point3 | operator- (a_point3 const &lhs, a_vector3 const &rhs) |
| subtract a 3D vector from a 3D point. | |
| a_vector3 | operator- (a_point3 const &lhs, a_point3 const &rhs) |
| set a 3D vector as the difference from point p to point q. | |
| void | operator*= (a_point3 &lhs, a_real rhs) |
| multiplie a 3D point by a scalar. | |
| a_point3 | operator* (a_real lhs, a_point3 const &rhs) |
| multiplie a 3D point by a scalar. | |
| a_point3 | operator* (a_point3 const &lhs, a_real rhs) |
| multiplie a 3D point by a scalar. | |
| void | operator/= (a_point3 &lhs, a_real rhs) |
| divide a 3D point by a scalar. | |
| a_point3 | operator/ (a_point3 const &lhs, a_real rhs) |
| divide a 3D point by a scalar. | |
| a_vector3 | operator+ (a_point3 const &rhs) |
| convert it into a vector from the origin to the point. | |
| a_vector3 | operator- (a_point3 const &rhs) |
| convert it into a vector from the point to the origin. | |
instance structure for three-dimensional point
add a 3D vector to a 3D point.
get the cylindrical coordinates of a 3D point.
compute the distance between two 3D points.
compute the squared distance between two 3D points.
divide a 3D point by a scalar.
|
inline |
compute the maximum distance from a reference point to a point set.
|
inline |
compute the minimum distance from a reference point to a point set.
multiplie a 3D point by a scalar.
|
inline |
convert it into a vector from the point to the origin.
|
inline |
convert it into a vector from the origin to the point.
set the cylindrical coordinates of a 3D point.
set the spherical coordinates of a 3D point.
set the cartesian coordinates of a 3D point.
get the spherical coordinates of a 3D point.
subtract a 3D vector from a 3D point.
get the cartesian coordinates of a 3D point.
multiplie a 3D point by a scalar.
multiplie a 3D point by a scalar.
multiplie a 3D point by a scalar.
add a 3D vector to a 3D point.
convert it into a vector from the origin to the point.
add a 3D vector to a 3D point.
set a 3D vector as the difference from point p to point q.
subtract a 3D vector from a 3D point.
convert it into a vector from the point to the origin.
subtract a 3D vector from a 3D point.
divide a 3D point by a scalar.
divide a 3D point by a scalar.