CFx SDK Documentation  2023 SP0
Public Member Functions | Public Attributes | Static Public Attributes | Friends | List of all members
OdGePoint2d Class Reference

#include <GePoint2d.h>

Public Member Functions

 OdGePoint2d ()
 
 OdGePoint2d (double xx, double yy)
 
OdGePoint2dsetToProduct (const OdGeMatrix2d &matrix, const OdGePoint2d &point)
 
OdGePoint2dtransformBy (const OdGeMatrix2d &xfm)
 
OdGePoint2drotateBy (double angle, const OdGePoint2d &basePoint=kOrigin)
 
OdGePoint2dmirror (const OdGeLine2d &line)
 
OdGePoint2dscaleBy (double scaleFactor, const OdGePoint2d &basePoint=kOrigin)
 
OdGePoint2d operator* (double scale) const
 
OdGePoint2doperator*= (double scale)
 
OdGePoint2d operator/ (double scale) const
 
OdGePoint2doperator/= (double scale)
 
OdGePoint2d operator+ (const OdGeVector2d &vect) const
 
OdGePoint2doperator+= (const OdGeVector2d &vect)
 
OdGePoint2d operator- (const OdGeVector2d &vect) const
 
OdGePoint2doperator-= (const OdGeVector2d &vect)
 
OdGePoint2dsetToSum (const OdGePoint2d &point, const OdGeVector2d &vect)
 
OdGeVector2d operator- (const OdGePoint2d &point) const
 
const OdGeVector2dasVector () const
 
double distanceTo (const OdGePoint2d &point) const
 
bool operator== (const OdGePoint2d &point) const
 
bool operator!= (const OdGePoint2d &point) const
 
bool isEqualTo (const OdGePoint2d &point, const OdGeTol &tol=OdGeContext::gTol) const
 
double & operator[] (unsigned int i)
 
double operator[] (unsigned int i) const
 
OdGePoint2dset (double xx, double yy)
 

Public Attributes

double x
 
double y
 

Static Public Attributes

static GE_STATIC_EXPORT const OdGePoint2d kOrigin
 

Friends

GE_TOOLKIT_EXPORT OdGePoint2d operator* (const OdGeMatrix2d &matrix, const OdGePoint2d &point)
 
GE_TOOLKIT_EXPORT OdGePoint2d operator* (double scale, const OdGePoint2d &point)
 

Detailed Description

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

Remarks
OdGePoint2d may be viewed as an array[2] of doubles.

Corresponding C++ library: TD_Ge

<group OdGe_Classes>

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

Definition at line 59 of file GePoint2d.h.

Constructor & Destructor Documentation

◆ OdGePoint2d() [1/2]

OdGePoint2d::OdGePoint2d ( )
inline
Parameters
xx[in] The X-coordinate of this point.
yy[in] The Y-coordinate of this point.
source[in] Object to be cloned.
Remarks
The default constructor constructs a point at the origin.

Definition at line 69 of file GePoint2d.h.

◆ OdGePoint2d() [2/2]

OdGePoint2d::OdGePoint2d ( double  xx,
double  yy 
)
inline

Definition at line 73 of file GePoint2d.h.

Member Function Documentation

◆ asVector()

const OdGeVector2d& OdGePoint2d::asVector ( ) const
inline

Returns this point as a vector.

Definition at line 226 of file GePoint2d.h.

◆ distanceTo()

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

Returns the distance from this point to the specified point.

Parameters
point[in] Any 2D point.

Definition at line 236 of file GePoint2d.h.

◆ isEqualTo()

