CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | Friends | List of all members
OdGePoint3d Class Reference

#include <GePoint3d.h>

Public Member Functions

 OdGePoint3d ()
 
 OdGePoint3d (double xx, double yy, double zz)
 
 OdGePoint3d (const OdGePlanarEnt &plane, const OdGePoint2d &pnt2d)
 
OdGePoint3dsetToProduct (const OdGeMatrix3d &xfm, const OdGePoint3d &point)
 
OdGePoint3dtransformBy (const OdGeMatrix3d &xfm)
 
OdGePoint3drotateBy (double angle, const OdGeVector3d &vect, const OdGePoint3d &basePoint=OdGePoint3d::kOrigin)
 
OdGePoint3dmirror (const OdGePlane &plane)
 
OdGePoint3dscaleBy (double scaleFactor, const OdGePoint3d &basePoint=OdGePoint3d::kOrigin)
 
OdGePoint2d convert2d (const OdGePlanarEnt &plane) const
 
OdGePoint2d convert2d () const
 
OdGePoint3d operator* (double scale) const
 
OdGePoint3doperator*= (double scale)
 
OdGePoint3d operator/ (double scale) const
 
OdGePoint3doperator/= (double scale)
 
OdGePoint3d operator+ (const OdGeVector3d &vect) const
 
OdGePoint3doperator+= (const OdGeVector3d &vect)
 
OdGePoint3d operator- (const OdGeVector3d &vect) const
 
OdGePoint3doperator-= (const OdGeVector3d &vect)
 
OdGePoint3dsetToSum (const OdGePoint3d &point, const OdGeVector3d &vect)
 
OdGeVector3d operator- (const OdGePoint3d &point) const
 
const OdGeVector3dasVector () const
 
OdGeVector3dasVector ()
 
double distanceTo (const OdGePoint3d &point) const
 
double distanceSqrdTo (const OdGePoint3d &point) const
 
OdGePoint3d project (const OdGePlanarEnt &plane, const OdGeVector3d &vect) const
 
OdGePoint3d orthoProject (const OdGePlane &plane) const
 
bool operator== (const OdGePoint3d &point) const
 
bool operator!= (const OdGePoint3d &point) const
 
bool isEqualTo (const OdGePoint3d &point, const OdGeTol &tol=OdGeContext::gTol) const
 
double operator[] (unsigned int i) const
 
double & operator[] (unsigned int i)
 
OdGePoint3dset (double xx, double yy, double zz)
 
OdGePoint3dset (const OdGePoint2d &xy, double zz=0.0)
 
OdGePoint3dset (const OdGePlanarEnt &plane, const OdGePoint2d &point)
 
OdGePoint3dswapWithPoint (OdGePoint3d &point)
 

Public Attributes

double x
 
double y
 
double z
 

Static Public Attributes

static GE_STATIC_EXPORT const OdGePoint3d kOrigin
 

Friends

GE_TOOLKIT_EXPORT OdGePoint3d operator* (const OdGeMatrix3d &matrix, const OdGePoint3d &point)
 
OdGePoint3d operator* (double scale, const OdGePoint3d &point)
 

Detailed Description

This class represents points (locations) in 3D space.

Remarks
OdGePoint3d may be viewed as an array[3] of doubles.

Corresponding C++ library: TD_Ge

<group OdGe_Classes>

See also
<link ge_BasicTypes, Working with Basic Geometry Types>

Definition at line 56 of file GePoint3d.h.

Constructor & Destructor Documentation

◆ OdGePoint3d() [1/3]

OdGePoint3d::OdGePoint3d ( )
inline

Default constructor for the OdGePoint3d class.

Remarks
The default constructor constructs a point at the origin.

Definition at line 66 of file GePoint3d.h.

◆ OdGePoint3d() [2/3]

OdGePoint3d::OdGePoint3d ( double  xx,
double  yy,
double  zz 
)
inline

Constructor for the OdGePoint3d class.

Parameters
xx[in] The X-coordinate of this point.
yy[in] The Y-coordinate of this point.
zz[in] The Z-coordinate of this point.
Remarks
Constructs a 3D point with specified coordinates.

