3d point coordinates. More...
#include <dpoint3d.h>
Public Member Functions  
void  Swap (DPoint3dR other) 
Swap contents of instance, other. More...  
double  CrossProductToPointsXY (DPoint3dCR target1, DPoint3dCR target2) const 
Returns the (scalar) cross product of the xy parts of two vectors. More...  
double  DotProductToPoints (DPoint3dCR target1, DPoint3dCR target2) const 
Returns the (scalar) dot product of two vectors. More...  
double  DotProductToPointsXY (DPoint3dCR target1, DPoint3dCR target2) const 
Returns the (scalar) dot product of xy parts of two vectors. More...  
double  DotDifference (DPoint3dCR origin, DVec3dCR vector) const 
Returns the (scalar) dot product of a two vectors. More...  
double  TripleProductToPoints (DPoint3dCR target1, DPoint3dCR target2, DPoint3dCR target3) const 
Computes the triple product of vectors from a base point three target points. More...  
void  Zero () 
Sets all components of a point or vector to zero. More...  
void  One () 
Returns a point or vector with all components 1.0. More...  
void  InitFromArray (const double *pXyz) 
Copies doubles from a 3 component array to the x,y, and z components of a DPoint3d. More...  
void  Init (DPoint2dCR source) 
Copy from a 2d point setting z to zero. More...  
void  Init (double ax, double ay, double az) 
Sets the x,y, and z components of a point. More...  
void  Init (double ax, double ay) 
Sets the x, and y components of a point. More...  
void  XyzOf (DPoint4dCR hPoint) 
Sets the x,y, and z components of a DPoint3d structure from the corresponding parts of a DPoint4d. More...  
void  SetComponent (double a, int index) 
Set one of three components (x,y,z) of the point. More...  
double  GetComponent (int index) const 
Gets a single component of a point. More...  
void  GetComponents (double &xCoord, double &yCoord, double &zCoord) const 
Copies x,y,z components from a point to individual variables. More...  
void  Interpolate (DPoint3dCR point0, double fractionParameter, DPoint3dCR point1) 
Computes a point whose position is given by a fractional argument and two endpoints. More...  
bool  IsPointInSmallerSector (DPoint3dCR origin, DPoint3dCR target1, DPoint3dCR target2) const 
Form vectors from the origin to the test point and the two boundary vectors. More...  
bool  IsPointInCCWector (DPoint3dCR origin, DPoint3dCR target0, DPoint3dCR target1, DVec3dCR upVector) const 
Test if a point is within the counterclockwise sector defined by an origin and two boundary points, with an up vector to determine which direction is counter clockwise. More...  
double  Distance (DPoint3dCR point2) const 
Computes the (cartesian) distance between two points. More...  
double  DistanceSquared (DPoint3dCR point2) const 
Computes the squared distance between two points. More...  
double  DistanceSquaredXY (DPoint3dCR point2) const 
Computes the squared distance between two points, using only the xy parts. More...  
double  DistanceXY (DPoint3dCR point2) const 
Computes the distance between two points, using only x and y components. More...  
bool  DistanceXY (DPoint3dCR otherPoint, DMatrix4dCP matrix, double &distance) const 
Computes the distance between two points, using only x and y components, optionally applying a transform into view space. More...  
double  MaxAbs () const 
Finds the largest absolute value among the components of a point or vector. More...  
double  MinAbs () const 
Finds the smallest absolute value among the components of a point or vector. More...  
int  MaxAbsIndex () const 
return in the index of the MaxAbs () value. More...  
int  MinAbsIndex () const 
return in the index of the MinAbs () value More...  
DRange1d  ComponentRange () const 
bool  IsEqual (DPoint3dCR point2) const 
Test for exact equality between all components of two points or vectors. More...  
bool  IsEqual (DPoint3dCR point2, double tolerance) const 
Test if the x, y, and z components of two points or vectors are equal within tolerance. More...  
void  NpcCoordinatesOf (DPoint3dCR point, DRange3dCR cube) 
Computes the coordinates of point under the translation and scaling that puts 000 at cube>low and 111 at cube>high. More...  
bool  IsDisconnect () const 
void  InitDisconnect () 
Initialize a point with all coordinates as the disconnect value. More...  
void  Init (DVec3dCR vector) 
Initialize a point by copying x,y,z from a vector. More...  
void  Subtract (DPoint3dCR base, DVec3dCR vector) 
Subtract a vector from a point. More...  
void  Add (DVec3dCR vector) 
Adds a vector to a pointer or vector, returns the result in place. More...  
void  SumOf (DPoint3dCR origin, DVec3dCR vector, double scale) 
Adds an origin and a scaled vector. More...  
void  SumOf (DPoint3dCR origin, DVec3dCR point1, double scale1, DVec3dCR point2, double scale2) 
Adds an origin and two scaled vectors. More...  
void  SumOf (DPoint3dCR origin, DVec3dCR point1, double scale1, DVec3dCR point2, double scale2, DVec3dCR point3, double scale3) 
Adds an origin and three scaled vectors. More...  
void  CrossProduct (DPoint3dCR point1, DPoint3dCR point2) 
Returns the cross (vector) cross product of two vectors. More...  
void  CrossProductToPoints (DPoint3dCR origin, DPoint3dCR target1, DPoint3dCR target2) 
Returns the (vector) cross product of two vectors. More...  
double  CrossProductXY (DPoint3dCR point2) const 
Return the (scalar) cross product of the xy parts of two vectors. More...  
double  NormalizedCrossProduct (DPoint3dCR point1, DPoint3dCR point2) 
Compute the normalized cross product of two vectors and return the length of the unnormalized cross product. More...  
double  SizedCrossProduct (DPoint3dCR point1, DPoint3dCR point2, double productLength) 
Computes the cross product of the two parameter vectors and scales it to a given length. More...  
double  GeometricMeanCrossProduct (DPoint3dCR point1, DPoint3dCR point2) 
Computes the cross product of two vectors and scales it to the geometric mean of the lengths of the two vectors. More...  
double  DotProduct (DPoint3dCR point2) const 
Returns the (scalar) dot product of two vectors. More...  
double  DotProductXY (DPoint3dCR point2) const 
Returns the (scalar) dot product of xy parts of two vectors. More...  
double  DotProduct (double ax, double ay, double az) const 
Computes the dot product of one vector given as a point structure and another given as xyz components. More...  
double  NormalizedDifference (DPoint3dCR target, DPoint3dCR origin) 
Computes a unit vector in the direction of the difference of the points or vectors (Second parameter vector is subtracted from the first parameter vector, exactly as in the subtract function.) More...  
double  AngleTo (DPoint3dCR point2) const 
Returns the angle between two vectors. More...  
double  AngleXY () const 
Computes the (signed) angle from xy axis to the vector, using only xy parts. More...  
double  SmallerUnorientedAngleTo (DPoint3dCR point2) const 
Returns the angle between two vectors, choosing the smaller of the two possible angles when both the vectors and their negations are considered. More...  
bool  IsVectorInSmallerSector (DPoint3dCR point0, DPoint3dCR point1) const 
Test a vector is "between" point0 and point1. More...  
bool  IsVectorInCCWSector (DPoint3dCR point0, DPoint3dCR point1, DPoint3dCR upVector) const 
Test if the test vector vector is "between" point0 and point1, with CCW direction resolved by an up vector. More...  
double  AngleToXY (DPoint3dCR point2) const 
Returns the angle from Vector1 to Vector2 using only xy parts. More...  
double  SmallerUnorientedAngleToXY (DPoint3dCR point2) const 
Returns the angle between two vectors, considering both the vectors and their negations and choosing the smaller. More...  
void  RotateXY (DPoint3dCR vector, double theta) 
Rotate vector around the z axis, return as calling instance. More...  
void  RotateXY (double theta) 
Rotate the calling instance around the z axis. More...  
double  SignedAngleTo (DPoint3dCR point2, DPoint3dCR orientationVector) const 
Computes the signed from one vector to another, in the plane of the two vectors. More...  
double  PlanarAngleTo (DPoint3dCR point2, DPoint3dCR planeNormal) const 
Computes the signed angle between the projection of two vectors onto a plane with given normal. More...  
void  WeightedDifferenceOf (DPoint4dCR point1, DPoint4dCR point2) 
Scale each point by the other's weight and subtract, i.e. More...  
void  WeightedDifferenceCrossProduct (DPoint4dCR basePoint, DPoint4dCR target1, DPoint4dCR target2) 
Form the cross product of the weighted differences from point0 to point1 and point2. More...  
double  MagnitudeSquared () const 
Computes the squared magnitude of a vector. More...  
double  MagnitudeXY () const 
Computes the magnitude of the xy part of a vector. More...  
double  MagnitudeSquaredXY () const 
Computes the squared magnitude of the xy part of a vector. More...  
bool  UnitPerpendicularXY (DPoint3dCR vector) 
Compute a unit vector perpendicular to the xy parts of given vector. More...  
double  Magnitude () const 
Computes the magnitude of a vector. More...  
void  Scale (DPoint3dCR vector, double scale) 
Multiplies a vector by a scale factor. More...  
void  Scale (double scale) 
Multiplies a vector (in place) by a scale factor. More...  
void  Negate (DPoint3dCR vector) 
Computes a negated (opposite) vector. More...  
void  Negate () 
Negate a vector in place. More...  
double  Normalize (DPoint3dCR vector) 
Normalizes (scales) a vector to length 1. More...  
double  ScaleToLength (DPoint3dCR vector, double length) 
Scales a vector to specified length. More...  
double  ScaleToLength (double length) 
Scales a vector to a specified length, and returns the prior length. More...  
double  Normalize () 
Replaces a vector by a unit vector in the same direction, and returns the original length. More...  
bool  IsParallelTo (DPoint3dCR point2) const 
Tests if two vectors are parallel. More...  
bool  IsPerpendicularTo (DPoint3dCR point2) const 
Tests if two vectors are perpendicular. More...  
bool  SafeDivide (DPoint3dCR vector, double denominator) 
Try to divide each component of a vector by a scalar. More...  
double  TripleProduct (DPoint3dCR point2, DPoint3dCR point3) const 
Computes the triple product of three vectors. More...  
void  Subtract (DPoint3dCR point2) 
Subtract two points or vectors, and return the result in place of the first. More...  
void  DifferenceOf (DPoint3dCR point1, DPoint3dCR point2) 
Subtract coordinates of two vectors or points. More...  
void  SumOf (DPoint3dCR origin, DPoint3dCR vector, double scale) 
Adds an origin and a scaled vector. More...  
void  SumOf (DPoint3dCR origin, DPoint3dCR point1, double scale1, DPoint3dCR point2, double scale2) 
Adds an origin and two scaled vectors. More...  
void  SumOf (DPoint3dCR origin, DPoint3dCR point1, double scale1, DPoint3dCR point2, double scale2, DPoint3dCR point3, double scale3) 
Adds an origin and three scaled vectors. More...  
void  SumOf (DPoint3dCR point1, double a1, DPoint3dCR point2, double a2) 
Componentwise linear combination. More...  
void  SumOf (DPoint3dCR point1, double a1, DPoint3dCR point2, double a2, DPoint3dCR point3, double a3) 
Componentwise linear combination. More...  
void  Add (DPoint3dCR vector) 
Adds a vector to a pointer or vector, returns the result in place. More...  
void  SumOf (DPoint3dCR point1, DPoint3dCR point2) 
Compute the sum of two points or vectors. More...  
bool  AlmostEqual (DPoint3d const &dataB) const 
test if two points are equal. More...  
bool  AlmostEqualXY (DPoint3d const &dataB) const 
test if two points are equal. More...  
bool  AlmostEqual (DPoint3d const &dataB, double abstol) const 
test if two points are equal. More...  
bool  AlmostEqualXY (DPoint3d const &dataB, double abstol) const 
test if two points are equal. More...  
Static Public Member Functions  
static DPoint3d  From (double x, double y, double z=0.0) 
Return a DPoint3d with given xyz. More...  
static DPoint3d  From (DPoint2dCR xy) 
Return a DPoint3d with given xy, z = 0;. More...  
static DPoint3d  FromZero () 
Return a DPoint3d with xyz = 0. More...  
static DPoint3d  FromOne () 
Return a DPoint3d with xyz = 1. More...  
static DPoint3d  FromArray (const double *pXyz) 
Simple initialization from 3 coordinates in array. More...  
static void  AddToArray (DPoint3dP points, int n, DPoint3dCR delta) 
Add translation to all points. More...  
static void  MultiplyArrayByScales (DPoint3dP pDest, DPoint3dCP pSource, double *pScales, int n) 
Multiply each point in an array by its corresponding scale factor. More...  
static void  DivideArrayByScales (DPoint3dP pDest, DPoint3dCP pSource, double *pScales, int n) 
Divide each point in an array by its corresponding scale factor. More...  
static DPoint3d  FromProduct (TransformCR transform, double x, double y, double z) 
return product of transform times point given as components. More...  
static DPoint3d  FromProduct (TransformCR transform, DPoint3dCR point) 
return product of transform times point More...  
static DPoint3d  FromInterpolate (DPoint3dCR pointA, double fraction, DPoint3dCR pointB) 
interpolate between points. More...  
static DPoint3d  FromInterpolateBilinear (DPoint3dCR point00, DPoint3dCR point10, DPoint3dCR point01, DPoint3dCR point11, double u, double v) 
Returns a bilinear interpolation from corners (00)(10)(01)(11) More...  
static DPoint3d  FromSumOf (DPoint3dCR origin, DPoint3dCR vector) 
Add a point and a vector. More...  
static DPoint3d  FromSumOf (DPoint3dCR origin, DPoint3dCR vector, double scaleFactor) 
Add scaled vector from origin. More...  
static DPoint3d  FromSumOf (DPoint3dCR origin, DPoint3dCR point0, double scaleFactor0, DPoint3dCR point1, double scaleFactor1) 
Add scaled vectors from an origin. More...  
static DPoint3d  FromSumOf (DPoint3dCR origin, DPoint3dCR point0, double scaleFactor0, DPoint3dCR point1, double scaleFactor1, DPoint3dCR point2, double scaleFactor2) 
Add scaled vectors from origin. More...  
static DPoint3d  FromScale (DPoint3d point, double scale) 
Returns a scalar multiple of a DPoint3d. More...  
static DPoint3d  FromSumOf (DPoint3dCR point0, double scale0, DPoint3dCR point1, double scale1) 
Returns a linear combination of points. More...  
static DPoint3d  FromSumOf (DPoint3dCR point0, double scale0, DPoint3dCR point1, double scale1, DPoint3dCR point2, double scale2) 
Returns a linear combination of points. More...  
static DPoint3d  FromProduct (DPoint3dCR point, RotMatrixCR matrix, double x, double y, double z) 
Return {point + matrix * (x,y,z)}. More...  
static DPoint3d  FromProduct (DPoint3dCR point, RotMatrixCR matrix, DVec3dCR vector) 
Return {point + matrix * vector}. More...  
static bool  AlmostEqual (bvector< DPoint3d > const &left, bvector< DPoint3d > const &right, double tolerance=0.0) 
apply AlmostEqual test to corresponding points More...  
static bool  AlmostEqualXY (bvector< DPoint3d > const &left, bvector< DPoint3d > const &right, double tolerance=0.0) 
apply AlmostEqualXY test to corresponding points More...  
Public Attributes  
double  x 
x coordinate More...  
double  y 
y coordinate More...  
double  z 
z coordinate More...  
3d point coordinates.
void Add  (  DVec3dCR  vector  ) 
Adds a vector to a pointer or vector, returns the result in place.
[in]  vector  The vector to add. 
void Add  (  DPoint3dCR  vector  ) 
Adds a vector to a pointer or vector, returns the result in place.
[in]  vector  The vector to add. 

