This page has been translated automatically.
UnigineScript
The Language
Core Library
Engine Library
Node-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版本。

WidgetManipulator Class

This base class creates a draggable 3D manupulator.

WidgetManipulator Class

This class inherits from Widget

Members


mat4 getBasis ()

Returns the current basis of the coordinate system for the handler. It can either be the world coordinates (the identity matrix) or coordinates of the parent node if the manipulated node is a child.

Return value

Matrix, which columns specify basis vectors.

vec4 getColor ()

Returns the current color for a manipulator.

Return value

Manipulator color.

int getMask ()

Returns a mask that hides axis arrows (along X, Y or Z) of the handler.

Return value

3-bit mask for axes.

mat4 getModelview ()

Returns the current projection matrix of the handler.

Return value

Model-view matrix.

mat4 getProjection ()

Returns the current model-view matrix of the handler.

Return value

Projection matrix.

int getSize ()

Returns the current handle size of the manipulator. Depending on the handle shape, this can be a radius or an altitude.

Return value

Size in pixels.

float getStep ()

Returns a step, which is used to align objects.

Return value

Step in units.

mat4 getTransform ()

Returns the current transformation matrix of the handler.

Return value

Transformation matrix.

void setBasis (mat4 matrix)

Sets a basis of the coordinate system for the handler. It can either be the world coordinates (the identity matrix) or coordinates of the parent node if the manipulated node is a child.

Arguments

  • mat4 matrix - Matrix, which columns specify basis vectors.

void setColor (vec4 color)

Sets the color for a manipulator.

Arguments

  • vec4 color - Manipulator color. The provided value is clamped to a range [0;1].

void setMask (int mask)

Hides axis arrows (along X, Y or Z) of the handler.

Arguments

  • int mask - 3-bit mask for axes.

void setModelview (mat4 matrix)

Sets a model-view matrix for the handler.

Arguments

  • mat4 matrix - Model-view matrix.

void setProjection (mat4 matrix)

Sets a projection matrix for the handler.

Arguments

  • mat4 matrix - Projection matrix.

void setSize (int size)

Sets a handle size of the manipulator. Depending on the handle shape, this can be a radius or an altitude.

Arguments

  • int size - Size in pixels.

void setStep (float step)

Sets a step, which is used to align objects.

Arguments

  • float step - Step in units.

void setTransform (mat4 matrix)

Sets a transformation matrix for the handler.

Arguments

  • mat4 matrix - Transformation matrix.

int WIDGET_MANIPULATOR_MASK_X

Description

Bit mask for a X axis of the manipulator.

int WIDGET_MANIPULATOR_MASK_XYZ

Description

3-bit mask for axes of the manipulator.

int WIDGET_MANIPULATOR_MASK_Y

Description

Bit mask for a Y axis of the manipulator.

int WIDGET_MANIPULATOR_MASK_Z

Description

Bit mask for a Z axis of the manipulator.
Last update: 2017-07-03
Build: ()