Three dimensional point class. More...
#include <point3.h>
Public Member Functions | |
Point3 () | |
Default constructor. Creates [0.0, 0.0, 0.0] point. | |
Point3 (const Scalar &x, const Scalar &y, const Scalar &z) | |
Constructor for three input values. | |
Point3 (const Scalar *p) | |
Constructor for pointer input. | |
Point3 (const Vector3 &v) | |
Constructor for Vector3 input. | |
bool | operator== (const Point3 &p) const |
bool | operator!= (const Point3 &p) const |
![]() | |
Vector3 () | |
Default constructor. Creates a null vector [0.0, 0.0, 0.0]. | |
Vector3 (const Scalar &x, const Scalar &y, const Scalar &z) | |
Constructor for three input values. | |
Vector3 (const Scalar *v) | |
Constructor for pointer input. | |
Scalar & | operator[] (size_t n) |
Unchecked element access. | |
const Scalar & | operator[] (size_t n) const |
Unchecked element access. | |
Vector3 & | operator+= (const Vector3 &v) |
Vector3 & | operator-= (const Vector3 &v) |
Vector3 & | operator*= (const Scalar &s) |
Scalar-vector product. | |
Vector3 & | operator*= (const Vector3 &v) |
Memberwise product. | |
Vector3 & | operator/= (const Scalar &s) |
Scalar-vector division. | |
Vector3 & | operator/= (const Vector3 &v) |
Memberwise division. | |
bool | operator== (const Vector3 &v) const |
bool | operator!= (const Vector3 &v) const |
Scalar | sum () const |
Vector element sum. | |
Scalar | dot (const Vector3 &v) const |
Dot product. | |
Vector3 | cross (const Vector3 &v) const |
Cross product. | |
Scalar | length2 () const |
Squared vector length. | |
Scalar | length () const |
Vector length. | |
Vector3 & | normalize () |
Normalize vector to unit length. | |
Scalar | distance2 (const Vector3 &v) const |
Squared distance between vectors. | |
Scalar | distance (const Vector3 &v) const |
Distance between vectors. | |
Scalar | angleCos (const Vector3 &v) const |
Cosine of the angle between vectors. | |
Scalar | angleSin (const Vector3 &v) const |
Sine of the angle between vectors. | |
Scalar | angle (const Vector3 &v) const |
Angle between vectors in the range [0, pi] expressed in radians. | |
size_t | minAxis () const |
Index of element with minimum value. | |
size_t | maxAxis () const |
Index of element with maximum value. | |
size_t | furthestAxis () const |
Index of furthest axis. | |
size_t | closestAxis () const |
Index of closest axis. | |
Scalar | min () const |
Minimum value. | |
Scalar | max () const |
Maximum value. | |
Scalar & | at (size_t n) |
Checked element access. | |
const Scalar & | at (size_t n) const |
Checked element access. | |
void | setValue (const Scalar &x, const Scalar &y, const Scalar &z) |
Sets vector values from three input values. | |
void | setValue (const Scalar *v) |
Sets vector values from pointer input. |
Three dimensional point class.
This class differs from the Vector3 class in that the comparison criterion used for equality and difference is based only on the distance between the points instead of both distance and angle for Vector3's.
|
inline |
Equality operator. The comparison criterion is that the distance between the two points must be equal to zero.