Definition at line 81 of file GePoint3d.h.

◆ OdGePoint3d() [3/3]

OdGePoint3d::OdGePoint3d ( const OdGePlanarEnt plane,
const OdGePoint2d pnt2d 
)

Constructor for the OdGePoint3d class.

Parameters
plane[in] Any planar entity.
pnt2d[in] 2D parameter in a plane's coordinates.
Remarks
Constructs a 3D point by the formula:

p + uAxis * pnt2d.x + vAxis * pnt2d.y,

where p, uAxis, and vAxis are returned by the function call plane.get (p, uAxis, vAxis);

Member Function Documentation

◆ asVector() [1/2]

OdGeVector3d & OdGePoint3d::asVector ( )
inline

Returns this point as a vector.

Definition at line 556 of file GePoint3d.h.

◆ asVector() [2/2]

const OdGeVector3d & OdGePoint3d::asVector ( ) const
inline

Returns this point as a vector.

Definition at line 549 of file GePoint3d.h.

◆ convert2d() [1/2]

OdGePoint2d OdGePoint3d::convert2d ( ) const

Returns the 2D point from this point discarding the Z-coordinate.

◆ convert2d() [2/2]

OdGePoint2d OdGePoint3d::convert2d ( const OdGePlanarEnt plane) const

Returns the 2D point with the coordinates corresponding to the decomposition of the vector * this - p in the basis uAxis, vAxis of the planar entity, where p, uAxis, and vAxis can be found by the function call plane.get(p, uAxis, vAxis).

Parameters
plane[in] A plane on which this point lies.
Remarks
This 3D point is assumed to be on the specified plane.

◆ distanceSqrdTo()

double OdGePoint3d::distanceSqrdTo ( const OdGePoint3d point) const
inline

Returns the squared distance from this point to the specified point.

Parameters
point[in] Any 3D point to which a squared distance is measured.

Definition at line 351 of file GePoint3d.h.

◆ distanceTo()

double OdGePoint3d::distanceTo ( const OdGePoint3d point) const
inline

Returns the distance from this point to the specified point.

Parameters
point[in] Any 3D point to which a distance is measured.

Definition at line 339 of file GePoint3d.h.

◆ isEqualTo()

bool OdGePoint3d::isEqualTo ( const OdGePoint3d point,
const OdGeTol tol = OdGeContext::gTol 
) const

Returns true if and only if the distance from this point to point is within the specified tolerance.

Parameters
point[in] Any 3D point.
tol[in] Geometric tolerance.

◆ mirror()

OdGePoint3d & OdGePoint3d::mirror ( const OdGePlane plane)

Mirrors this point about the specified plane.

Parameters
plane[in] Mirror plane.

◆ operator!=()

bool OdGePoint3d::operator!= ( const OdGePoint3d point) const
inline

Inequality operator. Returns true if any of the coordinates of this point are not equal to the corresponding coordinates of the specified point.

Parameters
point[in] A 3D point to be checked for inequality with this point.

Definition at line 397 of file GePoint3d.h.

◆ operator*()

OdGePoint3d OdGePoint3d::operator* ( double  scale) const
inline

Multiplication operator for the OdGePoint3d class.

Parameters
scale[in] Input scale factor.
Remarks
Makes this point equal to the point scaled by a scale factor.

Definition at line 205 of file GePoint3d.h.

◆ operator*=()

OdGePoint3d & OdGePoint3d::operator*= ( double  scale)
inline

Multiplication operator for the OdGePoint3d class.

Parameters
scale[in] Input scale factor.
Remarks
Scales this point by a scale factor. Returns the reference to this point.

Definition at line 219 of file GePoint3d.h.

◆ operator+()

OdGePoint3d OdGePoint3d::operator+ ( const OdGeVector3d vect) const
inline

Addition operator for the OdGePoint3d class.

Parameters
vect[in] Input vector by which a point is translated.
Remarks
Translates this point by the specified vector.

Definition at line 513 of file GePoint3d.h.