static 
Add translation to all points.
bool AlmostEqual  (  DPoint3d const &  dataB  )  const 
test if two points are equal.
Uses library "small angle" as both absolute and relative tolerance. points are equal if squared distance between is less than (squared abstol) plus (squared relTol) * sum of cmponent squares
[in]  dataB  second DPoint3d 
bool AlmostEqual  (  DPoint3d const &  dataB, 
double  abstol  
)  const 
test if two points are equal.
Uses library "small angle" as both absolute and relative tolerance. points are equal if squared distance between is less than (squared abstol) plus (squared relTol) * sum of cmponent squares
[in]  dataB  second DPoint3d 
[in]  abstol  absolute tolerance. If 0, use defaults. 

static 
apply AlmostEqual test to corresponding points
[in]  left  first array. 
[in]  right  first vector. 
[in]  tolerance  optional tolerance. If 0, use defaults from AlmostEqual 
bool AlmostEqualXY  (  DPoint3d const &  dataB  )  const 
test if two points are equal.
Uses library "small angle" as both absolute and relative tolerance. points are equal if squared distance between is less than (squared abstol) plus (squared relTol) * sum of cmponent squares
[in]  dataB  second DPoint3d 
bool AlmostEqualXY  (  DPoint3d const &  dataB, 
double  abstol  
)  const 
test if two points are equal.
Uses library "small angle" as both absolute and relative tolerance. points are equal if squared distance between is less than (squared abstol) plus (squared relTol) * sum of cmponent squares
[in]  dataB  second DPoint3d 
[in]  abstol  absolute tolerance. If 0, use defaults. 

