Unigine::bvec4 Struct
Vector of 4 byte components. This vector is used for vertex color parameters.
To use this structure, include the UnigineMathLib.h file.
Unigine::bvec4Structure
Members
UNIGINE_DECLARE_USE_MEMORY UNIGINE_INLINE bvec4 ()
Default constructor that produces a zero vector.UNIGINE_INLINE bvec4 (const bvec4 & v)
Initialization by a vector.Arguments
- const bvec4 & v - Value of the vector.
UNIGINE_INLINE bvec4 (unsigned char x, unsigned char y, unsigned char z, unsigned char w)
Initialization by scalars.Arguments
- unsigned char x - X component of the vector.
- unsigned char y - Y component of the vector.
- unsigned char z - Z component of the vector.
- unsigned char w - W component of the vector.
UNIGINE_INLINE bvec4 ()
Initialization by a vector and multiplier.explicit UNIGINE_INLINE bvec4 (unsigned char v)
Initialization by a scalar.Arguments
- unsigned char v - Value of the scalar.
explicit UNIGINE_INLINE bvec4 (const vec4 & v)
Initialization by a vector.Arguments
- const vec4 & v - Value of the vector.
explicit UNIGINE_INLINE bvec4 (const dvec4 & v)
Initialization by a vector of double components.Arguments
- const dvec4 & v - Value of the vector.
explicit UNIGINE_INLINE bvec4 (const ivec4 & v)
Initialization by a vector of integer components.Arguments
- const ivec4 & v - Value of the vector.
explicit UNIGINE_INLINE bvec4 (const unsigned char * v)
Initialization by a pointer to the vector.Arguments
- const unsigned char * v - Pointer to the vector.
UNIGINE_INLINE unsigned char & operator[] (int i)
Array access.Arguments
- int i - Array item index.
Return value
Array item.UNIGINE_INLINE unsigned char operator[] (int i) const
Constant array access.Arguments
- int i - Array item index.
Return value
Array item.UNIGINE_INLINE void set (unsigned char x_, unsigned char y_, unsigned char z_, unsigned char w_)
Set vector.Arguments
- unsigned char x_ - X component of the vector.
- unsigned char y_ - Y component of the vector.
- unsigned char z_ - Z component of the vector.
- unsigned char w_ - W component of the vector.
UNIGINE_INLINE void set (const unsigned char * v)
Set vector.Arguments
- const unsigned char * v - Pointer to the vector.
UNIGINE_INLINE void set ()
Set vector.UNIGINE_INLINE unsigned char * get ()
Get a pointer to the vector.Return value
Pointer to the vector.UNIGINE_INLINE const unsigned char * get () const
Get a constant pointer to the vector.Return value
Pointer to the vector.Last update: 2017-07-03
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)