Open CASCADE Technology  7.7.0
Public Member Functions
gp_Pnt Class Reference

Defines a 3D cartesian point. More...

#include <gp_Pnt.hxx>

Public Member Functions

 gp_Pnt ()
 Creates a point with zero coordinates. More...
 
 gp_Pnt (const gp_XYZ &theCoord)
 Creates a point from a XYZ object. More...
 
 gp_Pnt (const Standard_Real theXp, const Standard_Real theYp, const Standard_Real theZp)
 Creates a point with its 3 cartesian's coordinates : theXp, theYp, theZp. More...
 
void SetCoord (const Standard_Integer theIndex, const Standard_Real theXi)
 Changes the coordinate of range theIndex : theIndex = 1 => X is modified theIndex = 2 => Y is modified theIndex = 3 => Z is modified Raised if theIndex != {1, 2, 3}. More...
 
void SetCoord (const Standard_Real theXp, const Standard_Real theYp, const Standard_Real theZp)
 For this point, assigns the values theXp, theYp and theZp to its three 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 SetZ (const Standard_Real theZ)
 Assigns the given value to the Z coordinate of this point. More...
 
void SetXYZ (const gp_XYZ &theCoord)
 Assigns the three coordinates of theCoord to this point. More...
 
Standard_Real Coord (const Standard_Integer theIndex) const
 Returns the coordinate of corresponding to the value of theIndex : theIndex = 1 => X is returned theIndex = 2 => Y is returned theIndex = 3 => Z is returned Raises OutOfRange if theIndex != {1, 2, 3}. Raised if theIndex != {1, 2, 3}. More...
 
void Coord (Standard_Real &theXp, Standard_Real &theYp, Standard_Real &theZp) const
 For this point gives its three coordinates theXp, theYp and theZp. 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...
 
Standard_Real Z () const
 For this point, returns its Z coordinate. More...
 
const gp_XYZXYZ () const
 For this point, returns its three coordinates as a XYZ object. More...
 
const gp_XYZCoord () const
 For this point, returns its three coordinates as a XYZ object. More...
 
gp_XYZChangeCoord ()
 Returns the coordinates of this point. Note: This syntax allows direct modification of the returned value. More...
 
void BaryCenter (const Standard_Real theAlpha, const gp_Pnt &theP, const Standard_Real theBeta)
 Assigns the result of the following expression to this point (theAlpha*this + theBeta*theP) / (theAlpha + theBeta) More...
 
Standard_Boolean IsEqual (const gp_Pnt &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_Pnt &theOther) const
 Computes the distance between two points. More...
 
Standard_Real SquareDistance (const gp_Pnt &theOther) const
 Computes the square distance between two points. More...
 
void Mirror (const gp_Pnt &theP)
 Performs the symmetrical transformation of a point with respect to the point theP which is the center of the symmetry. More...
 
gp_Pnt Mirrored (const gp_Pnt &theP) const
 Performs the symmetrical transformation of a point with respect to an axis placement which is the axis of the symmetry. More...
 
void Mirror (const gp_Ax1 &theA1)
 
gp_Pnt Mirrored (const gp_Ax1 &theA1) const
 Performs the symmetrical transformation of a point with respect to a plane. The axis placement theA2 locates the plane of the symmetry : (Location, XDirection, YDirection). More...
 
void Mirror (const gp_Ax2 &theA2)
 
gp_Pnt Mirrored (const gp_Ax2 &theA2) const
 Rotates a point. theA1 is the axis of the rotation. theAng is the angular value of the rotation in radians. More...
 
void Rotate (const gp_Ax1 &theA1, const Standard_Real theAng)
 
gp_Pnt Rotated (const gp_Ax1 &theA1, const Standard_Real theAng) const
 
void Scale (const gp_Pnt &theP, const Standard_Real theS)
 Scales a point. theS is the scaling value. More...
 
gp_Pnt Scaled (const gp_Pnt &theP, const Standard_Real theS) const
 
void Transform (const gp_Trsf &theT)
 Transforms a point with the transformation T. More...
 
gp_Pnt Transformed (const gp_Trsf &theT) const
 
void Translate (const gp_Vec &theV)
 Translates a point in the direction of the vector theV. The magnitude of the translation is the vector's magnitude. More...
 
gp_Pnt Translated (const gp_Vec &theV) const
 
void Translate (const gp_Pnt &theP1, const gp_Pnt &theP2)
 Translates a point from the point theP1 to the point theP2. More...
 
gp_Pnt Translated (const gp_Pnt &theP1, const gp_Pnt &theP2) const
 
void DumpJson (Standard_OStream &theOStream, Standard_Integer theDepth=-1) const
 Dumps the content of me into the stream. More...
 
Standard_Boolean InitFromJson (const Standard_SStream &theSStream, Standard_Integer &theStreamPos)
 Inits the content of me from the stream. More...
 

Detailed Description

Defines a 3D cartesian point.

Constructor & Destructor Documentation

◆ gp_Pnt() [1/3]

gp_Pnt::gp_Pnt ( )
inline

Creates a point with zero coordinates.

◆ gp_Pnt() [2/3]

