![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
Defines the 2D-vector template. The main target for this class - to handle raw low-level arrays (from/to graphic driver etc.). More...
#include <NCollection_Vec2.hxx>
Public Member Functions | |
| constexpr | NCollection_Vec2 () noexcept |
| Empty constructor. Construct the zero vector. | |
| constexpr | NCollection_Vec2 (const Element_t theXY) noexcept |
| Initialize ALL components of vector within specified value. | |
| constexpr | NCollection_Vec2 (const Element_t theX, const Element_t theY) noexcept |
| Per-component constructor. | |
| template<typename OtherElement_t > | |
| constexpr | NCollection_Vec2 (const NCollection_Vec2< OtherElement_t > &theOtherVec2) noexcept |
| Conversion constructor (explicitly converts some 2-component vector with other element type to a new 2-component vector with the element type Element_t, whose elements are static_cast'ed corresponding elements of theOtherVec2 vector) | |
| constexpr void | SetValues (const Element_t theX, const Element_t theY) noexcept |
| Assign new values to the vector. | |
| constexpr Element_t | x () const noexcept |
| Alias to 1st component as X coordinate in XY. | |
| constexpr Element_t | y () const noexcept |
| Alias to 2nd component as Y coordinate in XY. | |
| constexpr Element_t & | x () noexcept |
| Alias to 1st component as X coordinate in XY. | |
| constexpr Element_t & | y () noexcept |
| Alias to 2nd component as Y coordinate in XY. | |
| constexpr bool | IsEqual (const NCollection_Vec2 &theOther) const noexcept |
| Check this vector with another vector for equality (without tolerance!). | |
| constexpr bool | operator== (const NCollection_Vec2 &theOther) const noexcept |
| Check this vector with another vector for equality (without tolerance!). | |
| constexpr bool | operator!= (const NCollection_Vec2 &theOther) const noexcept |
| Check this vector with another vector for non-equality (without tolerance!). | |
| constexpr const Element_t * | GetData () const noexcept |
| Raw access to the data (for OpenGL exchange). | |
| constexpr Element_t * | ChangeData () noexcept |
| constexpr | operator const Element_t * () const noexcept |
| constexpr | operator Element_t * () noexcept |
| constexpr NCollection_Vec2 & | operator+= (const NCollection_Vec2 &theAdd) noexcept |
| Compute per-component summary. | |
| constexpr NCollection_Vec2 & | operator-= (const NCollection_Vec2 &theDec) noexcept |
| Compute per-component subtraction. | |
| constexpr NCollection_Vec2 | operator- () const noexcept |
| Unary -. | |
| constexpr NCollection_Vec2 & | operator*= (const NCollection_Vec2 &theRight) noexcept |
| Compute per-component multiplication. | |
| constexpr void | Multiply (const Element_t theFactor) noexcept |
| Compute per-component multiplication by scale factor. | |
| constexpr NCollection_Vec2 | Multiplied (const Element_t theFactor) const noexcept |
| Compute per-component multiplication by scale factor. | |
| constexpr NCollection_Vec2 | cwiseMin (const NCollection_Vec2 &theVec) const noexcept |
| Compute component-wise minimum of two vectors. | |
| constexpr NCollection_Vec2 | cwiseMax (const NCollection_Vec2 &theVec) const noexcept |
| Compute component-wise maximum of two vectors. | |
| NCollection_Vec2 | cwiseAbs () const noexcept |
| Compute component-wise modulus of the vector. | |
| constexpr Element_t | maxComp () const noexcept |
| Compute maximum component of the vector. | |
| constexpr Element_t | minComp () const noexcept |
| Compute minimum component of the vector. | |
| constexpr NCollection_Vec2 & | operator*= (const Element_t theFactor) noexcept |
| Compute per-component multiplication by scale factor. | |
| constexpr NCollection_Vec2 & | operator/= (const Element_t theInvFactor) |
| Compute per-component division by scale factor. | |
| constexpr NCollection_Vec2 & | operator/= (const NCollection_Vec2 &theRight) |
| Compute per-component division. | |
| constexpr NCollection_Vec2 | operator* (const Element_t theFactor) const noexcept |
| Compute per-component multiplication by scale factor. | |
| constexpr NCollection_Vec2 | operator/ (const Element_t theInvFactor) const |
| Compute per-component division by scale factor. | |
| constexpr Element_t | Dot (const NCollection_Vec2 &theOther) const noexcept |
| Computes the dot product. | |
| Element_t | Modulus () const noexcept |
| Computes the vector modulus (magnitude, length). | |
| constexpr Element_t | SquareModulus () const noexcept |
| Computes the square of vector modulus (magnitude, length). This method may be used for performance tricks. | |
| void | DumpJson (Standard_OStream &theOStream, int theDepth=-1) const |
| Dumps the content of me into the stream. | |
Static Public Member Functions | |
| static constexpr int | Length () noexcept |
| Returns the number of components. | |
| static constexpr NCollection_Vec2 | DX () noexcept |
| Construct DX unit vector. | |
| static constexpr NCollection_Vec2 | DY () noexcept |
| Construct DY unit vector. | |
Defines the 2D-vector template. The main target for this class - to handle raw low-level arrays (from/to graphic driver etc.).
|
inlineconstexprnoexcept |
Empty constructor. Construct the zero vector.
|
inlineexplicitconstexprnoexcept |
Initialize ALL components of vector within specified value.
|
inlineexplicitconstexprnoexcept |
Per-component constructor.
|
inlineexplicitconstexprnoexcept |
Conversion constructor (explicitly converts some 2-component vector with other element type to a new 2-component vector with the element type Element_t, whose elements are static_cast'ed corresponding elements of theOtherVec2 vector)
| OtherElement_t | the element type of the other 2-component vector theOtherVec2 |
| theOtherVec2 | the 2-component vector that needs to be converted |
|
inlineconstexprnoexcept |
|
inlinenoexcept |
Compute component-wise modulus of the vector.
|
inlineconstexprnoexcept |
Compute component-wise maximum of two vectors.
|
inlineconstexprnoexcept |
Compute component-wise minimum of two vectors.
|
inlineconstexprnoexcept |
Computes the dot product.
|
inline |
Dumps the content of me into the stream.
|
inlinestaticconstexprnoexcept |
Construct DX unit vector.
|
inlinestaticconstexprnoexcept |
Construct DY unit vector.
|
inlineconstexprnoexcept |
Raw access to the data (for OpenGL exchange).
|
inlineconstexprnoexcept |
Check this vector with another vector for equality (without tolerance!).
|
inlinestaticconstexprnoexcept |
Returns the number of components.
|
inlineconstexprnoexcept |
Compute maximum component of the vector.
|
inlineconstexprnoexcept |
Compute minimum component of the vector.
|
inlinenoexcept |
Computes the vector modulus (magnitude, length).
|
inlineconstexprnoexcept |
Compute per-component multiplication by scale factor.
|
inlineconstexprnoexcept |
Compute per-component multiplication by scale factor.
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
Check this vector with another vector for non-equality (without tolerance!).
|
inlineconstexprnoexcept |
Compute per-component multiplication by scale factor.
|
inlineconstexprnoexcept |
Compute per-component multiplication by scale factor.
|
inlineconstexprnoexcept |
Compute per-component multiplication.
|
inlineconstexprnoexcept |
Compute per-component summary.
|
inlineconstexprnoexcept |
Unary -.
|
inlineconstexprnoexcept |
Compute per-component subtraction.
|
inlineconstexpr |
Compute per-component division by scale factor.
|
inlineconstexpr |
Compute per-component division by scale factor.
|
inlineconstexpr |
Compute per-component division.
|
inlineconstexprnoexcept |
Check this vector with another vector for equality (without tolerance!).
|
inlineconstexprnoexcept |
Assign new values to the vector.
|
inlineconstexprnoexcept |
Computes the square of vector modulus (magnitude, length). This method may be used for performance tricks.
|
inlineconstexprnoexcept |
Alias to 1st component as X coordinate in XY.
|
inlineconstexprnoexcept |
Alias to 1st component as X coordinate in XY.
|
inlineconstexprnoexcept |
Alias to 2nd component as Y coordinate in XY.
|
inlineconstexprnoexcept |
Alias to 2nd component as Y coordinate in XY.