static 
apply AlmostEqualXY test to corresponding points
[in]  left  first array. 
[in]  right  first vector. 
[in]  tolerance  optional tolerance. If 0, use defaults from AlmostEqualXY 
double AngleTo  (  DPoint3dCR  point2  )  const 
Returns the angle between two vectors.
This angle is between 0 and pi. Rotating the first vector by this angle around the cross product between the vectors aligns it with the second vector.
[in]  point2  The second vector 
double AngleToXY  (  DPoint3dCR  point2  )  const 
Returns the angle from Vector1 to Vector2 using only xy parts.
This angle is between pi and +pi.
[in]  point2  The second vector 
double AngleXY  (  )  const 
Computes the (signed) angle from xy axis to the vector, using only xy parts.
DRange1d ComponentRange  (  )  const 
void CrossProduct  (  DPoint3dCR  point1, 
DPoint3dCR  point2  
) 
Returns the cross (vector) cross product of two vectors.
[in]  point1  The first vector 
[in]  point2  The second vector 
void CrossProductToPoints  (  DPoint3dCR  origin, 
DPoint3dCR  target1,  
DPoint3dCR  target2  
) 
Returns the (vector) cross product of two vectors.
The vectors are computed from the Origin to target1 and target2.
[in]  origin  The base point for computing vectors. 
[in]  target1  The target point for the first vector. 
[in]  target2  The target point for the second vector. 
double CrossProductToPointsXY  (  DPoint3dCR  target1, 
DPoint3dCR  target2  
)  const 
Returns the (scalar) cross product of the xy parts of two vectors.
The vectors are computed from the Origin to target1 and target2.
[in]  target1  The target point for the first vector. 
[in]  target2  The target point for the second vector. 
double CrossProductXY  (  DPoint3dCR  point2  )  const 
Return the (scalar) cross product of the xy parts of two vectors.
[in]  point2  The second vector 
void DifferenceOf  (  DPoint3dCR  point1, 
DPoint3dCR  point2  
) 
Subtract coordinates of two vectors or points.
(Compute Point1  Point2)
[in]  point1  The first point 
[in]  point2  The second (subtracted) point. 
double Distance  (  DPoint3dCR  point2  )  const 
Computes the (cartesian) distance between two points.
[in]  point2  The second point 
double DistanceSquared  (  DPoint3dCR  point2  )  const 
Computes the squared distance between two points.
[in]  point2  The second point. 
double DistanceSquaredXY  (  DPoint3dCR  point2  )  const 
Computes the squared distance between two points, using only the xy parts.
[in]  point2  The second point 
double DistanceXY  (  DPoint3dCR  point2  )  const 
Computes the distance between two points, using only x and y components.
[in]  point2  The second point 
bool DistanceXY  (  DPoint3dCR  otherPoint, 
DMatrix4dCP  matrix,  
double &  distance  
)  const 
Computes the distance between two points, using only x and y components, optionally applying a transform into view space.
[in]  otherPoint  The second point 
[in]  matrix  optional transform 
[out]  distance  computed distance. 

