![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
Defines a non-persistent 2D cartesian point. More...
#include <gp_Pnt2d.hxx>
Public Member Functions | |
| constexpr | gp_Pnt2d () noexcept=default |
| Creates a point with zero coordinates. | |
| constexpr | gp_Pnt2d (const gp_XY &theCoord) noexcept |
| Creates a point with a doublet of coordinates. | |
| constexpr | gp_Pnt2d (const double theXp, const double theYp) noexcept |
| Creates a point with its 2 cartesian's coordinates: theXp, theYp. | |
| constexpr void | SetCoord (const int theIndex, const double 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}. | |
| constexpr void | SetCoord (const double theXp, const double theYp) noexcept |
| For this point, assigns the values theXp and theYp to its two coordinates. | |
| constexpr void | SetX (const double theX) noexcept |
| Assigns the given value to the X coordinate of this point. | |
| constexpr void | SetY (const double theY) noexcept |
| Assigns the given value to the Y coordinate of this point. | |
| constexpr void | SetXY (const gp_XY &theCoord) noexcept |
| Assigns the two coordinates of Coord to this point. | |
| constexpr double | Coord (const int theIndex) const |
| Returns the coordinate of range theIndex : theIndex = 1 => X is returned theIndex = 2 => Y is returned Raises OutOfRange if theIndex != {1, 2}. | |
| constexpr void | Coord (double &theXp, double &theYp) const noexcept |
| For this point returns its two coordinates as a number pair. | |
| constexpr double | X () const noexcept |
| For this point, returns its X coordinate. | |
| constexpr double | Y () const noexcept |
| For this point, returns its Y coordinate. | |
| constexpr const gp_XY & | XY () const noexcept |
| For this point, returns its two coordinates as a number pair. | |
| constexpr const gp_XY & | Coord () const noexcept |
| For this point, returns its two coordinates as a number pair. | |
| constexpr gp_XY & | ChangeCoord () noexcept |
| Returns the coordinates of this point. Note: This syntax allows direct modification of the returned value. | |
| bool | IsEqual (const gp_Pnt2d &theOther, const double theLinearTolerance) const |
| Comparison Returns True if the distance between the two points is lower or equal to theLinearTolerance. | |
| double | Distance (const gp_Pnt2d &theOther) const |
| Computes the distance between two points. | |
| constexpr double | SquareDistance (const gp_Pnt2d &theOther) const noexcept |
| Computes the square distance between two points. | |
| void | Mirror (const gp_Pnt2d &theP) noexcept |
| Performs the symmetrical transformation of a point with respect to the point theP which is the center of the symmetry. | |
| gp_Pnt2d | Mirrored (const gp_Pnt2d &theP) const noexcept |
| Performs the symmetrical transformation of a point with respect to an axis placement which is the axis. | |
| void | Mirror (const gp_Ax2d &theA) noexcept |
| gp_Pnt2d | Mirrored (const gp_Ax2d &theA) const noexcept |
| void | Rotate (const gp_Pnt2d &theP, const double theAng) |
| Rotates a point. theA1 is the axis of the rotation. Ang is the angular value of the rotation in radians. | |
| gp_Pnt2d | Rotated (const gp_Pnt2d &theP, const double theAng) const |
| constexpr void | Scale (const gp_Pnt2d &theP, const double theS) noexcept |
| Scales a point. theS is the scaling value. | |
| constexpr gp_Pnt2d | Scaled (const gp_Pnt2d &theP, const double theS) const noexcept |
| void | Transform (const gp_Trsf2d &theT) noexcept |
| Transforms a point with the transformation theT. | |
| gp_Pnt2d | Transformed (const gp_Trsf2d &theT) const |
| constexpr void | Translate (const gp_Vec2d &theV) noexcept |
| Translates a point in the direction of the vector theV. The magnitude of the translation is the vector's magnitude. | |
| constexpr gp_Pnt2d | Translated (const gp_Vec2d &theV) const noexcept |
| constexpr void | Translate (const gp_Pnt2d &theP1, const gp_Pnt2d &theP2) noexcept |
| Translates a point from the point theP1 to the point theP2. | |
| constexpr gp_Pnt2d | Translated (const gp_Pnt2d &theP1, const gp_Pnt2d &theP2) const noexcept |
| void | DumpJson (Standard_OStream &theOStream, int theDepth=-1) const |
| Dumps the content of me into the stream. | |
Defines a non-persistent 2D cartesian point.
|
constexprdefaultnoexcept |
Creates a point with zero coordinates.
Creates a point with a doublet of coordinates.
Creates a point with its 2 cartesian's coordinates: theXp, theYp.
Returns the coordinates of this point. Note: This syntax allows direct modification of the returned value.
For this point, returns its two coordinates as a number pair.
Returns the coordinate of range theIndex : theIndex = 1 => X is returned theIndex = 2 => Y is returned Raises OutOfRange if theIndex != {1, 2}.
For this point returns its two coordinates as a number pair.
Computes the distance between two points.
| void gp_Pnt2d::DumpJson | ( | Standard_OStream & | theOStream, |
| int | theDepth = -1 ) const |
Dumps the content of me into the stream.
Comparison Returns True if the distance between the two points is lower or equal to theLinearTolerance.
Performs the symmetrical transformation of a point with respect to the point theP which is the center of the symmetry.
Performs the symmetrical transformation of a point with respect to an axis placement which is the axis.
Rotates a point. theA1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
Scales a point. theS is the scaling value.
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
For this point, assigns the values theXp and theYp to its two coordinates.
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}.
Assigns the given value to the X coordinate of this point.
Assigns the two coordinates of Coord to this point.
Assigns the given value to the Y coordinate of this point.
|
inlineconstexprnoexcept |
Computes the square distance between two points.
Transforms a point with the transformation theT.
|
inlineconstexprnoexcept |
Translates a point from the point theP1 to the point theP2.
Translates a point in the direction of the vector theV. The magnitude of the translation is the vector's magnitude.
|
inlineconstexprnoexcept |
For this point, returns its X coordinate.
For this point, returns its two coordinates as a number pair.
For this point, returns its Y coordinate.