Public Member Functions | Static Public Member Functions | Public Attributes | List of all members

4d point coordinates. More...

#include <dpoint4d.h>

Public Member Functions

void Zero ()
 zero out this point. More...
 
void SetComponents (double xComponent, double yComponent, double zComponent, double wComponent)
 
void Init (DPoint3dCR source, double w)
 Fill a DPoint4d, using given xyz components and weight. More...
 
void Init (double x, double y, double z, double w)
 Fill a DPoint4d, using given xyz components and weight. More...
 
void InitFromArray (double *pArray)
 Copy 4 components (xyzw) from a double array into this instance. More...
 
void GetComponents (double &xCoord, double &yCoord, double &zCoord, double &wCoord) const
 Copies component data out of this instance into doubles pXCoord, pYCoord, pZCoord and pWCoord. More...
 
void SetComponent (double a, int index)
 Set x,y,z or w component of a point. More...
 
double GetComponent (int index) const
 
double MagnitudeXYZW () const
 magnitude as pure 4d point – sqrt sum of squares. More...
 
double DotProduct (DPoint4dCR point) const
 Return the full 4d (xyzw) dot product of two homogeneous points. More...
 
double DotProductXY (DPoint4dCR point) const
 Return the dot product of only the xy parts of two homogeneous points. More...
 
double DotProductXYZ (DPoint4dCR point2) const
 Return the xyz dot product of two homogeneous points, i.e. More...
 
double DotProductXYW (DPoint4dCR point) const
 Return the xyz dot product of two homogeneous points, i.e. More...
 
double DotProduct (double x, double y, double z, double w) const
 
double DotProduct (DPoint3dCR point2, double w) const
 
double EyePlaneTest (DPoint3dCR origin, DPoint3dCR normal) const
 Return the dot product of a plane normal and a vector 'to the eyepoint'. More...
 
double RealDistance (DPoint4dCR vec2) const
 
bool RealDistanceSquaredXY (double *pDistanceSquared, DPoint3dCR vec2) const
 
bool RealDistanceXY (double &distance, DPoint4dCR pointB) const
 
bool RealDistanceSquared (double *pDistanceSquared, DPoint3dCR vec2) const
 
bool RealDistanceSquared (double *pDistanceSquared, DPoint4dCR vec2) const
 
void Interpolate (DPoint4dCR point0, double s, DPoint4dCR point1)
 Interpolates between two homogeneous vectors. More...
 
void InitFrom (DPoint3dCR point, double w)
 Initializ a homogeneous point from a 3D point and separate weight. More...
 
void GetXYZ (DPoint3dR point) const
 Copy the xyz components out of a homogeneous point. More...
 
void GetXYW (DPoint3dR point) const
 Copy the xyw components out of a homogeneous point. More...
 
void GetXYZ (DPoint3dR point, int xIndex, int yIndex, int zIndex) const
 Set components of a 3d point from 3 indices into a homogeneous point. More...
 
bool PlaneFromOriginAndNormal (DPoint3dCR origin, DPoint3dCR normal)
 Computes the homogeneous vector for a plane defined by 3D origin and normal. More...
 
bool PlaneFrom3Points (DPoint3dCR origin, DPoint3dCR point1, DPoint3dCR point2)
 Computes the homogeneous coordinate vector for a plane defined by 3 3D points. More...
 
bool PlaneFromOriginAndVectors (DPoint4dCR origin, DPoint3dCR vector0, DPoint3dCR vector1)
 Computes the homogeneous coordinate vector for a plane defined by a DPoint4d origin and a pair of 3D vectors. More...
 
bool OriginAndNormalFromPlane (DPoint3dR origin, DPoint3dR normal) const
 
void SumOf (DPoint4dCR pt1, DPoint4dCR pt2)
 Adds two homogeneous points. More...
 
void WeightedDifferenceOf (DPoint4dCR A, DPoint4dCR B)
 Scale each point by the other's weight and return the difference. More...
 
