This page has been translated automatically.
编程
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
应用程序接口
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
CIGI Client Plugin
Rendering-Related Classes
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine::WidgetManipulator Class

Header:#include <UnigineWidgets.h>
Inherits:Widget

This base class creates a draggable 3D manupulator.

WidgetManipulator Class

Members


static WidgetManipulatorPtr create(const Ptr<Gui> & gui)

WidgetManipulator constructor.

Arguments

  • const Ptr<Gui> & gui - Pointer to GUI.

Ptr<WidgetManipulator> cast(const Ptr<Widget> & widget)

Casts a WidgetManipulator out of the Widget instance.

Arguments

  • const Ptr<Widget> & widget - Pointer to Widget.

Return value

Pointer to WidgetManipulator.

void setBasis(const Math::Mat4 & basis)

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

  • const Math::Mat4 & basis - Matrix, with columns specifying basis vectors.

Math::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, with columns specifying basis vectors.

void setColor(const Math::vec4 & color)

Sets the color for a manipulator.

Arguments

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

Math::vec4 getColor()

Returns the current color for a manipulator.

Return value

Manipulator color.

void setMask(int mask)

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

Arguments

  • int mask - 3-bit mask for axes.

int getMask()

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

Return value

3-bit mask for axes.

void setModelview(const Math::Mat4 & modelview)

Sets a model-view matrix for the handler.

Arguments

  • const Math::Mat4 & modelview - Model-view matrix.

Math::Mat4 getModelview()

Returns the current projection matrix of the handler.

Return value

Model-view matrix.

void setProjection(const Math::mat4 & projection)

Sets a projection matrix for the handler.

Arguments

  • const Math::mat4 & projection - Projection matrix.

Math::mat4 getProjection()

Returns the current model-view matrix of the handler.

Return value

Projection matrix.

void setRenderGui(const Ptr<Gui> & gui)

Sets the render GUI.

Arguments

  • const Ptr<Gui> & gui - GUI smart pointer.

Ptr<Gui> getRenderGui()

Returns the current render GUI.

Return value

GUI smart pointer.

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.

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.

void setStep(float step)

Sets a step, which is used to align objects.

Arguments

  • float step - Step in units.

float getStep()

Returns a step, which is used to align objects.

Return value

Step in units.

void setTransform(const Math::Mat4 & transform)

Sets a transformation matrix for the handler.

Arguments

  • const Math::Mat4 & transform - Transformation matrix.

Math::Mat4 getTransform()

Returns the current transformation matrix of the handler.

Return value

Transformation matrix.

Ptr<WidgetManipulator> getWidgetManipulator()

int type()

Returns the type of the node.

Return value

Widget type identifier.

int getFocusedAxis()

Returns the number of the manipulator axis, that is currently in focus.

Return value

Number of the manipulator axis, that is currently in focus. The values depend on the manipulator's type:

int isFocusAxis()

Returns a value indicating if any axis of the manipulator is currently in focus.

Return value

1 if any axis of the manipulator is currently in focus; otherwise, 0.

int MASK_X

Description

Bit mask for a X axis of the manipulator.

int MASK_XYZ

Description

3-bit mask for axes of the manipulator.

int MASK_Y

Description

Bit mask for a Y axis of the manipulator.

int MASK_Z

Description

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