Open CASCADE Technology  7.7.0
Public Member Functions
gp_Pnt2d Class Reference

Defines a non-persistent 2D cartesian point. More...

#include <gp_Pnt2d.hxx>

Public Member Functions

 gp_Pnt2d ()
 Creates a point with zero coordinates. More...
 
 gp_Pnt2d (const gp_XY &theCoord)
 Creates a point with a doublet of coordinates. More...
 
 gp_Pnt2d (const Standard_Real theXp, const Standard_Real theYp)
 Creates a point with its 2 cartesian's coordinates : theXp, theYp. More...
 
void SetCoord (const Standard_Integer theIndex, const Standard_Real theXi)
 Assigns the value Xi to the coordinate that corresponds to theIndex: theIndex = 1 => X is modified theIndex = 2 => Y is modified Raises OutOfRange if theIndex != {1, 2}. More...
 
void SetCoord (const Standard_Real theXp, const Standard_Real theYp)
 For this point, assigns the values theXp and theYp to its two coordinates. More...
 
void SetX (const Standard_Real theX)
 Assigns the given value to the X coordinate of this point. More...
 
void SetY (const Standard_Real theY)
 Assigns the given value to the Y coordinate of this point. More...
 
void SetXY (const gp_XY &theCoord)
 Assigns the two coordinates of Coord to this point. More...
 
Standard_Real Coord (const Standard_Integer theIndex) const
 Returns the coordinate of range theIndex : theIndex = 1 => X is returned theIndex = 2 => Y is returned Raises OutOfRange if theIndex != {1, 2}. More...
 
void Coord (Standard_Real &theXp, Standard_Real &theYp) const
 For this point returns its two coordinates as a number pair. More...
 
Standard_Real X () const
 For this point, returns its X coordinate. More...
 
Standard_Real Y () const
 For this point, returns its Y coordinate. More...
 
const gp_XYXY () const
 For this point, returns its two coordinates as a number pair. More...
 
const gp_XYCoord () const
 For this point, returns its two coordinates as a number pair. More...
 
gp_XYChangeCoord ()
 Returns the coordinates of this point. Note: This syntax allows direct modification of the returned value. More...
 
Standard_Boolean IsEqual (const gp_Pnt2d &theOther, const Standard_Real theLinearTolerance) const
 Comparison Returns True if the distance between the two points is lower or equal to theLinearTolerance. More...
 
Standard_Real Distance (const gp_Pnt2d &theOther) const
 Computes the distance between two points. More...
 
Standard_Real SquareDistance (const gp_Pnt2d &theOther) const
 Computes the square distance between two points. More...
 
void Mirror (const gp_Pnt2d &theP)
 Performs the symmetrical transformation of a point with respect to the point theP which is the center of the symmetry. More...
 
gp_Pnt2d Mirrored (const gp_Pnt2d &theP) const
 Performs the symmetrical transformation of a point with respect to an axis placement which is the axis. More...
 
void Mirror (const gp_Ax2d &theA)
 
gp_Pnt2d Mirrored (const gp_Ax2d &theA) const
 
void Rotate (const gp_Pnt2d &theP, const Standard_Real theAng)
 Rotates a point. theA1 is the axis of the rotation. Ang is the angular value of the rotation in radians. More...
 
gp_Pnt2d Rotated (const gp_Pnt2d &theP, const Standard_Real theAng) const
 
void Scale (const gp_Pnt2d &theP, const Standard_Real theS)
 Scales a point. theS is the scaling value. More...
 
gp_Pnt2d Scaled (const gp_Pnt2d &theP, const Standard_Real theS) const
 
void Transform (const gp_Trsf2d &theT)
 Transforms a point with the transformation theT. More...
 
gp_Pnt2d Transformed (const gp_Trsf2d &theT) const
 
void Translate (const gp_Vec2d &theV)
 Translates a point in the direction of the vector theV. The magnitude of the translation is the vector's magnitude. More...
 
gp_Pnt2d Translated (const gp_Vec2d &theV) const
 
void Translate (const gp_Pnt2d &theP1, const gp_Pnt2d &theP2)
 Translates a point from the point theP1 to the point theP2. More...
 
gp_Pnt2d Translated (const gp_Pnt2d &theP1, const gp_Pnt2d &theP2) const
 
void DumpJson (Standard_OStream &theOStream, Standard_Integer theDepth=-1) const
 Dumps the content of me into the stream. More...
 

Detailed Description

Defines a non-persistent 2D cartesian point.

Constructor & Destructor Documentation

◆ gp_Pnt2d() [1/3]

gp_Pnt2d::gp_Pnt2d ( )
inline

Creates a point with zero coordinates.

◆ gp_Pnt2d() [2/3]

gp_Pnt2d::gp_Pnt2d ( const gp_XY theCoord)
inline

Creates a point with a doublet of coordinates.

◆ gp_Pnt2d() [3/3]

gp_Pnt2d::gp_Pnt2d ( const Standard_Real  theXp,
const Standard_Real  theYp 
)
inline

Creates a point with its 2 cartesian's coordinates : theXp, theYp.

Member Function Documentation

◆ ChangeCoord()

gp_XY& gp_Pnt2d::ChangeCoord ( )
inline

Returns the coordinates of this point. Note: This syntax allows direct modification of the returned value.

