This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
基础
专业(SIM)
UnigineEditor
界面概述
资源工作流程
Version Control
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
统一的Unigine着色器语言 UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
材质和着色器
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
Animations-Related Classes
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
VR-Related Classes
创建内容
内容优化
材质
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials

Unigine::Math::svec4 Struct

Header: #include <UnigineMathLibSVec4.h>

This class represents a vector with 4 unsigned short components.

svec4 Class

Members


svec4 ( ) #

Default constructor. Produces a zero vector.

svec4 ( const svec4& v ) #

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

Arguments

  • const svec4& v - Source vector.

svec4 ( unsigned short x, unsigned short y, unsigned short z, unsigned short w ) #

Constructor. Initializes the vector using given unsigned short values.

Arguments

  • unsigned short x - X component of the vector.
  • unsigned short y - Y component of the vector.
  • unsigned short z - Z component of the vector.
  • unsigned short w - W component of the vector.

svec4 ( 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 svec4 ( unsigned short v ) #

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

Arguments

  • unsigned short v - Source value.

explicit svec4 ( const unsigned short* v ) #

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

Arguments

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

explicit svec4 ( const dvec4& v ) #

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

Arguments

  • const dvec4& v - Source vector.

explicit svec4 ( const ivec4& v ) #

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

Arguments

  • const ivec4& v - Source vector.

explicit svec4 ( const vec4& v ) #

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

Arguments

  • const vec4& v - Source vector.

void set ( unsigned short val ) #

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

Arguments

  • unsigned short val - Value.

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

Sets the vector by components.

Arguments

  • unsigned short x_ - X component of the vector.
  • unsigned short y_ - Y component of the vector.
  • unsigned short z_ - Z component of the vector.
  • unsigned short w_ - W component of the vector.

void set ( const svec4& val ) #

Sets the vector equal to the specified vector.

Arguments

  • const svec4& val - Source vector.

void set ( const unsigned short* val ) #

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

Arguments

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

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 short * get ( ) #

Returns the pointer to the vector.

Return value

Pointer to the vector.

const unsigned short * get ( ) const#

Returns the constant pointer to the vector.

Return value

Pointer to the vector.

void get ( unsigned short* val ) const#

Sets the array of unsigned short values equal to the vector.

Arguments

  • unsigned short* val - The vector to be set.

svec4 & operator= ( const svec4& val ) #

Performs vector assignment. Destination vector = Source vector.

Arguments

  • const svec4& val - Source vector.

Return value

Result.

const unsigned short * operator const unsigned short * ( ) const#

Performs type conversion to const unsigned short *.

void * operator void * ( ) #

Performs type conversion to void *.

const void * operator const void * ( ) const#

Performs type conversion to const void *.

unsigned short * operator unsigned short * ( ) #

Performs type conversion to unsigned short *.

unsigned short operator[] ( int i ) const#

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 short & operator[] ( int i ) #

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

Arguments

  • int i - Vector item index.

Return value

Vector item.
Last update: 2024-12-13
Build: ()