static 
Divide each point in an array by its corresponding scale factor.
Leave any point with near zero weight unchanged.
[out]  pDest  destination array. 
[in]  pSource  source array. 
[in]  pScales  scale factors 
[in]  n  number of points. 
double DotDifference  (  DPoint3dCR  origin, 
DVec3dCR  vector  
)  const 
Returns the (scalar) dot product of a two vectors.
One vector is computed internally as the difference of the TargetPoint and Origin. (TargetPointOrigin) The other is given directly as a single argument.
[in]  origin  The start (orign) point of the first vector of the cross product. 
[in]  vector  The second 
double DotProduct  (  DPoint3dCR  point2  )  const 
Returns the (scalar) dot product of two vectors.
[in]  point2  The second vector 
double DotProduct  (  double  ax, 
double  ay,  
double  az  
)  const 
Computes the dot product of one vector given as a point structure and another given as xyz components.
[in]  ax  The x component of second vector. 
[in]  ay  The y component of second vector. 
[in]  az  The z component of second vector. 
double DotProductToPoints  (  DPoint3dCR  target1, 
DPoint3dCR  target2  
)  const 
Returns the (scalar) dot product of two vectors.
The vectors are computed from the Origin to target1 and target2.
[in]  target1  The target point for the first vector. 
[in]  target2  The target point for the second vector. 
double DotProductToPointsXY  (  DPoint3dCR  target1, 
DPoint3dCR  target2  
)  const 
Returns the (scalar) dot product of xy parts of two vectors.
The vectors are computed from the BasePoint to target1 and target2.
[in]  target1  The target point for the first vector. 
[in]  target2  The target point for the second vector. 
double DotProductXY  (  DPoint3dCR  point2  )  const 
Returns the (scalar) dot product of xy parts of two vectors.
[in]  point2  The second vector 