◆ operator+=()

OdGePoint3d & OdGePoint3d::operator+= ( const OdGeVector3d vect)
inline

Addition operator for the OdGePoint3d class.

Parameters
vect[in] Input vector by which a point is translated.
Remarks
Returns a reference to a point that is translated by the specified input vector.

Definition at line 519 of file GePoint3d.h.

◆ operator-() [1/2]

OdGeVector3d OdGePoint3d::operator- ( const OdGePoint3d point) const
inline

Subtraction operator for the OdGePoint3d class.

Parameters
point[in] Input 3D point, coordinates of which are subtracted from the coordinates of this point.
Remarks
Returns a vector formed as a result of this point's coordinates minus coordinates of the specified point.

Definition at line 543 of file GePoint3d.h.

◆ operator-() [2/2]

OdGePoint3d OdGePoint3d::operator- ( const OdGeVector3d vect) const
inline

Subtraction operator for the OdGePoint3d class.

Parameters
vect[in] Input vector by which a point is translated.
Remarks
Returns a point that is translated in the opposite direction and length of the specified input vector.

Definition at line 528 of file GePoint3d.h.

◆ operator-=()

OdGePoint3d & OdGePoint3d::operator-= ( const OdGeVector3d vect)
inline

Subtraction operator for the OdGePoint3d class.

Parameters
vect[in] Input vector by which a point is translated.
Remarks
Returns a reference to the point equal to this point translated by the vector opposite to the specified vector.

Definition at line 534 of file GePoint3d.h.

◆ operator/()

OdGePoint3d OdGePoint3d::operator/ ( double  scale) const
inline

Division operator for the OdGePoint3d class.

Parameters
scale[in] Input scale factor.
Remarks
Returns the point equal to this point scaled by a scale factor 1/scale.

Definition at line 236 of file GePoint3d.h.

◆ operator/=()

OdGePoint3d & OdGePoint3d::operator/= ( double  scale)
inline

Division operator for the OdGePoint3d class.

Parameters
scale[in] Input scale factor.
Remarks
Returns a reference to a point that is the result of scaling this point with respect to the origin by a scale factor.

Definition at line 250 of file GePoint3d.h.

◆ operator==()

bool OdGePoint3d::operator== ( const OdGePoint3d point) const
inline

Equality operator. Returns true if all the coordinates of this point are equal to the corresponding coordinates of the specified point.

Parameters
point[in] A 3D point to be checked for equality with this point.

Definition at line 385 of file GePoint3d.h.

◆ operator[]() [1/2]

double & OdGePoint3d::operator[] ( unsigned int  i)
inline

References ith coordinate of this point.

Parameters
i[in] Index of coordinate.
Remarks
0 references the X-coordinate. 1 references the Y-coordinate. 2 references the Z-coordinate.

Definition at line 442 of file GePoint3d.h.

◆ operator[]() [2/2]

double OdGePoint3d::operator[] ( unsigned int  i) const
inline

Returns ith coordinate of this point.

Parameters
i[in] Index of coordinate.
Remarks
0 returns the X-coordinate. 1 returns the Y-coordinate. 2 returns the Z-coordinate.

Definition at line 425 of file GePoint3d.h.

◆ orthoProject()

OdGePoint3d OdGePoint3d::orthoProject ( const OdGePlane plane) const

Returns the 3D point that is the result of the orthogonal projection of this point into the specified plane.

Parameters
plane[in] Plane on which this point is to be projected

◆ project()

OdGePoint3d OdGePoint3d::project ( const OdGePlanarEnt plane,
const OdGeVector3d vect 
) const

Projects this point onto the specified plane along the specified vector.

Parameters
plane[in] Plane on which this point is to be projected
vect[in] Vector defining the projection direction.

◆ rotateBy()

OdGePoint3d & OdGePoint3d::rotateBy ( double  angle,
const OdGeVector3d vect,
const OdGePoint3d basePoint = OdGePoint3d::kOrigin 
)

Rotates this point about the specified basePoint and axis of rotation by the specified angle.

