This page has been translated automatically.
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
Usage Examples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Migration
Migrating to UNIGINE 2.0
C++ API Migration
Migrating from UNIGINE 2.0 to UNIGINE 2.1
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

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::bvec4 Structure

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.

Unigine::bvec4:: Union

union {
struct {
unsigned char x;
unsigned char y;
unsigned char z;
unsigned char w;
};
unsigned char v[4];
};
Last update: 03.07.2017
Build: ()