This page has been translated automatically.
Programming
Fundamentals
Setting Up Development Environment
UnigineScript
High-Level Systems
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
Rendering-Related Classes
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Unigine::bvec4 Struct

Header:#include <UnigineMathLib.h>

Vector of 4 byte components. This vector is used for vertex color parameters.

To use this structure, include the UnigineMathLib.h file.

bvec4 Class

Members


bvec4()

Default constructor that produces a zero vector.

bvec4(const bvec4 & v)

Initialization by a vector.

Arguments

  • const bvec4 & v - Value of the vector.

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.

bvec4()

Initialization by a vector and multiplier.

explicit bvec4(unsigned char v)

Initialization by a scalar.

Arguments

  • unsigned char v - Value of the scalar.

explicit bvec4(const vec4 & v)

Initialization by a vector.

Arguments

  • const vec4 & v - Value of the vector.

explicit bvec4(const dvec4 & v)

Initialization by a vector of double components.

Arguments

  • const dvec4 & v - Value of the vector.

explicit bvec4(const ivec4 & v)

Initialization by a vector of integer components.

Arguments

  • const ivec4 & v - Value of the vector.

explicit bvec4(const unsigned char * v)

Initialization by a pointer to the vector.

Arguments

  • const unsigned char * v - Pointer to the vector.

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.

void set(const unsigned char * val)

Set vector.

Arguments

  • const unsigned char * val - Pointer to the vector.

void set(unsigned char val)

Arguments

  • unsigned char val

void set(const bvec4 & val)

Arguments

  • const bvec4 & val

void set(const vec4 & val, float scale)

Arguments

  • const vec4 & val
  • float scale

unsigned char * get()

Get a pointer to the vector.

Return value

Pointer to the vector.

const unsigned char * get() const

Get a constant pointer to the vector.

Return value

Pointer to the vector.

void get(unsigned char * val)

Arguments

  • unsigned char * val

const unsigned char * operator const unsigned char *()

const void * operator const void *()

unsigned char * operator unsigned char *()

void * operator void *()

bvec4 & operator=(const bvec4 & val)

Arguments

  • const bvec4 & val

unsigned char & operator[](int i)

Array access.

Arguments

  • int i - Array item index.

Return value

Array item.

unsigned char operator[](int i) const

Constant array access.

Arguments

  • int i - Array item index.

Return value

Array item.

int ONE

int ZERO

Last update: 2017-07-03
Build: ()