void WeightedDifferenceOf (DPoint4dCR A, DPoint3dCR B, double wB)
 Scale each point by the other's weight and return the difference. More...
 
void WeightedDifferenceOf (DPoint3dCR A, double wA, DPoint4dCR B)
 Scale each point by the other's weight and return the difference. More...
 
void Add (DPoint4dCR vector)
 Add a vector to the instance. More...
 
void Subtract (DPoint4dCR vector)
 Subtract a vector from the instance. More...
 
void DifferenceOf (DPoint4dCR point1, DPoint4dCR point2)
 Subtract second point from first. More...
 
void SumOf (DPoint4dCR point0, DPoint4dCR point1, double scale1, DPoint4dCR point2, double scale2)
 Adds two homogeneous points to a base point. More...
 
void SumOf (DPoint4dCR point1, double scale1, DPoint4dCR point2, double scale2)
 Adds two homogeneous points with scales. More...
 
void SumOf (DPoint4dCR point0, DPoint4dCR point1, double scale1, DPoint4dCR point2, double scale2, DPoint4dCR point3, double scale3)
 Adds three homogeneous points to a base point. More...
 
void SumOf (DPoint4dCR point1, double scale1, DPoint4dCR point2, double scale2, DPoint4dCR point3, double scale3)
 Adds three homogeneous points. More...
 
void SumOf (DPoint4dCR point0, DPoint4dCR point1, double scale1)
 Adds two homogeneous points to a base point. More...
 
bool GetProjectedXYZ (DPoint3dR rPoint) const
 Normalizes a homogeneous point (by dividing by w part.) More...
 
bool InitWithNormalizedWeight (DPoint4dCR source)
 Initializes the instance by normalizing the weight of the source. More...
 
bool NormalizeWeightInPlace ()
 Divide through by weight component. More...
 
bool NormalizePlaneOf (DPoint4dCR plane0)
 Normalizes a homogeneous plane (by dividing through by the vector magnitude). More...
 
void Scale (DPoint4dCR point, double scale)
 sets pOutVec to pInVec*scale. More...
 
void Scale (double scale)
 Scale a point in place. More...
 
void Negate (DPoint4dCR point)
 Negate a point. More...
 
void Negate ()
 Negate all components of a point in place. More...
 
bool IsEqual (DPoint4dCR vec2) const
 Exact equality test between points. More...
 
bool IsEqual (DPoint4dCR vec2, double tolerance) const
 
bool IsEqual (DPoint4dCR vec2, double xyzTol, double wTol) const
 
double MaxAbs () const
 
double MaxAbsUnnormalizedXYZ () const
 
double MaxUnnormalizedXYZDiff (DPoint4dCR other) const
 
double GetRotationAngleAndVectorFromQuaternion (DPoint3dR axis) const
 Returns the angle of rotation represented by this instance quaternion and sets axis to be the normalized vector about which this instance rotates. More...
 
bool IsDisconnect () const
 
void InitDisconnect ()
 Initialize a point with all coordinates as the disconnect value. More...
 

Static Public Member Functions

static DPoint4d From (double x, double y, double z, double w)
 Return point with direct initialization. More...
 
static DPoint4d From (DPoint3dCR xyz, double w)
 Return point with direct initialization. More...
 
static DPoint4d FromSumOf (DPoint4dCR xyzw0, double scale0, DPoint4dCR xyzw1, double scale1, DPoint4dCR xyzw2, double scale2)
 Return point with sum of scaled inputs. More...
 
static DPoint4d FromMultiply (DMatrix4dCP matrix, DPoint3dCR point)
 Return product of 3d point with (possibly omitted) DMatrix4d. More...
 
static DPoint4d FromMultiply (DMatrix4dCP matrix, DPoint4dCR point)
 Return product of 4d point with (possibly omitted!!) DMatrix4d. More...
 