◆ Coord() [1/3]

Standard_Real gp_Pnt2d::Coord ( const Standard_Integer  theIndex) const
inline

Returns the coordinate of range theIndex : theIndex = 1 => X is returned theIndex = 2 => Y is returned Raises OutOfRange if theIndex != {1, 2}.

◆ Coord() [2/3]

void gp_Pnt2d::Coord ( Standard_Real theXp,
Standard_Real theYp 
) const
inline

For this point returns its two coordinates as a number pair.

◆ Coord() [3/3]

const gp_XY& gp_Pnt2d::Coord ( ) const
inline

For this point, returns its two coordinates as a number pair.

◆ Distance()

Standard_Real gp_Pnt2d::Distance ( const gp_Pnt2d theOther) const
inline

Computes the distance between two points.

◆ DumpJson()

void gp_Pnt2d::DumpJson ( Standard_OStream theOStream,
Standard_Integer  theDepth = -1 
) const

Dumps the content of me into the stream.

◆ IsEqual()

Standard_Boolean gp_Pnt2d::IsEqual ( const gp_Pnt2d theOther,
const Standard_Real  theLinearTolerance 
) const
inline

Comparison Returns True if the distance between the two points is lower or equal to theLinearTolerance.

◆ Mirror() [1/2]

void gp_Pnt2d::Mirror ( const gp_Pnt2d theP)

Performs the symmetrical transformation of a point with respect to the point theP which is the center of the symmetry.

◆ Mirror() [2/2]

void gp_Pnt2d::Mirror ( const gp_Ax2d theA)

◆ Mirrored() [1/2]

gp_Pnt2d gp_Pnt2d::Mirrored ( const gp_Pnt2d theP) const

Performs the symmetrical transformation of a point with respect to an axis placement which is the axis.

◆ Mirrored() [2/2]

gp_Pnt2d gp_Pnt2d::Mirrored ( const gp_Ax2d theA) const

◆ Rotate()

void gp_Pnt2d::Rotate ( const gp_Pnt2d theP,
const Standard_Real  theAng 
)
inline

Rotates a point. theA1 is the axis of the rotation. Ang is the angular value of the rotation in radians.

◆ Rotated()

gp_Pnt2d gp_Pnt2d::Rotated ( const gp_Pnt2d theP,
const Standard_Real  theAng 
) const
inline

◆ Scale()

void gp_Pnt2d::Scale ( const gp_Pnt2d theP,
const Standard_Real  theS 
)
inline

Scales a point. theS is the scaling value.

◆ Scaled()

gp_Pnt2d gp_Pnt2d::Scaled ( const gp_Pnt2d theP,
const Standard_Real  theS 
) const
inline

◆ SetCoord() [1/2]

void gp_Pnt2d::SetCoord ( const Standard_Integer  theIndex,
const Standard_Real  theXi 
)
inline

Assigns the value Xi to the coordinate that corresponds to theIndex: theIndex = 1 => X is modified theIndex = 2 => Y is modified Raises OutOfRange if theIndex != {1, 2}.

◆ SetCoord() [2/2]

void gp_Pnt2d::SetCoord ( const Standard_Real  theXp,
const Standard_Real  theYp 
)
inline

For this point, assigns the values theXp and theYp to its two coordinates.

◆ SetX()

void gp_Pnt2d::SetX ( const Standard_Real  theX)
inline

Assigns the given value to the X coordinate of this point.

◆ SetXY()

void gp_Pnt2d::SetXY ( const gp_XY theCoord)
inline

Assigns the two coordinates of Coord to this point.

◆ SetY()

void gp_Pnt2d::SetY ( const Standard_Real  theY)
inline

Assigns the given value to the Y coordinate of this point.

◆ SquareDistance()

Standard_Real gp_Pnt2d::SquareDistance ( const gp_Pnt2d theOther) const
inline

Computes the square distance between two points.

◆ Transform()

void gp_Pnt2d::Transform ( const gp_Trsf2d theT)

Transforms a point with the transformation theT.

◆ Transformed()

gp_Pnt2d gp_Pnt2d::Transformed ( const gp_Trsf2d theT) const
inline

◆ Translate() [1/2]

void gp_Pnt2d::Translate ( const gp_Vec2d theV)
inline

Translates a point in the direction of the vector theV. The magnitude of the translation is the vector's magnitude.

◆ Translate() [2/2]

void gp_Pnt2d::Translate ( const gp_Pnt2d theP1,
const gp_Pnt2d theP2 
)
inline

Translates a point from the point theP1 to the point theP2.

◆ Translated() [1/2]

gp_Pnt2d gp_Pnt2d::Translated ( const gp_Vec2d theV) const
inline

◆ Translated() [2/2]

gp_Pnt2d gp_Pnt2d::Translated ( const gp_Pnt2d theP1,
const gp_Pnt2d theP2 
) const
inline

◆ X()

Standard_Real gp_Pnt2d::X ( ) const
inline

For this point, returns its X coordinate.

◆ XY()

const gp_XY& gp_Pnt2d::XY ( ) const
inline

For this point, returns its two coordinates as a number pair.

◆ Y()

Standard_Real gp_Pnt2d::Y ( ) const
inline

For this point, returns its Y coordinate.


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