Open CASCADE Technology
6.5.4
|
Defines the 2D-vector template. The main target for this class - to handle raw low-level arrays (from/to graphic driver etc.).
#include <NCollection_Vec2.hxx>
Public Member Functions | |
NCollection_Vec2 () | |
Empty constructor. Construct the zero vector. | |
NCollection_Vec2 (const Element_t theXY) | |
Initialize ALL components of vector within specified value. | |
NCollection_Vec2 (const Element_t theX, const Element_t theY) | |
Per-component constructor. | |
NCollection_Vec2 (const NCollection_Vec2 &theVec2) | |
Copy constructor. | |
const NCollection_Vec2 & | operator= (const NCollection_Vec2 &theVec2) |
Assignment operator. | |
Element_t | x () const |
Alias to 1st component as X coordinate in XY. | |
Element_t | y () const |
Alias to 2nd component as Y coordinate in XY. | |
NCOLLECTION_VEC_COMPONENTS_2D (x, y) | |
Element_t & | x () |
Alias to 1st component as X coordinate in XY. | |
Element_t & | y () |
Alias to 2nd component as Y coordinate in XY. | |
const Element_t * | GetData () const |
Raw access to the data (to simplify OpenGL exchange). | |
operator const Element_t * () const | |
operator Element_t * () | |
NCollection_Vec2 & | operator+= (const NCollection_Vec2 &theAdd) |
Compute per-component summary. | |
NCollection_Vec2 & | operator-= (const NCollection_Vec2 &theDec) |
Compute per-component subtraction. | |
NCollection_Vec2 | operator- () const |
Unary -. | |
NCollection_Vec2 & | operator*= (const NCollection_Vec2 &theRight) |
Compute per-component multiplication. | |
void | Multiply (const Element_t theFactor) |
Compute per-component multiplication by scale factor. | |
NCollection_Vec2 | Multiplied (const Element_t theFactor) const |
Compute per-component multiplication by scale factor. | |
NCollection_Vec2 & | operator*= (const Element_t theFactor) |
Compute per-component multiplication by scale factor. | |
NCollection_Vec2 & | operator/= (const Element_t theInvFactor) |
Compute per-component division by scale factor. | |
NCollection_Vec2 | operator* (const Element_t theFactor) const |
Compute per-component multiplication by scale factor. | |
NCollection_Vec2 | operator/ (const Element_t theInvFactor) const |
Compute per-component division by scale factor. | |
Element_t | Dot (const NCollection_Vec2 &theOther) const |
Computes the dot product. | |
Element_t | Modulus () const |
Computes the vector modulus (magnitude, length). | |
Element_t | SquareModulus () const |
Computes the square of vector modulus (magnitude, length). This method may be used for performance tricks. | |
Static Public Member Functions | |
static int | Length () |
Returns the number of components. | |
static NCollection_Vec2 | DX () |
Constuct DX unit vector. | |
static NCollection_Vec2 | DY () |
Constuct DY unit vector. | |
Friends | |
NCollection_Vec2 | operator+ (const NCollection_Vec2 &theLeft, const NCollection_Vec2 &theRight) |
Compute per-component summary. | |
NCollection_Vec2 | operator- (const NCollection_Vec2 &theLeft, const NCollection_Vec2 &theRight) |
Compute per-component subtraction. | |
NCollection_Vec2 | operator* (const NCollection_Vec2 &theLeft, const NCollection_Vec2 &theRight) |
Compute per-component multiplication. |
NCollection_Vec2< Element_t >::NCollection_Vec2 | ( | ) | [inline] |
NCollection_Vec2< Element_t >::NCollection_Vec2 | ( | const Element_t | theXY | ) | [inline, explicit] |
NCollection_Vec2< Element_t >::NCollection_Vec2 | ( | const Element_t | theX, |
const Element_t | theY | ||
) | [inline, explicit] |
NCollection_Vec2< Element_t >::NCollection_Vec2 | ( | const NCollection_Vec2< Element_t > & | theVec2 | ) | [inline] |
Element_t NCollection_Vec2< Element_t >::Dot | ( | const NCollection_Vec2< Element_t > & | theOther | ) | const [inline] |
static NCollection_Vec2 NCollection_Vec2< Element_t >::DX | ( | ) | [inline, static] |
static NCollection_Vec2 NCollection_Vec2< Element_t >::DY | ( | ) | [inline, static] |
const Element_t* NCollection_Vec2< Element_t >::GetData | ( | ) | const [inline] |
static int NCollection_Vec2< Element_t >::Length | ( | void | ) | [inline, static] |
Element_t NCollection_Vec2< Element_t >::Modulus | ( | ) | const [inline] |
NCollection_Vec2 NCollection_Vec2< Element_t >::Multiplied | ( | const Element_t | theFactor | ) | const [inline] |
void NCollection_Vec2< Element_t >::Multiply | ( | const Element_t | theFactor | ) | [inline] |
NCollection_Vec2< Element_t >::NCOLLECTION_VEC_COMPONENTS_2D | ( | x | , |
y | |||
) |
NCollection_Vec2< Element_t >::operator const Element_t * | ( | ) | const [inline] |
NCollection_Vec2< Element_t >::operator Element_t * | ( | ) | [inline] |
NCollection_Vec2 NCollection_Vec2< Element_t >::operator* | ( | const Element_t | theFactor | ) | const [inline] |
NCollection_Vec2& NCollection_Vec2< Element_t >::operator*= | ( | const NCollection_Vec2< Element_t > & | theRight | ) | [inline] |
NCollection_Vec2& NCollection_Vec2< Element_t >::operator*= | ( | const Element_t | theFactor | ) | [inline] |
NCollection_Vec2& NCollection_Vec2< Element_t >::operator+= | ( | const NCollection_Vec2< Element_t > & | theAdd | ) | [inline] |
NCollection_Vec2 NCollection_Vec2< Element_t >::operator- | ( | ) | const [inline] |
NCollection_Vec2& NCollection_Vec2< Element_t >::operator-= | ( | const NCollection_Vec2< Element_t > & | theDec | ) | [inline] |
NCollection_Vec2 NCollection_Vec2< Element_t >::operator/ | ( | const Element_t | theInvFactor | ) | const [inline] |
NCollection_Vec2& NCollection_Vec2< Element_t >::operator/= | ( | const Element_t | theInvFactor | ) | [inline] |
const NCollection_Vec2& NCollection_Vec2< Element_t >::operator= | ( | const NCollection_Vec2< Element_t > & | theVec2 | ) | [inline] |
Element_t NCollection_Vec2< Element_t >::SquareModulus | ( | ) | const [inline] |
Element_t NCollection_Vec2< Element_t >::x | ( | ) | const [inline] |
Element_t& NCollection_Vec2< Element_t >::x | ( | ) | [inline] |
Element_t NCollection_Vec2< Element_t >::y | ( | ) | const [inline] |
Element_t& NCollection_Vec2< Element_t >::y | ( | ) | [inline] |
NCollection_Vec2 operator* | ( | const NCollection_Vec2< Element_t > & | theLeft, |
const NCollection_Vec2< Element_t > & | theRight | ||
) | [friend] |
NCollection_Vec2 operator+ | ( | const NCollection_Vec2< Element_t > & | theLeft, |
const NCollection_Vec2< Element_t > & | theRight | ||
) | [friend] |
NCollection_Vec2 operator- | ( | const NCollection_Vec2< Element_t > & | theLeft, |
const NCollection_Vec2< Element_t > & | theRight | ||
) | [friend] |