static DPoint4d FromInterpolate (DPoint4dCR point0, double s, DPoint4dCR point1)
 Interpolates between two homogeneous vectors. More...
 
static bool AlmostEqual (bvector< DPoint4d > const &dataA, bvector< DPoint4d > const &dataB, double xyzTol, double wTol)
 test for nearly equal points in two arrays More...
 
static bool AlmostEqualReversed (bvector< DPoint4d > const &dataA, bvector< DPoint4d > const &dataB, double xyzTol, double wTol)
 test for nearly equal points in two arrays, reversing the second More...
 
static bool AlmostEqual (DPoint4dCP dataA, DPoint4dCP dataB, size_t n, double xyzTol, double wTol)
 test for nearly equal points in two arrays More...
 
static bool AlmostEqualReversed (DPoint4dCP dataA, DPoint4dCP dataB, size_t n, double xyzTol, double wTol)
 test for nearly equal points in two arrays, reversing the second More...
 
static DPoint4d FromCrossProduct (DPoint4dCR pointA, DPoint4dCR pointB, DPoint4dCR pointC)
 Return a point "perpendicular" to all 3 inputs. More...
 
static ValidatedDPlane3dByVectors TryNormalizePointAndDerivatives (DPoint4dCR homogeneousPoint, DPoint4dCR homogeneousDerivative1, DPoint4dCR homogeneousDerivative2)
 Return point and vectors that are the cartesian image of a homoegneous point and derivatives ul> li>The return is marked invalid if weight is zero. More...
 

Public Attributes

double x
 x coordinate More...
 
double y
 y coordinate More...
 
double z
 z coordinate More...
 
double w
 w coordinate. 1 is a simple point. 0 is a vector. For other values, dividing through by w gives the simple point. More...
 

Detailed Description

4d point coordinates.

Member Function Documentation

void Add ( DPoint4dCR  vector)

Add a vector to the instance.

Parameters
[in]vectorvector to add
static bool AlmostEqual ( bvector< DPoint4d > const &  dataA,
bvector< DPoint4d > const &  dataB,
double  xyzTol,
double  wTol 
)
static

test for nearly equal points in two arrays

Parameters
[in]dataAfirst array
[in]dataBsecond array
[in]xyzToltolerance for xyz parts
[in]wToltolerance for weights
static bool AlmostEqual ( DPoint4dCP  dataA,
DPoint4dCP  dataB,
size_t  n,
double  xyzTol,
double  wTol 
)
static

test for nearly equal points in two arrays

Parameters
[in]dataAfirst array
[in]dataBsecond array
[in]nnumber of points
[in]xyzToltolerance for xyz parts
[in]wToltolerance for weights
static bool AlmostEqualReversed ( bvector< DPoint4d > const &  dataA,
bvector< DPoint4d > const &  dataB,
double  xyzTol,
double  wTol 
)
static

test for nearly equal points in two arrays, reversing the second

Parameters
[in]dataAfirst array
[in]dataBsecond array
[in]xyzToltolerance for xyz parts
[in]wToltolerance for weights
static bool AlmostEqualReversed ( DPoint4dCP  dataA,
DPoint4dCP  dataB,
size_t  n,
double  xyzTol,
double  wTol 
)
static

test for nearly equal points in two arrays, reversing the second

Parameters
[in]dataAfirst array
[in]dataBsecond array
[in]nnumber of points
[in]xyzToltolerance for xyz parts
[in]wToltolerance for weights
void DifferenceOf ( DPoint4dCR  point1,
DPoint4dCR  point2 
)

Subtract second point from first.

Parameters
[in]point1first point
[in]point2second point
double DotProduct ( DPoint4dCR  point) const

Return the full 4d (xyzw) dot product of two homogeneous points.