gp_Pnt::gp_Pnt ( const gp_XYZ theCoord)
inline

Creates a point from a XYZ object.

◆ gp_Pnt() [3/3]

gp_Pnt::gp_Pnt ( const Standard_Real  theXp,
const Standard_Real  theYp,
const Standard_Real  theZp 
)
inline

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

Member Function Documentation

◆ BaryCenter()

void gp_Pnt::BaryCenter ( const Standard_Real  theAlpha,
const gp_Pnt theP,
const Standard_Real  theBeta 
)
inline

Assigns the result of the following expression to this point (theAlpha*this + theBeta*theP) / (theAlpha + theBeta)

◆ ChangeCoord()

gp_XYZ& gp_Pnt::ChangeCoord ( )
inline

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

◆ Coord() [1/3]

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

Returns the coordinate of corresponding to the value of theIndex : theIndex = 1 => X is returned theIndex = 2 => Y is returned theIndex = 3 => Z is returned Raises OutOfRange if theIndex != {1, 2, 3}. Raised if theIndex != {1, 2, 3}.

◆ Coord() [2/3]

void gp_Pnt::Coord ( Standard_Real theXp,
Standard_Real theYp,
Standard_Real theZp 
) const
inline

For this point gives its three coordinates theXp, theYp and theZp.

◆ Coord() [3/3]

const gp_XYZ& gp_Pnt::Coord ( ) const
inline

For this point, returns its three coordinates as a XYZ object.

◆ Distance()

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

Computes the distance between two points.

◆ DumpJson()

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

Dumps the content of me into the stream.

◆ InitFromJson()

Standard_Boolean gp_Pnt::InitFromJson ( const Standard_SStream theSStream,
Standard_Integer theStreamPos 
)

Inits the content of me from the stream.

◆ IsEqual()

Standard_Boolean gp_Pnt::IsEqual ( const gp_Pnt 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/3]

void gp_Pnt::Mirror ( const gp_Pnt theP)

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

◆ Mirror() [2/3]

void gp_Pnt::Mirror ( const gp_Ax1 theA1)

◆ Mirror() [3/3]

void gp_Pnt::Mirror ( const gp_Ax2 theA2)

◆ Mirrored() [1/3]

gp_Pnt gp_Pnt::Mirrored ( const gp_Pnt theP) const

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

◆ Mirrored() [2/3]

gp_Pnt gp_Pnt::Mirrored ( const gp_Ax1 theA1) const

Performs the symmetrical transformation of a point with respect to a plane. The axis placement theA2 locates the plane of the symmetry : (Location, XDirection, YDirection).

◆ Mirrored() [3/3]

gp_Pnt gp_Pnt::Mirrored ( const gp_Ax2 theA2) const

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

◆ Rotate()

void gp_Pnt::Rotate ( const gp_Ax1 theA1,
const Standard_Real  theAng 
)
inline

◆ Rotated()

gp_Pnt gp_Pnt::Rotated ( const gp_Ax1 theA1,
const Standard_Real  theAng 
) const
inline

◆ Scale()

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

Scales a point. theS is the scaling value.

◆ Scaled()

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

◆ SetCoord() [1/2]

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

Changes the coordinate of range theIndex : theIndex = 1 => X is modified theIndex = 2 => Y is modified theIndex = 3 => Z is modified Raised if theIndex != {1, 2, 3}.

◆ SetCoord() [2/2]

void gp_Pnt::SetCoord ( const Standard_Real  theXp,
const Standard_Real  theYp,
const Standard_Real  theZp 
)
inline

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

◆ SetX()

void gp_Pnt::SetX ( const Standard_Real  theX)
inline

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

◆ SetXYZ()

void gp_Pnt::SetXYZ ( const gp_XYZ theCoord)
inline

Assigns the three coordinates of theCoord to this point.

◆ SetY()

void gp_Pnt::SetY ( const Standard_Real  theY)
inline

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

◆ SetZ()

void gp_Pnt::SetZ ( const Standard_Real  theZ)
inline

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

◆ SquareDistance()

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

Computes the square distance between two points.

◆ Transform()

void gp_Pnt::Transform ( const gp_Trsf theT)

Transforms a point with the transformation T.

◆ Transformed()

gp_Pnt gp_Pnt::Transformed ( const gp_Trsf theT) const
inline

◆ Translate() [1/2]

void gp_Pnt::Translate ( const gp_Vec 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_Pnt::Translate ( const gp_Pnt theP1,
const gp_Pnt theP2 
)
inline

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

◆ Translated() [1/2]

gp_Pnt gp_Pnt::Translated ( const gp_Vec theV) const
inline

◆ Translated() [2/2]

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

◆ X()

Standard_Real gp_Pnt::X ( ) const
inline

For this point, returns its X coordinate.

◆ XYZ()

const gp_XYZ& gp_Pnt::XYZ ( ) const
inline

For this point, returns its three coordinates as a XYZ object.

◆ Y()

Standard_Real gp_Pnt::Y ( ) const
inline

For this point, returns its Y coordinate.

◆ Z()

Standard_Real gp_Pnt::Z ( ) const
inline

For this point, returns its Z coordinate.


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