This class is designed to be base class of more specific types of 3D points. Specifically, 3D points in different coordinate systems. The template argument P is the type of the derived point class. This allows the Point3 to return new points of the same type as the derived class. The template argument V is the type of the corresponding 3D vector class for the coordinate system of the derived 3D point class.
More...
|
Descriptive interface |
| typedef double | value_type |
| static int | dim () |
Public Member Functions |
|
| | Point3 () |
| | Point3 (double s) |
| | Point3 (double x, double y, double z) |
|
| void | set (double x, double y, double z) |
| const double * | data () const |
| double | operator[] (int index) const |
| double & | operator[] (int index) |
|
| P | operator * (double s) const |
| P | operator/ (double s) const |
| P | operator+ (const P &p) const |
| | Adds a point to a point.
|
| P | operator+ (const V &v) const |
| V | operator- (const P &p) const |
| P | operator- (const V &v) const |
| P | operator- () const |
| void | operator+= (const P &p) |
| | Adds a point to a point.
|
| void | operator+= (const V &v) |
| void | operator-= (const V &v) |
| void | operator *= (double s) |
| void | operator/= (double s) |
|
| double | dist_sqrd (const P &p) const |
| | Computes the distance squared between two points.
|
| double | dist (const P &p) const |
| | Computes the distance between two points.
|
|
| bool | operator== (const P &p) const |
| | Are the two points exactly equal (component wise)?
|
| bool | operator!= (const P &p) const |
| | Are the two points not equal (component wise)?
|
|
| bool | is_equal (const P &p, double epsSqrd=epsAbsSqrdMath()) const |
| | Is the distance squared between the two points essentially zero?
|
Protected Attributes |
| double | _x |
| double | _y |
| double | _z |
Related Functions |
(Note that these are not member functions.)
|
| ostream & | operator<< (ostream &os, const Point3< P, V > &p) |
| | Stream insertion operator for Point3's.
|
| istream & | operator>> (istream &is, Point3< P, V > &p) |
| | Stream extraction operator for Point3's.
|
| double | det (const Point3< P, V > &a, const Point3< P, V > &b, const Point3< P, V > &c) |
| | Computes the determinant of the 3x3 matrix containing the 3 Point3's as rows.
|
| bool | areCoplanar (const P &, const P &, const P &, const P &) |
| | Determines if four Point3's are co-planar.
|
This class is designed to be base class of more specific types of 3D points. Specifically, 3D points in different coordinate systems. The template argument P is the type of the derived point class. This allows the Point3 to return new points of the same type as the derived class. The template argument V is the type of the corresponding 3D vector class for the coordinate system of the derived 3D point class.