Parameters
[in]pointsecond point of dot product.
Returns
dot product of two homogeneous points.
double DotProduct ( double  x,
double  y,
double  z,
double  w 
) const
Parameters
[in]xx component of second point
[in]yy component of second point
[in]zz component of second point
[in]ww component of second point
Returns
dot product of two homogeneous points.
double DotProduct ( DPoint3dCR  point2,
double  w 
) const
Parameters
[in]point2second point
[in]ww component of second point
Returns
dot product of two homogeneous points.
double DotProductXY ( DPoint4dCR  point) const

Return the dot product of only the xy parts of two homogeneous points.

Ignore z, ignore w.

Parameters
[in]pointsecond point
Returns
dot product of two homogeneous points.
double DotProductXYW ( DPoint4dCR  point) const

Return the xyz dot product of two homogeneous points, i.e.

ignore z.

Parameters
[in]pointsecond second
Returns
dot product of two homogeneous points.
double DotProductXYZ ( DPoint4dCR  point2) const

Return the xyz dot product of two homogeneous points, i.e.

ignore w.

Parameters
[in]point2second point of dot product.
Returns
dot product of two homogeneous points.
double EyePlaneTest ( DPoint3dCR  origin,
DPoint3dCR  normal 
) const

Return the dot product of a plane normal and a vector 'to the eyepoint'.

The plane is given as cartesian origin and normal; the eye is given as homogeneous point, i.e. weight zero for flat view, nonzero for perspective. Eyepoints constucted 'by hand' usually look like this: Flat view "from infinity" looking in direction (xyz): eyepoint = (x,y,z,0) i.e. a top view has eyepoint (0,0,1,0) Perspective from eyepoint at (x,y,z): eyepoint (x,y,z,1) When viewing is constructed by a sequence of homogeneous transformations, with the final (device) projection to the xy plane, the (pretransform) eyepoint is 'by definition' Tinverse * (0,0,1,0)' i.e column 2 (zero based) of the composite viewing transform. (Note that the weight part can be nonzero.)

Parameters
[in]originany cartesian point on plane
[in]normalcartesian plane normal
Returns
dot product of plane normal with vector towards eye.
static DPoint4d From ( double  x,
double  y,
double  z,
double  w 
)
static

Return point with direct initialization.

Parameters
[in]xx coordinate
[in]yy coordinate
[in]zz coordinate
[in]ww coordinate
static DPoint4d From ( DPoint3dCR  xyz,
double  w 
)
static

Return point with direct initialization.

Parameters
[in]xyzx,y,z coordinates
[in]wcoordinate
static DPoint4d FromCrossProduct ( DPoint4dCR  pointA,
DPoint4dCR  pointB,
DPoint4dCR  pointC 
)
static

Return a point "perpendicular" to all 3 inputs.

static DPoint4d FromInterpolate ( DPoint4dCR  point0,
double  s,
DPoint4dCR  point1 
)
static

Interpolates between two homogeneous vectors.

|

Parameters
[in]point0s=0 point
[in]sinterpolation parameter
[in]point1s=1 point
Returns
interpolated point
static DPoint4d FromMultiply ( DMatrix4dCP  matrix,
DPoint3dCR  point 
)
static

Return product of 3d point with (possibly omitted) DMatrix4d.

Parameters
[in]matrixif missing, identity matrix is implied.
[in]point3d point.
static DPoint4d FromMultiply ( DMatrix4dCP  matrix,
DPoint4dCR  point 
)
static

Return product of 4d point with (possibly omitted!!) DMatrix4d.

Parameters
[in]matrixif missing, identity matrix is implied.
[in]point3d point.
static DPoint4d FromSumOf ( DPoint4dCR  xyzw0,
double  scale0,
DPoint4dCR  xyzw1,
double  scale1,
DPoint4dCR  xyzw2,
double  scale2 
)
static

Return point with sum of scaled inputs.

double GetComponent ( int  index) const
Parameters
[in]index0=x, 1=y, 2=z, 3=w, others cyclic
Returns
specified component of the point or vector
void GetComponents ( double &  xCoord,
double &  yCoord,
double &  zCoord,
double &  wCoord 
) const

