Pointd class
From Solid Graphics Wiki

The Pointd class specifies a (x, y, z) location in 3D space using double precision.
Constructors
Default Pointd class constructor does not initialize the point coordinates to any value. This is on purpose for performance reasons. Other class costructors allow to initialize the point object from other point, or set of three double values, or array of three float or double values .
See Pointd class constructors for details.
Fields
Field name  Type  Description 
x  float  the X coordinate 
y  float  the Y coordinate 
z  float  the Z coordinate 
coordinates  float [ 3 ]  array of three (x, y, z) point coordinates. Note: the x, y, z fields and the coordinate array are actually defined as union, so for example code point.coordinate[ 1 ] = 3.0 also changes the point.y coordinate to 3.0 
Methods
Method name  Description 
Transform  Transforms point coordinates using given matrix 
IsInside  The function determines whether the point coordinates are inside of given object (BoundingBox, Shape or Triangle) 
Snaps  The function returns true if a given point parameter is within bounding box defined by current point location and cSnapDistance library (global) variable. 
AlignToGrid  Aligns the point location onto a grid defined by given grid size and grid origin. 
Scale  Multiplies the point coordinates by given scale parameter. 
Clamp  Clamps point coordinates within given BoundingBox. 
SaveToString  Saves the point coordinates to given string. 
SaveToXML  Saves the point coordinates as XML node to given MemoryBuffer. 
LoadFromString  Loads the point coordinates from given string. 
LoadFromXML  Reads the point coordinates from given XmlReader. 
Operators
==  Returns true if given points are within a BoundingBox defined by the point and cMinDistance (global) library variable. 
!=  Returns true if given points are not within a BoundingBox defined by the point and cMinDistance (global) library variable. 
+=  Adds parameter coordinates to the point. 
=  Subtracts parameter coordinates from the point. 
*=  Multiplies point coordinates by given float constant or transforms point coordinates using given matrix. 
/=  Divides point coordinates by given float constant. 
*  Returns new point object which is multiplication of the point by given float constant. 
  Unary opertor returns new point object with current point coordinate multiplied by 1. 
const double*  returns const double pointer to the point coordinates. 
double*  returns double pointer to the point coordinates. 
Remarks
The Pointd class does not have any virtual functions on purpose, so it is safe (in MS Visual C++) to typecast pointer to the class object to double pointer and access the x, y, z coordinates by the double array indexes 0, 1 and 2.
Example: SKL3D::Pointd point; point.x = 10.0; point.y = 15.0; point.z = 20.0; double* dPtr = ( double* ) & point; dPtr[ 2 ] = 22.0; // this line changes point.z coordinate to 22.0
Also it is safe to use functions such as memcpy to copy values of one point object to other, or values of point array objects to another point array.
See Also