Open CASCADE Technology 6.6.0
|
Generic 3-components vector. To be used as RGB color pixel or XYZ 3D-point. The main target for this class - to handle raw low-level arrays (from/to graphic driver etc.).
#include <NCollection_Vec3.hxx>
Public Member Functions | |
NCollection_Vec3 () | |
Empty constructor. Construct the zero vector. | |
NCollection_Vec3 (Element_t theValue) | |
Initialize ALL components of vector within specified value. | |
NCollection_Vec3 (const Element_t theX, const Element_t theY, const Element_t theZ) | |
Per-component constructor. | |
NCollection_Vec3 (const NCollection_Vec2< Element_t > &theVec2) | |
Constructor from 2-components vector. | |
NCollection_Vec3 (const NCollection_Vec3 &theVec3) | |
Copy constructor. | |
const NCollection_Vec3 & | operator= (const NCollection_Vec3 &theVec3) |
Assignment operator. | |
Element_t | x () const |
Alias to 1st component as X coordinate in XYZ. | |
Element_t | r () const |
Alias to 1st component as RED channel in RGB. | |
Element_t | y () const |
Alias to 2nd component as Y coordinate in XYZ. | |
Element_t | g () const |
Alias to 2nd component as GREEN channel in RGB. | |
Element_t | z () const |
Alias to 3rd component as Z coordinate in XYZ. | |
Element_t | b () const |
Alias to 3rd component as BLUE channel in RGB. | |
NCOLLECTION_VEC_COMPONENTS_2D (x, y) | |
NCOLLECTION_VEC_COMPONENTS_2D (x, z) | |
NCOLLECTION_VEC_COMPONENTS_2D (y, z) | |
NCOLLECTION_VEC_COMPONENTS_3D (x, y, z) | |
Element_t & | x () |
Alias to 1st component as X coordinate in XYZ. | |
Element_t & | r () |
Alias to 1st component as RED channel in RGB. | |
Element_t & | y () |
Alias to 2nd component as Y coordinate in XYZ. | |
Element_t & | g () |
Alias to 2nd component as GREEN channel in RGB. | |
Element_t & | z () |
Alias to 3rd component as Z coordinate in XYZ. | |
Element_t & | b () |
Alias to 3rd component as BLUE channel in RGB. | |
NCollection_Vec2< Element_t > & | xy () |
NCollection_Vec2< Element_t > & | yz () |
const Element_t * | GetData () const |
Raw access to the data (for OpenGL exchange). | |
operator const Element_t * () const | |
operator Element_t * () | |
NCollection_Vec3 & | operator+= (const NCollection_Vec3 &theAdd) |
Compute per-component summary. | |
NCollection_Vec3 | operator- () const |
Unary -. | |
NCollection_Vec3 & | operator-= (const NCollection_Vec3 &theDec) |
Compute per-component subtraction. | |
void | Multiply (const Element_t theFactor) |
Compute per-component multiplication by scale factor. | |
NCollection_Vec3 & | operator*= (const NCollection_Vec3 &theRight) |
Compute per-component multiplication. | |
NCollection_Vec3 & | operator*= (const Element_t theFactor) |
Compute per-component multiplication by scale factor. | |
NCollection_Vec3 | operator* (const Element_t theFactor) const |
Compute per-component multiplication by scale factor. | |
NCollection_Vec3 | Multiplied (const Element_t theFactor) const |
Compute per-component multiplication by scale factor. | |
NCollection_Vec3 & | operator/= (const Element_t theInvFactor) |
Compute per-component division by scale factor. | |
NCollection_Vec3 | operator/ (const Element_t theInvFactor) |
Compute per-component division by scale factor. | |
Element_t | Dot (const NCollection_Vec3 &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. | |
void | Normalize () |
Normalize the vector. | |
NCollection_Vec3 | Normalized () const |
Normalize the vector. | |
template<> | |
NCollection_Vec3< double > & | operator/= (const double theInvFactor) |
Static Public Member Functions | |
static int | Length () |
Returns the number of components. | |
static NCollection_Vec3 | Cross (const NCollection_Vec3 &theVec1, const NCollection_Vec3 &theVec2) |
Computes the cross product. | |
static NCollection_Vec3 | GetLERP (const NCollection_Vec3 &theFrom, const NCollection_Vec3 &theTo, const Element_t theT) |
Compute linear interpolation between to vectors. | |
static NCollection_Vec3 | DX () |
Constuct DX unit vector. | |
static NCollection_Vec3 | DY () |
Constuct DY unit vector. | |
static NCollection_Vec3 | DZ () |
Constuct DZ unit vector. | |
Friends | |
NCollection_Vec3 | operator+ (const NCollection_Vec3 &theLeft, const NCollection_Vec3 &theRight) |
Compute per-component summary. | |
NCollection_Vec3 | operator- (const NCollection_Vec3 &theLeft, const NCollection_Vec3 &theRight) |
Compute per-component subtraction. | |
NCollection_Vec3 | operator* (const NCollection_Vec3 &theLeft, const NCollection_Vec3 &theRight) |
Compute per-component multiplication. |
NCollection_Vec3< Element_t >::NCollection_Vec3 | ( | ) | [inline] |
NCollection_Vec3< Element_t >::NCollection_Vec3 | ( | Element_t | theValue | ) | [inline, explicit] |
NCollection_Vec3< Element_t >::NCollection_Vec3 | ( | const Element_t | theX, |
const Element_t | theY, | ||
const Element_t | theZ | ||
) | [inline, explicit] |
NCollection_Vec3< Element_t >::NCollection_Vec3 | ( | const NCollection_Vec2< Element_t > & | theVec2 | ) | [inline, explicit] |
NCollection_Vec3< Element_t >::NCollection_Vec3 | ( | const NCollection_Vec3< Element_t > & | theVec3 | ) | [inline] |
Element_t NCollection_Vec3< Element_t >::b | ( | ) | const [inline] |
Element_t& NCollection_Vec3< Element_t >::b | ( | ) | [inline] |
static NCollection_Vec3 NCollection_Vec3< Element_t >::Cross | ( | const NCollection_Vec3< Element_t > & | theVec1, |
const NCollection_Vec3< Element_t > & | theVec2 | ||
) | [inline, static] |
Element_t NCollection_Vec3< Element_t >::Dot | ( | const NCollection_Vec3< Element_t > & | theOther | ) | const [inline] |
static NCollection_Vec3 NCollection_Vec3< Element_t >::DX | ( | ) | [inline, static] |
static NCollection_Vec3 NCollection_Vec3< Element_t >::DY | ( | ) | [inline, static] |
static NCollection_Vec3 NCollection_Vec3< Element_t >::DZ | ( | ) | [inline, static] |
Element_t NCollection_Vec3< Element_t >::g | ( | ) | const [inline] |
Element_t& NCollection_Vec3< Element_t >::g | ( | ) | [inline] |
const Element_t* NCollection_Vec3< Element_t >::GetData | ( | ) | const [inline] |
static NCollection_Vec3 NCollection_Vec3< Element_t >::GetLERP | ( | const NCollection_Vec3< Element_t > & | theFrom, |
const NCollection_Vec3< Element_t > & | theTo, | ||
const Element_t | theT | ||
) | [inline, static] |
theT | - interpolation coefficient 0..1; |
static int NCollection_Vec3< Element_t >::Length | ( | void | ) | [inline, static] |
Element_t NCollection_Vec3< Element_t >::Modulus | ( | ) | const [inline] |
NCollection_Vec3 NCollection_Vec3< Element_t >::Multiplied | ( | const Element_t | theFactor | ) | const [inline] |
void NCollection_Vec3< Element_t >::Multiply | ( | const Element_t | theFactor | ) | [inline] |
NCollection_Vec3< Element_t >::NCOLLECTION_VEC_COMPONENTS_2D | ( | x | , |
y | |||
) |
NCollection_Vec3< Element_t >::NCOLLECTION_VEC_COMPONENTS_2D | ( | x | , |
z | |||
) |
NCollection_Vec3< Element_t >::NCOLLECTION_VEC_COMPONENTS_2D | ( | y | , |
z | |||
) |
NCollection_Vec3< Element_t >::NCOLLECTION_VEC_COMPONENTS_3D | ( | x | , |
y | , | ||
z | |||
) |
void NCollection_Vec3< Element_t >::Normalize | ( | ) | [inline] |
NCollection_Vec3 NCollection_Vec3< Element_t >::Normalized | ( | ) | const [inline] |
NCollection_Vec3< Element_t >::operator const Element_t * | ( | ) | const [inline] |
NCollection_Vec3< Element_t >::operator Element_t * | ( | ) | [inline] |
NCollection_Vec3 NCollection_Vec3< Element_t >::operator* | ( | const Element_t | theFactor | ) | const [inline] |
NCollection_Vec3& NCollection_Vec3< Element_t >::operator*= | ( | const Element_t | theFactor | ) | [inline] |
NCollection_Vec3& NCollection_Vec3< Element_t >::operator*= | ( | const NCollection_Vec3< Element_t > & | theRight | ) | [inline] |
NCollection_Vec3& NCollection_Vec3< Element_t >::operator+= | ( | const NCollection_Vec3< Element_t > & | theAdd | ) | [inline] |
NCollection_Vec3 NCollection_Vec3< Element_t >::operator- | ( | ) | const [inline] |
NCollection_Vec3& NCollection_Vec3< Element_t >::operator-= | ( | const NCollection_Vec3< Element_t > & | theDec | ) | [inline] |
NCollection_Vec3 NCollection_Vec3< Element_t >::operator/ | ( | const Element_t | theInvFactor | ) | [inline] |
NCollection_Vec3& NCollection_Vec3< Element_t >::operator/= | ( | const Element_t | theInvFactor | ) | [inline] |
NCollection_Vec3< double > & NCollection_Vec3< double >::operator/= | ( | const double | theInvFactor | ) | [inline] |
const NCollection_Vec3& NCollection_Vec3< Element_t >::operator= | ( | const NCollection_Vec3< Element_t > & | theVec3 | ) | [inline] |
Element_t& NCollection_Vec3< Element_t >::r | ( | ) | [inline] |
Element_t NCollection_Vec3< Element_t >::r | ( | ) | const [inline] |
Element_t NCollection_Vec3< Element_t >::SquareModulus | ( | ) | const [inline] |
Element_t& NCollection_Vec3< Element_t >::x | ( | ) | [inline] |
Element_t NCollection_Vec3< Element_t >::x | ( | ) | const [inline] |
NCollection_Vec2<Element_t>& NCollection_Vec3< Element_t >::xy | ( | ) | [inline] |
Element_t& NCollection_Vec3< Element_t >::y | ( | ) | [inline] |
Element_t NCollection_Vec3< Element_t >::y | ( | ) | const [inline] |
NCollection_Vec2<Element_t>& NCollection_Vec3< Element_t >::yz | ( | ) | [inline] |
Element_t& NCollection_Vec3< Element_t >::z | ( | ) | [inline] |
Element_t NCollection_Vec3< Element_t >::z | ( | ) | const [inline] |
NCollection_Vec3 operator* | ( | const NCollection_Vec3< Element_t > & | theLeft, |
const NCollection_Vec3< Element_t > & | theRight | ||
) | [friend] |
NCollection_Vec3 operator+ | ( | const NCollection_Vec3< Element_t > & | theLeft, |
const NCollection_Vec3< Element_t > & | theRight | ||
) | [friend] |
NCollection_Vec3 operator- | ( | const NCollection_Vec3< Element_t > & | theLeft, |
const NCollection_Vec3< Element_t > & | theRight | ||
) | [friend] |