Copies component data out of this instance into doubles pXCoord, pYCoord, pZCoord and pWCoord.

Parameters
[out]xCoordx component
[out]yCoordy component
[out]zCoordz component
[out]wCoordw component
bool GetProjectedXYZ ( DPoint3dR  rPoint) const

Normalizes a homogeneous point (by dividing by w part.)

Parameters
[out]rPointnormalized point
Returns
true if normalization succeeded
double GetRotationAngleAndVectorFromQuaternion ( DPoint3dR  axis) const

Returns the angle of rotation represented by this instance quaternion and sets axis to be the normalized vector about which this instance rotates.

The instance is assumed to be a normalized quaternion, i.e. of the form (x,y,z,w) where

              x*x + y*y + z*z + w*w = 1.

The angle is returned within the closed interval [0,Pi].

Parameters
[out]axisnormalized axis of rotation
Returns
rotation angle (in radians) between 0 and Pi, inclusive
void GetXYW ( DPoint3dR  point) const

Copy the xyw components out of a homogeneous point.

The z component not referenced. This is a copy, not a normalization.

Parameters
[out]pointxyw parts copied to xyz
void GetXYZ ( DPoint3dR  point) const

Copy the xyz components out of a homogeneous point.

The weight is not referenced, i.e. the xyz components are NOT normalized.

Parameters
[out]pointcartesian point
void GetXYZ ( DPoint3dR  point,
int  xIndex,
int  yIndex,
int  zIndex 
) const

Set components of a 3d point from 3 indices into a homogeneous point.

Indices are interpreted cyclically.

Parameters
[out]pointoutput point
[in]xIndexindex for x component of output
[in]yIndexindex for y component of output
[in]zIndexindex for z component of output
void Init ( DPoint3dCR  source,
double  w 
)

Fill a DPoint4d, using given xyz components and weight.

All components are copied in directly – the xyz components are not multiplied by the weight.

Parameters
[in]sourcexyz components
[in]ww component
void Init ( double  x,
double  y,
double  z,
double  w 
)

Fill a DPoint4d, using given xyz components and weight.

All components are copied in directly – the xyz components are not multiplied by the weight.

Parameters
[in]xx component
[in]yy component
[in]zz component
[in]xx component
[in]wz coordinate
void InitDisconnect ( )

Initialize a point with all coordinates as the disconnect value.

void InitFrom ( DPoint3dCR  point,
double  w 
)

Initializ a homogeneous point from a 3D point and separate weight.

NOTE The xyz components copied unchanged, i.e. not multiplied by the weight.

Parameters
[in]pointcartesian point
[in]wweight component
void InitFromArray ( double *  pArray)

Copy 4 components (xyzw) from a double array into this instance.

Parameters
[in]pArrayarray of doubles
bool InitWithNormalizedWeight ( DPoint4dCR  source)

Initializes the instance by normalizing the weight of the source.

Returns
true if normalization succeeded
void Interpolate ( DPoint4dCR  point0,
double  s,
DPoint4dCR  point1 
)

Interpolates between two homogeneous vectors.

|

Parameters
[in]point0s=0 point
[in]sinterpolation parameter
[in]point1s=1 point
bool IsDisconnect ( ) const
Returns
true if the point has coordinates which indicate it is a disconnect (separator) ponit.
bool IsEqual ( DPoint4dCR  vec2) const

Exact equality test between points.

(Also see method with same name but added tolerance argument.)

Parameters
[in]vec2vector
Returns
true if the points are identical. (DPoint4dCR, double)
bool IsEqual ( DPoint4dCR  vec2,
double  tolerance 
) const
Parameters
[in]vec2vector
[in]tolerancetolerance
Returns
true if all components are within given tolerance of each other.
bool IsEqual ( DPoint4dCR  vec2,
double  xyzTol,
double  wTol 
) const
Parameters
[in]vec2vector
[in]xyzToltolerance for absolute difference between x,y,z components.
[in]wToltolerance for absolute difference between w components.
Returns
true if all components are within given tolerance of each other, using different tolerances for xyz and w data.
double MagnitudeXYZW ( ) const