static 
Return a DPoint3d with given xyz.

static 
Return a DPoint3d with given xy, z = 0;.

static 
Simple initialization from 3 coordinates in array.
[in]  pXyz  x, y, z components 

static 
interpolate between points.
[in]  pointA  start point 
[in]  fraction  fractional parameter 
[in]  pointB  end point 

static 
Returns a bilinear interpolation from corners (00)(10)(01)(11)
[in]  point00  point at (0,0) 
[in]  point10  point at (1,0) 
[in]  point01  point at (0,1) 
[in]  point11  point at (1,1) 
[in]  u  interpolation fraction for edges (point00,point10) and (point01,point11) 
[in]  v  interpolation fraction for edges (point00,point10) and (point10,point11) 

static 
return product of transform times point given as components.
[in]  transform  affine transform. 
[in]  x  x component 
[in]  y  y component 
[in]  z  z component 

static 
return product of transform times point
[in]  transform  affine transform. 
[in]  point  point to transform. 

static 
Return {point + matrix * (x,y,z)}.
[in]  point  base point 
[in]  matrix  
[in]  x  x component 
[in]  y  y component 
[in]  z  z component 

static 
Return {point + matrix * vector}.
[in]  point  base point 
[in]  matrix  
[in]  vector  vector part 
Returns a scalar multiple of a DPoint3d.
[in]  point  input point 
[in]  scale  scale factor 

static 
Add a point and a vector.
[in]  origin  start point 
[in]  vector  vector add 

static 
Add scaled vector from origin.
[in]  origin  start point 
[in]  vector  vector to scale. 
[in]  scaleFactor  multiplier. 

static 
Add scaled vectors from an origin.
[in]  origin  start point 
[in]  point0  vector to scale. 
[in]  scaleFactor0  multiplier. 
[in]  point1  vector to scale. 
[in]  scaleFactor1  multiplier. 

static 
Add scaled vectors from origin.
[in]  origin  start point 
[in]  point0  vector to scale. 
[in]  scaleFactor0  multiplier. 
[in]  point1  vector to scale. 
[in]  scaleFactor1  multiplier. 
[in]  point2  vector to scale. 
[in]  scaleFactor2  multiplier. 

static 
Returns a linear combination of points.
[in]  point0  first point 
[in]  scale0  first scale 
[in]  point1  second point 
[in]  scale1  second scale 