bool OdGePoint2d::isEqualTo ( const OdGePoint2d 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 2D point.
tol[in] Geometric tolerance.

◆ mirror()

OdGePoint2d& OdGePoint2d::mirror ( const OdGeLine2d line)

Mirrors this point about the specified 2D line.

Parameters
line[in] Mirror Line.

◆ operator!=()

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

Definition at line 247 of file GePoint2d.h.

◆ operator*()

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

Definition at line 146 of file GePoint2d.h.

◆ operator*=()

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

Definition at line 152 of file GePoint2d.h.

◆ operator+()

OdGePoint2d OdGePoint2d::operator+ ( const OdGeVector2d vect) const
inline

Definition at line 174 of file GePoint2d.h.

◆ operator+=()

OdGePoint2d& OdGePoint2d::operator+= ( const OdGeVector2d vect)
inline

Definition at line 180 of file GePoint2d.h.

◆ operator-() [1/2]

OdGeVector2d OdGePoint2d::operator- ( const OdGePoint2d point) const
inline

Definition at line 217 of file GePoint2d.h.

◆ operator-() [2/2]

OdGePoint2d OdGePoint2d::operator- ( const OdGeVector2d vect) const
inline

Definition at line 188 of file GePoint2d.h.

◆ operator-=()

OdGePoint2d& OdGePoint2d::operator-= ( const OdGeVector2d vect)
inline

Definition at line 194 of file GePoint2d.h.

◆ operator/()

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

Definition at line 160 of file GePoint2d.h.

◆ operator/=()

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

Definition at line 166 of file GePoint2d.h.

◆ operator==()

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

Definition at line 242 of file GePoint2d.h.

◆ operator[]() [1/2]

double& OdGePoint2d::operator[] ( unsigned int  i)
inline
Parameters
i[in] Index of coordinate.
Remarks
Returns or references the ith coordinate of this point.

0 returns or references the X-coordinate. 1 returns or references the Y-coordinate.

Definition at line 272 of file GePoint2d.h.

◆ operator[]() [2/2]

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

Definition at line 277 of file GePoint2d.h.

◆ rotateBy()

OdGePoint2d& OdGePoint2d::rotateBy ( double  angle,
const OdGePoint2d basePoint = kOrigin 
)

Rotates this point about the specified basePoint by the specified angle.

Parameters
angle[in] Rotation angle.
basePoint[in] Basepoint.

◆ scaleBy()

OdGePoint2d& OdGePoint2d::scaleBy ( double  scaleFactor,
const OdGePoint2d basePoint = 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.

◆ set()

OdGePoint2d& OdGePoint2d::set ( double  xx,
double  yy 
)
inline

Sets this point to the specified X and Y coordinates. Returns a reference to this point.

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

Definition at line 290 of file GePoint2d.h.

◆ setToProduct()

OdGePoint2d& OdGePoint2d::setToProduct ( const OdGeMatrix2d matrix,
const OdGePoint2d point 
)

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

Parameters
matrix[in] A 2D matrix.
point[in] The point to be multiplied.

◆ setToSum()

OdGePoint2d& OdGePoint2d::setToSum ( const OdGePoint2d point,
const OdGeVector2d vect 
)
inline

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

Parameters
point[in] Any 2D point.
vect[in] A 2D vector.

Definition at line 208 of file GePoint2d.h.

◆ transformBy()

OdGePoint2d& OdGePoint2d::transformBy ( const OdGeMatrix2d xfm)

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

Parameters
xfm[in] A 2D matrix.

Friends And Related Function Documentation

◆ operator* [1/2]

GE_TOOLKIT_EXPORT OdGePoint2d operator* ( const OdGeMatrix2d matrix,
const OdGePoint2d point 
)
friend
Remarks
Sets this point to the result of the matrix multiplication matrix * point, or the point scaled by a factor of scale.
Parameters
matrix[in] Any 2D matrix.
scale[in] Scale factor.
point[in] The point to be multiplied.

◆ operator* [2/2]

GE_TOOLKIT_EXPORT OdGePoint2d operator* ( double  scale,
const OdGePoint2d point 
)
friend

Member Data Documentation

◆ kOrigin

GE_STATIC_EXPORT const OdGePoint2d OdGePoint2d::kOrigin
static

Definition at line 80 of file GePoint2d.h.

◆ x

double OdGePoint2d::x

Definition at line 299 of file GePoint2d.h.

◆ y

double OdGePoint2d::y

Definition at line 300 of file GePoint2d.h.


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