magnitude as pure 4d point – sqrt sum of squares.

double MaxAbs ( ) const
Returns
largest absoluted value among point coordinates.
double MaxAbsUnnormalizedXYZ ( ) const
Returns
largest absoluted value among xyz coordinates, ignoring weight.
double MaxUnnormalizedXYZDiff ( DPoint4dCR  other) const
Returns
largest absoluted value among xyz coordinates coordinates, ignoring weight.
void Negate ( DPoint4dCR  point)

Negate a point.

Parameters
[in]pointinput point
void Negate ( )

Negate all components of a point in place.

bool NormalizePlaneOf ( DPoint4dCR  plane0)

Normalizes a homogeneous plane (by dividing through by the vector magnitude).

Parameters
[in]plane0homogeneous plane
Returns
true unless normal is zero vector.
bool NormalizeWeightInPlace ( )

Divide through by weight component.

Returns
true if normalization succeeded
bool OriginAndNormalFromPlane ( DPoint3dR  origin,
DPoint3dR  normal 
) const
Parameters
[out]origincartesian orign
[out]normalcartesian normal
Returns
true if
bool PlaneFrom3Points ( DPoint3dCR  origin,
DPoint3dCR  point1,
DPoint3dCR  point2 
)

Computes the homogeneous coordinate vector for a plane defined by 3 3D points.

Parameters
[out]originorigin point
[out]point1another point on plane
[out]point2another point on plane
Returns
true if normal is well defined.
bool PlaneFromOriginAndNormal ( DPoint3dCR  origin,
DPoint3dCR  normal 
)

Computes the homogeneous vector for a plane defined by 3D origin and normal.

NOTE If the normal vector is null, a 0000 vector is returned.

Parameters
[out]originorigin point
[out]normalnormal vector
Returns
true unless normal is null
bool PlaneFromOriginAndVectors ( DPoint4dCR  origin,
DPoint3dCR  vector0,
DPoint3dCR  vector1 
)

Computes the homogeneous coordinate vector for a plane defined by a DPoint4d origin and a pair of 3D vectors.

Parameters
[out]origina point on the plane.
[out]vector0a vector in the plane.
[out]vector1another vector in the plane.
Returns
false if origin, vectors are not independent.
double RealDistance ( DPoint4dCR  vec2) const
Parameters
[in]vec2second point
Returns
distance between projections of two homnogeneous points.
bool RealDistanceSquared ( double *  pDistanceSquared,
DPoint3dCR  vec2 
) const
Parameters
[out]pDistanceSquaredsquared distance
[in]vec2second point
Returns
true iff the homogeneous point was properly normalized.
bool RealDistanceSquared ( double *  pDistanceSquared,
DPoint4dCR  vec2 
) const
Parameters
[out]pDistanceSquaredsquared distance
[in]vec2second point
Returns
true iff the homogeneous points were properly normalized.
bool RealDistanceSquaredXY ( double *  pDistanceSquared,
DPoint3dCR  vec2 
) const
Parameters
[out]pDistanceSquaredsquared distance
[in]vec2second point
Returns
true iff the homogeneous point was properly normalized.
bool RealDistanceXY ( double &  distance,
DPoint4dCR  pointB 
) const
Parameters
[out]distancedistance between xy parts
[in]pointBother point.
Returns
true iff the homogeneous points could be normalized
void Scale ( DPoint4dCR  point,
double  scale 
)

sets pOutVec to pInVec*scale.

Parameters
[in]pointinput vector
[in]scalescale
void Scale ( double  scale)

Scale a point in place.

