This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
Extending Editor Functionality
编程
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
应用程序接口
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine::Math::bvec4 Struct

Header: #include <UnigineMathLib.h>

This class represents a vector of 4 byte (unsigned char) components. This vector is used for vertex color parameters.

bvec4 Class

Members


bvec4 ( ) #

Default constructor. Produces a zero vector.

bvec4 ( const bvec4 & v ) #

Constructor. Initializes the vector by copying a given source vector.

Arguments

  • const bvec4 & v - Source vector.

bvec4 ( unsigned char x, unsigned char y, unsigned char z, unsigned char w ) #

Constructor. Initializes the vector using given unsigned char values.

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 ( const vec4 & v, float scale ) #

Constructor. Initializes the vector using a given vec4 source vector and a scale multiplier.

Arguments

  • const vec4 & v - Source vector.
  • float scale - Scale.

explicit bvec4 ( unsigned char v ) #

Constructor. Initializes the vector using a given scalar value: x=v, y=v, z=v, w=v.

Arguments

  • unsigned char v - Scalar.

explicit bvec4 ( const vec4 & v ) #

Constructor. Initializes the vector using a given vec4 source vector.

Arguments

  • const vec4 & v - Source vector.

explicit bvec4 ( const dvec4 & v ) #

Constructor. Initializes the vector using a given dvec4 source vector.

Arguments

  • const dvec4 & v - Source vector.

explicit bvec4 ( const ivec4 & v ) #

Constructor. Initializes the vector using a given ivec4 source vector.

Arguments

  • const ivec4 & v - Source vector.

explicit bvec4 ( const unsigned char * v ) #

Constructor. Initializes the vector using a given pointer to the array of unsigned char elements: x=v[0], y=v[1], z=v[2], w=v[3].

Arguments

  • const unsigned char * v - Pointer to the array of unsigned char elements.

void set ( unsigned char x_, unsigned char y_, unsigned char z_, unsigned char w_ ) #

Sets the vector by components.

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 ) #

Sets the vector using the array of unsigned char elements: x=val[0], y=val[1], z=val[2], w=val[3].

Arguments

  • const unsigned char * val - Pointer to the array of unsigned char elements.

void set ( unsigned char val ) #

Sets the vector components equal to specified scalar value: x=val, y=val, z=val, w=val.

Arguments

  • unsigned char val - Scalar value.

void set ( const bvec4 & val ) #

Sets the vector equal to the specified vector.

Arguments

  • const bvec4 & val - Source vector.

void set ( const vec4 & val, float scale ) #

Sets the vector using a given vec4 vector and a scale multiplier.

Arguments

  • const vec4 & val - Source vector.
  • float scale - Scale.

unsigned char * get ( ) #

Returns the pointer to the vector.

Return value

Pointer to the vector.

const unsigned char * get ( ) # const

Returns the 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 * ( ) #

Performs type conversion to const unsigned char *.

const void * operator const void * ( ) #

Performs type conversion to const void *.

unsigned char * operator unsigned char * ( ) #

Performs type conversion to unsigned char *.

void * operator void * ( ) #

Performs type conversion to void *.

bvec4 & operator= ( const bvec4 & val ) #

Performs vector assignment. Destination vector = Source vector.

Arguments

  • const bvec4 & val - Source vector.

Return value

Result.

unsigned char & operator[] ( int i ) #

Performs array access to the vector item reference by using given item index.

Arguments

  • int i - Vector item index.

Return value

Vector item reference.

unsigned char operator[] ( int i ) # const

Performs array access to the vector item by using given item index.

Arguments

  • int i - Vector item index.

Return value

Vector item.
Last update: 2020-05-19
Build: ()