static 
Returns a linear combination of points.
[in]  point0  first point 
[in]  scale0  first scale 
[in]  point1  second point 
[in]  scale1  second scale 
[in]  point2  third point 
[in]  scale2  third scale 
double GeometricMeanCrossProduct  (  DPoint3dCR  point1, 
DPoint3dCR  point2  
) 
Computes the cross product of two vectors and scales it to the geometric mean of the lengths of the two vectors.
This is useful because it has the direction of the cross product (i.e. normal to the plane of the two vectors) and a size in between the two vectors.
[in]  point1  The first vector 
[in]  point2  The second vector 
double GetComponent  (  int  index  )  const 
Gets a single component of a point.
If the index is out of range 0,1,2, it is interpreted cyclically.
[in]  index  Indicates which component is accessed. The values are 0=x, 1=y, 2=z. Other values are treated cyclically. 
void GetComponents  (  double &  xCoord, 
double &  yCoord,  
double &  zCoord  
)  const 
Copies x,y,z components from a point to individual variables.
[out]  xCoord  x component 
[out]  yCoord  y component 
[out]  zCoord  z component 
void Init  (  DPoint2dCR  source  ) 
Copy from a 2d point setting z to zero.
[in]  source  source point 
void Init  (  double  ax, 
double  ay,  
double  az  
) 
Sets the x,y, and z components of a point.
[in]  ax  The x component. 
[in]  ay  The y component. 
[in]  az  The z component. 
void Init  (  double  ax, 
double  ay  
) 
Sets the x, and y components of a point.
Sets z to zero.
[in]  ax  The x component. 
[in]  ax  The x component. 
[in]  ay  The y component 
void Init  (  DVec3dCR  vector  ) 
Initialize a point by copying x,y,z from a vector.
[in]  vector  The vecotr 
void InitDisconnect  (  ) 
Initialize a point with all coordinates as the disconnect value.
void InitFromArray  (  const double *  pXyz  ) 
Copies doubles from a 3 component array to the x,y, and z components of a DPoint3d.
[in]  pXyz  x, y, z components 
void Interpolate  (  DPoint3dCR  point0, 
double  fractionParameter,  
DPoint3dCR  point1  
) 
Computes a point whose position is given by a fractional argument and two endpoints.
[in]  point0  The point corresponding to fractionParameter of 0. 
[in]  fractionParameter  The fractional parametric coordinate. 0.0 is the start of the segment, 1.0 is the end, 0.5 is midpoint. 
[in]  point1  The point corresponding to fractionParameter of 1. 
bool IsDisconnect  (  )  const 
bool IsEqual  (  DPoint3dCR  point2  )  const 
Test for exact equality between all components of two points or vectors.
[in]  point2  The second point or vector 
bool IsEqual  (  DPoint3dCR  point2, 
double  tolerance  
)  const 
Test if the x, y, and z components of two points or vectors are equal within tolerance.
Tests are done independently using the absolute value of each component differences (i.e. not the magnitude or sum of squared differences)
[in]  point2  The second point or vector. 
[in]  tolerance  The tolerance. 
bool IsParallelTo  (  DPoint3dCR  point2  )  const 
Tests if two vectors are parallel.
[in]  point2  The second vector 
bool IsPerpendicularTo  (  DPoint3dCR  point2  )  const 
Tests if two vectors are perpendicular.
[in]  point2  The second vector 
bool IsPointInCCWector  (  DPoint3dCR  origin, 
DPoint3dCR  target0,  
DPoint3dCR  target1,  
DVec3dCR  upVector  
)  const 
Test if a point is within the counterclockwise sector defined by an origin and two boundary points, with an up vector to determine which direction is counter clockwise.
[in]  origin  The point to test. 
[in]  target0  The first target point. 
[in]  target1  The second target point. 
[in]  upVector  vector towards eye to resolve direction. 
bool IsPointInSmallerSector  (  DPoint3dCR  origin, 
DPoint3dCR  target1,  
DPoint3dCR  target2  
)  const 
Form vectors from the origin to the test point and the two boundary vectors.
Test if the test vector is within the smaller angle between the other two vectors.
[in]  origin  The point to test. 
[in]  target1  The first target point. 
[in]  target2  The second target point. 
bool IsVectorInCCWSector  (  DPoint3dCR  point0, 
DPoint3dCR  point1,  
DPoint3dCR  upVector  
)  const 
Test if the test vector vector is "between" point0 and point1, with CCW direction resolved by an up vector.
The cross product of point0 and point1 is considered the positive plane normal if its dot product with the up vector is positive.
[in]  point0  The boundary vector. 
[in]  point1  The boundary vector. 
[in]  upVector  The out of plane vector. 
bool IsVectorInSmallerSector  (  DPoint3dCR  point0, 
DPoint3dCR  point1  
)  const 
Test a vector is "between" point0 and point1.
If the vectors are coplanar and point0 is neither parallel nor antiparallel to point1, betweenness has the expected meaning: there are two angles between point0 and point1; one is less than 180; the test vector is tested to see if it is in the smaller angle. If the vectors are not coplanar, the test is based on the projection of the test vector into the plane of the other two vectors.
Zero testing is untoleranced, and is biased to all parallel conditions "false". That is, if any pair of the input vectors is parallel or antiparallel, the mathematical answer is false. Floating point tolerances will cause "nearby" cases to be unpredictable. It is assumed that if the caller considers the "parallel" cases important they will be checked explicitly.
[in]  point0  The first boundary vector. 
[in]  point1  The second boundary vector. 
double Magnitude  (  )  const 
Computes the magnitude of a vector.
double MagnitudeSquared  (  )  const 
Computes the squared magnitude of a vector.
double MagnitudeSquaredXY  (  )  const 
Computes the squared magnitude of the xy part of a vector.
double MagnitudeXY  (  )  const 
Computes the magnitude of the xy part of a vector.
double MaxAbs  (  )  const 
Finds the largest absolute value among the components of a point or vector.
int MaxAbsIndex  (  )  const 
return in the index of the MaxAbs () value.
double MinAbs  (  )  const 
Finds the smallest absolute value among the components of a point or vector.
int MinAbsIndex  (  )  const 
return in the index of the MinAbs () value

