Open CASCADE Technology
7.3.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 | |
NCollection_Vec2 () | |
Empty constructor. Construct the zero vector. More... | |
NCollection_Vec2 (const Element_t theXY) | |
Initialize ALL components of vector within specified value. More... | |
NCollection_Vec2 (const Element_t theX, const Element_t theY) | |
Per-component constructor. More... | |
void | SetValues (const Element_t theX, const Element_t theY) |
Assign new values to the vector. More... | |
Element_t | x () const |
Alias to 1st component as X coordinate in XY. More... | |
Element_t | y () const |
Alias to 2nd component as Y coordinate in XY. More... | |
Element_t & | x () |
Alias to 1st component as X coordinate in XY. More... | |
Element_t & | y () |
Alias to 2nd component as Y coordinate in XY. More... | |
bool | IsEqual (const NCollection_Vec2 &theOther) const |
Check this vector with another vector for equality (without tolerance!). More... | |
bool | operator== (const NCollection_Vec2 &theOther) |
Check this vector with another vector for equality (without tolerance!). More... | |
bool | operator== (const NCollection_Vec2 &theOther) const |
bool | operator!= (const NCollection_Vec2 &theOther) |
Check this vector with another vector for non-equality (without tolerance!). More... | |
bool | operator!= (const NCollection_Vec2 &theOther) const |
const Element_t * | GetData () const |
Raw access to the data (for OpenGL exchange). More... | |
Element_t * | ChangeData () |
operator const Element_t * () const | |
operator Element_t * () | |
NCollection_Vec2 & | operator+= (const NCollection_Vec2 &theAdd) |
Compute per-component summary. More... | |
NCollection_Vec2 & | operator-= (const NCollection_Vec2 &theDec) |
Compute per-component subtraction. More... | |
NCollection_Vec2 | operator- () const |
Unary -. More... | |
NCollection_Vec2 & | operator*= (const NCollection_Vec2 &theRight) |
Compute per-component multiplication. More... | |
void | Multiply (const Element_t theFactor) |
Compute per-component multiplication by scale factor. More... | |
NCollection_Vec2 | Multiplied (const Element_t theFactor) const |
Compute per-component multiplication by scale factor. More... | |
NCollection_Vec2 | cwiseMin (const NCollection_Vec2 &theVec) const |
Compute component-wise minimum of two vectors. More... | |
NCollection_Vec2 | cwiseMax (const NCollection_Vec2 &theVec) const |
Compute component-wise maximum of two vectors. More... | |
NCollection_Vec2 | cwiseAbs () const |
Compute component-wise modulus of the vector. More... | |
Element_t | maxComp () const |
Compute maximum component of the vector. More... | |
Element_t | minComp () const |
Compute minimum component of the vector. More... | |
NCollection_Vec2 & | operator*= (const Element_t theFactor) |
Compute per-component multiplication by scale factor. More... | |
NCollection_Vec2 & | operator/= (const Element_t theInvFactor) |
Compute per-component division by scale factor. More... | |
NCollection_Vec2 | operator* (const Element_t theFactor) const |
Compute per-component multiplication by scale factor. More... | |
NCollection_Vec2 | operator/ (const Element_t theInvFactor) const |
Compute per-component division by scale factor. More... | |
Element_t | Dot (const NCollection_Vec2 &theOther) const |
Computes the dot product. More... | |
Element_t | Modulus () const |
Computes the vector modulus (magnitude, length). More... | |
Element_t | SquareModulus () const |
Computes the square of vector modulus (magnitude, length). This method may be used for performance tricks. More... | |
Static Public Member Functions | |
static int | Length () |
Returns the number of components. More... | |
static NCollection_Vec2 | DX () |
Constuct DX unit vector. More... | |
static NCollection_Vec2 | DY () |
Constuct DY unit vector. More... | |
Friends | |
NCollection_Vec2 | operator+ (const NCollection_Vec2 &theLeft, const NCollection_Vec2 &theRight) |
Compute per-component summary. More... | |
NCollection_Vec2 | operator- (const NCollection_Vec2 &theLeft, const NCollection_Vec2 &theRight) |
Compute per-component subtraction. More... | |
NCollection_Vec2 | operator* (const NCollection_Vec2 &theLeft, const NCollection_Vec2 &theRight) |
Compute per-component multiplication. More... | |
Defines the 2D-vector template. The main target for this class - to handle raw low-level arrays (from/to graphic driver etc.).
|
inline |
Empty constructor. Construct the zero vector.
|
inlineexplicit |
Initialize ALL components of vector within specified value.
|
inlineexplicit |
Per-component constructor.
|
inline |
|
inline |
Compute component-wise modulus of the vector.
|
inline |
Compute component-wise maximum of two vectors.
|
inline |
Compute component-wise minimum of two vectors.
|
inline |
Computes the dot product.
|
inlinestatic |
Constuct DX unit vector.
|
inlinestatic |
Constuct DY unit vector.
|
inline |
Raw access to the data (for OpenGL exchange).
|
inline |
Check this vector with another vector for equality (without tolerance!).
|
inlinestatic |
Returns the number of components.
|
inline |
Compute maximum component of the vector.
|
inline |
Compute minimum component of the vector.
|
inline |
Computes the vector modulus (magnitude, length).
|
inline |
Compute per-component multiplication by scale factor.
|
inline |
Compute per-component multiplication by scale factor.
|
inline |
|
inline |
|
inline |
Check this vector with another vector for non-equality (without tolerance!).
|
inline |
|
inline |
Compute per-component multiplication by scale factor.
|
inline |
Compute per-component multiplication.
|
inline |
Compute per-component multiplication by scale factor.
|
inline |
Compute per-component summary.
|
inline |
Unary -.
|
inline |
Compute per-component subtraction.
|
inline |
Compute per-component division by scale factor.
|
inline |
Compute per-component division by scale factor.
|
inline |
Check this vector with another vector for equality (without tolerance!).
|
inline |
|
inline |
Assign new values to the vector.
|
inline |
Computes the square of vector modulus (magnitude, length). This method may be used for performance tricks.
|
inline |
Alias to 1st component as X coordinate in XY.
|
inline |
Alias to 1st component as X coordinate in XY.
|
inline |
Alias to 2nd component as Y coordinate in XY.
|
inline |
Alias to 2nd component as Y coordinate in XY.
|
friend |
Compute per-component multiplication.
|
friend |
Compute per-component summary.
|
friend |
Compute per-component subtraction.