Parameters
[in]scalescale factor
void SetComponent ( double  a,
int  index 
)

Set x,y,z or w component of a point.

Parameters
[in]acomponent value
[in]index0=x, 1=y, 2=z, 3=w, others cyclic
void SetComponents ( double  xComponent,
double  yComponent,
double  zComponent,
double  wComponent 
)
Parameters
[in]xComponentx component
[in]yComponenty component
[in]zComponentz component
[in]wComponentw component
void Subtract ( DPoint4dCR  vector)

Subtract a vector from the instance.

Parameters
[in]vectorvector to subtract
void SumOf ( DPoint4dCR  pt1,
DPoint4dCR  pt2 
)

Adds two homogeneous points.

Parameters
[in]pt1point 1
[in]pt2point 2
void SumOf ( DPoint4dCR  point0,
DPoint4dCR  point1,
double  scale1,
DPoint4dCR  point2,
double  scale2 
)

Adds two homogeneous points to a base point.

Parameters
[in]point0base point
[in]point1point 1
[in]scale1scale factor for point 1
[in]point2point 2
[in]scale2scale factor for point 2
void SumOf ( DPoint4dCR  point1,
double  scale1,
DPoint4dCR  point2,
double  scale2 
)

Adds two homogeneous points with scales.

Parameters
[in]point1point 1
[in]scale1scale factor for point 1
[in]point2point 2
[in]scale2scale factor for point 2
void SumOf ( DPoint4dCR  point0,
DPoint4dCR  point1,
double  scale1,
DPoint4dCR  point2,
double  scale2,
DPoint4dCR  point3,
double  scale3 
)

Adds three homogeneous points to a base point.

Parameters
[in]point0base point
[in]point1point 1
[in]scale1scale factor for point 1
[in]point2point 2
[in]scale2scale factor for point 2
[in]point3point 3
[in]scale3scale factor for point 3
void SumOf ( DPoint4dCR  point1,
double  scale1,
DPoint4dCR  point2,
double  scale2,
DPoint4dCR  point3,
double  scale3 
)

Adds three homogeneous points.

Parameters
[in]point1point 1
[in]scale1scale factor for point 1
[in]point2point 2
[in]scale2scale factor for point 2
[in]point3point 3
[in]scale3scale factor for point 3
void SumOf ( DPoint4dCR  point0,
DPoint4dCR  point1,
double  scale1 
)

Adds two homogeneous points to a base point.

Parameters
[in]point0base point
[in]point1point 1
[in]scale1scale factor for point 1
static ValidatedDPlane3dByVectors TryNormalizePointAndDerivatives ( DPoint4dCR  homogeneousPoint,
DPoint4dCR  homogeneousDerivative1,
DPoint4dCR  homogeneousDerivative2 
)
static

Return point and vectors that are the cartesian image of a homoegneous point and derivatives ul> li>The return is marked invalid if weight is zero.

/ul>

Returns
origin and vectors after normalization.
Parameters
[in]homogeneousPointweighted point
[in]homogeneousDerivative1weighted first derivative
[in]homogeneousDerivative2weighted second derivative
void WeightedDifferenceOf ( DPoint4dCR  A,
DPoint4dCR  B 
)

Scale each point by the other's weight and return the difference.

void WeightedDifferenceOf ( DPoint4dCR  A,
DPoint3dCR  B,
double  wB 
)

Scale each point by the other's weight and return the difference.

(Note that the w component of the result is always zero)

void WeightedDifferenceOf ( DPoint3dCR  A,
double  wA,
DPoint4dCR  B 
)

Scale each point by the other's weight and return the difference.

(Note that the w component of the result is always zero)

void Zero ( )

zero out this point.

Member Data Documentation

double w

w coordinate. 1 is a simple point. 0 is a vector. For other values, dividing through by w gives the simple point.

double x

x coordinate

double y

y coordinate

double z

z coordinate


The documentation for this struct was generated from the following file:

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.