static 
Multiply each point in an array by its corresponding scale factor.
[out]  pDest  destination array. 
[in]  pSource  source array. 
[in]  pScales  scale factors 
[in]  n  number of points. 
void Negate  (  DPoint3dCR  vector  ) 
Computes a negated (opposite) vector.
[in]  vector  The vector to be negated. 
void Negate  (  ) 
Negate a vector in place.
double Normalize  (  DPoint3dCR  vector  ) 
Normalizes (scales) a vector to length 1.
If the input vector length is 0, the output vector is a zero vector and the returned length is 0.
[in]  vector  The vector to be normalized. 
double Normalize  (  ) 
Replaces a vector by a unit vector in the same direction, and returns the original length.
If the input vector length is 0, the output vector is a zero vector and the returned length is 0.
double NormalizedCrossProduct  (  DPoint3dCR  point1, 
DPoint3dCR  point2  
) 
Compute the normalized cross product of two vectors and return the length of the unnormalized cross product.
[in]  point1  The first vector 
[in]  point2  The second vector 
double NormalizedDifference  (  DPoint3dCR  target, 
DPoint3dCR  origin  
) 
Computes a unit vector in the direction of the difference of the points or vectors (Second parameter vector is subtracted from the first parameter vector, exactly as in the subtract function.)
[in]  target  The target point. 
[in]  origin  The origin point. 
void NpcCoordinatesOf  (  DPoint3dCR  point, 
DRange3dCR  cube  
) 
Computes the coordinates of point under the translation and scaling that puts 000 at cube>low and 111 at cube>high.
[in]  point  Point whose NPC coordinates are to be computed 
[in]  cube  Cube whose corners map to 000 and 111 
void One  (  ) 
Returns a point or vector with all components 1.0.
double PlanarAngleTo  (  DPoint3dCR  point2, 
DPoint3dCR  planeNormal  
)  const 
Computes the signed angle between the projection of two vectors onto a plane with given normal.
[in]  point2  The second vector 
[in]  planeNormal  The plane normal vector 
void RotateXY  (  DPoint3dCR  vector, 
double  theta  
) 
Rotate vector around the z axis, return as calling instance.
[in]  vector  vector to rotate. 
[in]  theta  The rotation angle. 
void RotateXY  (  double  theta  ) 
Rotate the calling instance around the z axis.
[in]  theta  The rotation angle. 
bool SafeDivide  (  DPoint3dCR  vector, 
double  denominator  
) 
Try to divide each component of a vector by a scalar.
If the denominator near zero compared to any numerator component, return the original vector.
[in]  vector  The initial vector. 
[in]  denominator  The divisor. 
void Scale  (  DPoint3dCR  vector, 
double  scale  
) 
Multiplies a vector by a scale factor.
[in]  vector  The vector to be scaled. 
[in]  scale  The scale factor. 
void Scale  (  double  scale  ) 
Multiplies a vector (in place) by a scale factor.
[in]  scale  The scale 
double ScaleToLength  (  DPoint3dCR  vector, 
double  length  
) 
Scales a vector to specified length.
If the input vector length is 0, the output vector is a zero vector and the returned length is 0.
[in]  vector  The original vector. 
[in]  length  The requested length. 
double ScaleToLength  (  double  length  ) 
Scales a vector to a specified length, and returns the prior length.
If the input vector length is 0, the output vector is a zero vector and the returned length is 0.
[in]  length  The requested length 
void SetComponent  (  double  a, 
int  index  
) 
Set one of three components (x,y,z) of the point.
[in]  a  The component value. 
[in]  index  Selects the the axis: 0=x, 1=y, 2=z, others cyclic. 
double SignedAngleTo  (  DPoint3dCR  point2, 
DPoint3dCR  orientationVector  
)  const 
Computes the signed from one vector to another, in the plane of the two vectors.
Initial computation using only the two vectors yields two possible angles depending on which side of the plane of the vectors is viewed. To choose which side to view, go on the side whose normal has a positive dot product with the orientation vector. This angle can be between pi and +pi.
[in]  point2  The second vector 
[in]  orientationVector  The vector used to determine orientation. 
double SizedCrossProduct  (  DPoint3dCR  point1, 
DPoint3dCR  point2,  
double  productLength  
) 
Computes the cross product of the two parameter vectors and scales it to a given length.
The scaled vector is stored as the product vector, and the length of the original cross product vector is returned.
[in]  point1  The first vector 
[in]  point2  The second vector 
[in]  productLength  The Desired length 
double SmallerUnorientedAngleTo  (  DPoint3dCR  point2  )  const 
Returns the angle between two vectors, choosing the smaller of the two possible angles when both the vectors and their negations are considered.
This angle is between 0 and pi/2.
[in]  point2  The second vector 
double SmallerUnorientedAngleToXY  (  DPoint3dCR  point2  )  const 
Returns the angle between two vectors, considering both the vectors and their negations and choosing the smaller.
This angle is between 0 and pi/2.
[in]  point2  The second vector 
void Subtract  (  DPoint3dCR  base, 
DVec3dCR  vector  
) 
Subtract a vector from a point.
[in]  base  The the first point or vector 
[in]  vector  The second point or vector 
void Subtract  (  DPoint3dCR  point2  ) 
Subtract two points or vectors, and return the result in place of the first.
[in]  point2  The vector to subtract. 
void SumOf  (  DPoint3dCR  origin, 
DVec3dCR  vector,  
double  scale  
) 
Adds an origin and a scaled vector.
[in]  origin  Origin for the sum. 
[in]  vector  The vector to be added. 
[in]  scale  The scale factor. 
void SumOf  (  DPoint3dCR  origin, 
DVec3dCR  point1,  
double  scale1,  
DVec3dCR  point2,  
double  scale2  
) 
Adds an origin and two scaled vectors.
[in]  origin  The origin. 
[in]  point1  The first direction vector 
[in]  scale1  The first scale factor 
[in]  point2  The second direction vector 
[in]  scale2  The second scale factor 
void SumOf  (  DPoint3dCR  origin, 
DVec3dCR  point1,  
double  scale1,  
DVec3dCR  point2,  
double  scale2,  
DVec3dCR  point3,  
double  scale3  
) 
Adds an origin and three scaled vectors.
[in]  origin  The origin. 
[in]  point1  The first direction vector 
[in]  scale1  The first scale factor 
[in]  point2  The second direction vector 
[in]  scale2  The second scale factor 
[in]  point3  The third direction vector 
[in]  scale3  The third scale factor 
void SumOf  (  DPoint3dCR  origin, 
DPoint3dCR  vector,  
double  scale  
) 
Adds an origin and a scaled vector.
[in]  origin  Origin for the sum. 
[in]  vector  The vector to be added. 
[in]  scale  The scale factor. 
void SumOf  (  DPoint3dCR  origin, 
DPoint3dCR  point1,  
double  scale1,  
DPoint3dCR  point2,  
double  scale2  
) 
Adds an origin and two scaled vectors.
[in]  origin  The origin. 
[in]  point1  The first direction vector 
[in]  scale1  The first scale factor 
[in]  point2  The second direction vector 
[in]  scale2  The second scale factor 
void SumOf  (  DPoint3dCR  origin, 
DPoint3dCR  point1,  
double  scale1,  
DPoint3dCR  point2,  
double  scale2,  
DPoint3dCR  point3,  
double  scale3  
) 
Adds an origin and three scaled vectors.
[in]  origin  The origin. 
[in]  point1  The first direction vector 
[in]  scale1  The first scale factor 
[in]  point2  The second direction vector 
[in]  scale2  The second scale factor 
[in]  point3  The third direction vector 
[in]  scale3  The third scale factor 
void SumOf  (  DPoint3dCR  point1, 
double  a1,  
DPoint3dCR  point2,  
double  a2  
) 
Componentwise linear combination.
[in]  point1  first point 
[in]  a1  scale for first point. 
[in]  point2  second point 
[in]  a2  scale for second point. 
void SumOf  (  DPoint3dCR  point1, 
double  a1,  
DPoint3dCR  point2,  
double  a2,  
DPoint3dCR  point3,  
double  a3  
) 
Componentwise linear combination.
[in]  point1  first point 
[in]  a1  scale for first point. 
[in]  point2  second point 
[in]  a2  scale for second point. 
[in]  point3  third point 
[in]  a3  scale for third point. 
void SumOf  (  DPoint3dCR  point1, 
DPoint3dCR  point2  
) 
Compute the sum of two points or vectors.
[in]  point1  The the first point or vector 
[in]  point2  The second point or vector 
void Swap  (  DPoint3dR  other  ) 
Swap contents of instance, other.
[in,out]  other  second point. 
double TripleProduct  (  DPoint3dCR  point2, 
DPoint3dCR  point3  
)  const 
Computes the triple product of three vectors.
The following are equivalent definitions of the triple product of three vectors V1, V2, and V3:
[in]  point2  The second vector. 
[in]  point3  The third vector. 
double TripleProductToPoints  (  DPoint3dCR  target1, 
DPoint3dCR  target2,  
DPoint3dCR  target3  
)  const 
Computes the triple product of vectors from a base point three target points.
[in]  target1  The target point for the first vector. 
[in]  target2  The target point for the second vector. 
[in]  target3  The target point for the third vector. 
bool UnitPerpendicularXY  (  DPoint3dCR  vector  ) 
Compute a unit vector perpendicular to the xy parts of given vector.
[in]  vector  The source vector 
void WeightedDifferenceCrossProduct  (  DPoint4dCR  basePoint, 
DPoint4dCR  target1,  
DPoint4dCR  target2  
) 
Form the cross product of the weighted differences from point0 to point1 and point2.
[in]  basePoint  The common base point (second point for differences) 
[in]  target1  The first target point. 
[in]  target2  The second target point. 
void WeightedDifferenceOf  (  DPoint4dCR  point1, 
DPoint4dCR  point2  
) 
Scale each point by the other's weight and subtract, i.e.
form (point1 * point2.w  point2 * point1.w). The weight term vanishes. Copy the xyz parts back as a vector.
[in]  point1  The first point 
[in]  point2  The second pont. 
void XyzOf  (  DPoint4dCR  hPoint  ) 
void Zero  (  ) 
Sets all components of a point or vector to zero.
double x 
x coordinate
double y 
y coordinate
double z 
z coordinate