Parameters
angle[in] Rotation angle in radians.
vect[in] Axis of rotation.
basePoint[in] Basepoint relative to which rotation is computed.

◆ scaleBy()

OdGePoint3d & OdGePoint3d::scaleBy ( double  scaleFactor,
const OdGePoint3d basePoint = OdGePoint3d::kOrigin 
)

Scales this point by the scale factor about the basepoint.

Parameters
scaleFactor[in] Scale Factor. The scale factor must be greater than zero.
basePoint[in] Basepoint relative to which scaling is computed.

◆ set() [1/3]

OdGePoint3d & OdGePoint3d::set ( const OdGePlanarEnt plane,
const OdGePoint2d point 
)

Sets the parameters for this point according to the arguments

Parameters
plane[in] Any plane.
point[in] Any 2D point.
Remarks
Returns a reference to this point.
plane and pnt2d define a point as follows:
    p + uAxis * point.x + vAxis * point.y,
where p, uAxis, and vAxis are returned by the function call plane.get (p, uAxis, vAxis);

◆ set() [2/3]

OdGePoint3d & OdGePoint3d::set ( const OdGePoint2d xy,
double  zz = 0.0 
)

Sets the parameters for this point according to the arguments.

Parameters
xy[in] A 2D point that provides the X and Y coordinates for this point.
zz[in] The Z-coordinate of this point.

◆ set() [3/3]

OdGePoint3d & OdGePoint3d::set ( double  xx,
double  yy,
double  zz 
)
inline

Sets the parameters for this point according to the arguments

Parameters
xx[in] The X-coordinate of this point.
yy[in] The Y-coordinate of this point.
zz[in] The Z-coordinate of this point.

Definition at line 455 of file GePoint3d.h.

◆ setToProduct()

OdGePoint3d & OdGePoint3d::setToProduct ( const OdGeMatrix3d xfm,
const OdGePoint3d point 
)

Sets this point to the product of xfm * point, and returns a reference to this point.

Parameters
xfm[in] A 3D matrix with which a specified point is multiplied.
point[in] The point to be multiplied.

◆ setToSum()

OdGePoint3d & OdGePoint3d::setToSum ( const OdGePoint3d point,
const OdGeVector3d vect 
)

Sets this point to point + vect, and returns a reference to this point.

Parameters
point[in] Any 3D point.
vect[in] Any 3D vector.

◆ swapWithPoint()

OdGePoint3d & OdGePoint3d::swapWithPoint ( OdGePoint3d point)

Swaps coordinates of this point and the specified point.

Parameters
point[in] A 3D point's coordinates which are swapped with coordinates of this point.

◆ transformBy()

OdGePoint3d & OdGePoint3d::transformBy ( const OdGeMatrix3d xfm)

Sets this point to the result of the matrix multiplication of xfm * this point. Returns a reference to this point.

Parameters
xfm[in] A 3D matrix with which this point is multiplied.

Friends And Related Function Documentation

◆ operator* [1/2]

GE_TOOLKIT_EXPORT OdGePoint3d operator* ( const OdGeMatrix3d matrix,
const OdGePoint3d point 
)
friend
Remarks
Sets this point to the result of the matrix multiplication of matrix * point.
Parameters
matrix[in] Any 3D matrix.
point[in] The point to be multiplied.

◆ operator* [2/2]

OdGePoint3d operator* ( double  scale,
const OdGePoint3d point 
)
friend
Remarks
Sets this point to the result of the matrix multiplication of the point and a scale factor.
Parameters
scale[in] Scale factor.
point[in] The point to be multiplied.

Definition at line 124 of file GePoint3d.h.

Member Data Documentation

◆ kOrigin

GE_STATIC_EXPORT const OdGePoint3d OdGePoint3d::kOrigin
static

Definition at line 106 of file GePoint3d.h.

◆ x

double OdGePoint3d::x

Definition at line 495 of file GePoint3d.h.

◆ y

double OdGePoint3d::y

Definition at line 496 of file GePoint3d.h.

◆ z

double OdGePoint3d::z

Definition at line 497 of file GePoint3d.h.


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