![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
This class describes a cartesian coordinate entity in 2D space {X,Y}. This class is non persistent. This entity used for algebraic calculation. An XY can be transformed with a Trsf2d or a GTrsf2d from package gp. It is used in vectorial computations or for holding this type of information in data structures. More...
#include <gp_XY.hxx>
Public Member Functions | |
| constexpr | gp_XY () noexcept |
| Creates XY object with zero coordinates (0,0). | |
| constexpr | gp_XY (const double theX, const double theY) noexcept |
| a number pair defined by the XY coordinates | |
| constexpr void | SetCoord (const int theIndex, const double theXi) |
| modifies the coordinate of range theIndex theIndex = 1 => X is modified theIndex = 2 => Y is modified Raises OutOfRange if theIndex != {1, 2}. | |
| constexpr void | SetCoord (const double theX, const double theY) noexcept |
| For this number pair, assigns the values theX and theY to its coordinates. | |
| constexpr void | SetX (const double theX) noexcept |
| Assigns the given value to the X coordinate of this number pair. | |
| constexpr void | SetY (const double theY) noexcept |
| Assigns the given value to the Y coordinate of this number pair. | |
| 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 double & | ChangeCoord (const int theIndex) |
| constexpr void | Coord (double &theX, double &theY) const noexcept |
| For this number pair, returns its coordinates X and Y. | |
| constexpr double | X () const noexcept |
| Returns the X coordinate of this number pair. | |
| constexpr double | Y () const noexcept |
| Returns the Y coordinate of this number pair. | |
| double | Modulus () const |
| Computes std::sqrt(X*X + Y*Y) where X and Y are the two coordinates of this number pair. | |
| constexpr double | SquareModulus () const noexcept |
| Computes X*X + Y*Y where X and Y are the two coordinates of this number pair. | |
| bool | IsEqual (const gp_XY &theOther, const double theTolerance) const |
| Returns true if the coordinates of this number pair are equal to the respective coordinates of the number pair theOther, within the specified tolerance theTolerance. | |
| constexpr void | Add (const gp_XY &theOther) noexcept |
| Computes the sum of this number pair and number pair theOther. | |
| constexpr void | operator+= (const gp_XY &theOther) noexcept |
| constexpr gp_XY | Added (const gp_XY &theOther) const noexcept |
| Computes the sum of this number pair and number pair theOther. | |
| constexpr gp_XY | operator+ (const gp_XY &theOther) const noexcept |
| constexpr double | Crossed (const gp_XY &theOther) const noexcept |
| constexpr double | operator^ (const gp_XY &theOther) const noexcept |
| double | CrossMagnitude (const gp_XY &theRight) const |
| computes the magnitude of the cross product between <me> and theRight. Returns || <me> ^ theRight || | |
| constexpr double | CrossSquareMagnitude (const gp_XY &theRight) const noexcept |
| computes the square magnitude of the cross product between <me> and theRight. Returns || <me> ^ theRight ||**2 | |
| constexpr void | Divide (const double theScalar) |
| divides <me> by a real. | |
| constexpr void | operator/= (const double theScalar) |
| constexpr gp_XY | Divided (const double theScalar) const |
| Divides <me> by a real. | |
| constexpr gp_XY | operator/ (const double theScalar) const |
| constexpr double | Dot (const gp_XY &theOther) const noexcept |
| Computes the scalar product between <me> and theOther. | |
| constexpr double | operator* (const gp_XY &theOther) const noexcept |
| constexpr void | Multiply (const double theScalar) noexcept |
| constexpr void | operator*= (const double theScalar) noexcept |
| constexpr void | Multiply (const gp_XY &theOther) noexcept |
| constexpr void | operator*= (const gp_XY &theOther) noexcept |
| constexpr void | Multiply (const gp_Mat2d &theMatrix) noexcept |
| <me> = theMatrix * <me> | |
| constexpr void | operator*= (const gp_Mat2d &theMatrix) noexcept |
| constexpr gp_XY | Multiplied (const double theScalar) const noexcept |
| constexpr gp_XY | operator* (const double theScalar) const noexcept |
| constexpr gp_XY | Multiplied (const gp_XY &theOther) const noexcept |
| constexpr gp_XY | Multiplied (const gp_Mat2d &theMatrix) const noexcept |
| New = theMatrix * <me> | |
| constexpr gp_XY | operator* (const gp_Mat2d &theMatrix) const noexcept |
| void | Normalize () |
| gp_XY | Normalized () const |
| constexpr void | Reverse () noexcept |
| constexpr gp_XY | Reversed () const noexcept |
| constexpr gp_XY | operator- () const noexcept |
| constexpr void | SetLinearForm (const double theA1, const gp_XY &theXY1, const double theA2, const gp_XY &theXY2) noexcept |
| Computes the following linear combination and assigns the result to this number pair: | |
| constexpr void | SetLinearForm (const double theA1, const gp_XY &theXY1, const double theA2, const gp_XY &theXY2, const gp_XY &theXY3) noexcept |
| Computes the following linear combination and assigns the result to this number pair: | |
| constexpr void | SetLinearForm (const double theA1, const gp_XY &theXY1, const gp_XY &theXY2) noexcept |
| Computes the following linear combination and assigns the result to this number pair: | |
| constexpr void | SetLinearForm (const gp_XY &theXY1, const gp_XY &theXY2) noexcept |
| Computes the following linear combination and assigns the result to this number pair: | |
| constexpr void | Subtract (const gp_XY &theOther) noexcept |
| constexpr void | operator-= (const gp_XY &theOther) noexcept |
| constexpr gp_XY | Subtracted (const gp_XY &theOther) const noexcept |
| constexpr gp_XY | operator- (const gp_XY &theOther) const noexcept |
This class describes a cartesian coordinate entity in 2D space {X,Y}. This class is non persistent. This entity used for algebraic calculation. An XY can be transformed with a Trsf2d or a GTrsf2d from package gp. It is used in vectorial computations or for holding this type of information in data structures.
|
inlineconstexprnoexcept |
Creates XY object with zero coordinates (0,0).
a number pair defined by the XY coordinates
returns the coordinate of range theIndex : theIndex = 1 => X is returned theIndex = 2 => Y is returned Raises OutOfRange if theIndex != {1, 2}.
For this number pair, returns its coordinates X and Y.
computes the magnitude of the cross product between <me> and theRight. Returns || <me> ^ theRight ||
|
inlineconstexprnoexcept |
computes the square magnitude of the cross product between <me> and theRight. Returns || <me> ^ theRight ||**2
Divides <me> by a real.
Computes the scalar product between <me> and theOther.
Returns true if the coordinates of this number pair are equal to the respective coordinates of the number pair theOther, within the specified tolerance theTolerance.
|
inline |
Computes std::sqrt(X*X + Y*Y) where X and Y are the two coordinates of this number pair.
New = theMatrix * <me>
<me> = theMatrix * <me>
|
inline |
|
inline |
For this number pair, assigns the values theX and theY to its coordinates.
modifies the coordinate of range 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 number pair.
Assigns the given value to the Y coordinate of this number pair.
Computes X*X + Y*Y where X and Y are the two coordinates of this number pair.
Returns the X coordinate of this number pair.
Returns the Y coordinate of this number pair.