This page has been translated automatically.
Programming
Fundamentials
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
Bounds-Related Classes
Containers
Controls-Related Classes
Core Library
GUI-Related Classes
Node-Related Classes
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
Rendering-Related Classes
Utility 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.

Visualizer Class

Unigine visualizer. This interface provides access to Unigine visualizer functions.

To use this class, include the UnigineVisualizer.h file.

Visualizer Class

Members


void renderObjectSurfaceBoundBox (const Ptr<Object> & object, int surface, const Math::vec4 & color)

Renders a bound box of a given object surface.

Arguments

  • const Ptr<Object> & object - Object, which contains the target surface.
  • int surface - The number of the target surface in the object.
  • const Math::vec4 & color - Color, in which the box will be rendered.

void renderMessage2D (const Math::vec3 & arg1, const Math::vec3 & arg2, const char * arg3, const Math::vec4 & arg4, int arg5)

Renders a message in a given color. Message position is specified in screen coordinates.

Arguments

  • const Math::vec3 & arg1 - Coordinates of the anchor point of the message in range [0;1].
  • const Math::vec3 & arg2 - Center of the message. The first two values in the vector set the offset, the third one is ignored. For example, vec3(-1,-1,0) offsets the center of the message to its upper left edge. vec3(1,1,0) offsets the center to the lower right corner.
  • const char * arg3 - Message text to display.
  • const Math::vec4 & arg4 - Message color.
  • int arg5 - Message outline: 1 to use the outline, 0 not to use.

void renderTriangle2D (const Math::vec3 & arg1, const Math::vec3 & arg2, const Math::vec3 & arg3, const Math::vec4 & arg4)

Renders a 2D triangle of a given color. 2D triangles are rendered in the screen plane; coordinates of the upper left corner are (0; 0), of the lower right corner—(1; 1).

Arguments

  • const Math::vec3 & arg1 - Coordinates of the first vertex.
  • const Math::vec3 & arg2 - Coordinates of the second vertex.
  • const Math::vec3 & arg3 - Coordinates of the third vertex.
  • const Math::vec4 & arg4 - Triangle color.

void renderLine3D (const Math::Vec3 & arg1, const Math::Vec3 & arg2, const Math::Vec3 & arg3, const Math::Vec3 & arg4, const Math::vec4 & arg5)

Renders a 3D line of a given color. 3D lines are rendered in the world space.

Arguments

  • const Math::Vec3 & arg1 - Coordinates of the starting point of the line.
  • const Math::Vec3 & arg2 - Coordinates of the first intermediate point of the line.
  • const Math::Vec3 & arg3 - Coordinates of the second intermediate point of the line.
  • const Math::Vec3 & arg4 - Coordinates of the ending point of the line.
  • const Math::vec4 & arg5 - Line color.

void renderObjectSurface (const Ptr<Object> & object, int arg2, const Math::vec4 & arg3)

Renders borders of a given object surface.

Arguments

  • const Ptr<Object> & object - Object, which contains the target surface.
  • int arg2 - The number of the target surface in the object.
  • const Math::vec4 & arg3 - Color, in which the borders will be rendered.

void renderTriangle3D (const Math::Vec3 & arg1, const Math::Vec3 & arg2, const Math::Vec3 & arg3, const Math::vec4 & arg4)

Renders a 3D triangle of a given color. 3D triangles are rendered in the world space.

Arguments

  • const Math::Vec3 & arg1 - Coordinates of the first vertex.
  • const Math::Vec3 & arg2 - Coordinates of the second vertex.
  • const Math::Vec3 & arg3 - Coordinates of the third vertex.
  • const Math::vec4 & arg4 - Triangle color.

void renderLine2D (const Math::vec3 & arg1, const Math::vec3 & arg2, const Math::vec3 & arg3, const Math::vec3 & arg4, const Math::vec4 & arg5)

Renders a 2D line of a given color by using 2 points. 2D lines are rendered in the screen plane; coordinates of the upper left corner are (0; 0), of the lower right corner — (1; 1).

Arguments

  • const Math::vec3 & arg1 - Coordinates of the starting point of the line.
  • const Math::vec3 & arg2 - Coordinates of the first intermediate point of the line.
  • const Math::vec3 & arg3 - Coordinates of the second intermediate point of the line.
  • const Math::vec3 & arg4 - Coordinates of the ending point of the line.
  • const Math::vec4 & arg5 - Line color.

void setSize (int size)

Updates the current size of the handler. All handlers have the same size.

Arguments

  • int size - A new handler size in pixels.

const char * getTextureName ()

Returns the string with the name of the texture.

Return value

The name of the texture.

void renderObjectSurfaceBoundSphere (const Ptr<Object> & object, int surface, const Math::vec4 & color)

Renders a bound sphere of a given object surface.

Arguments

  • const Ptr<Object> & object - Object, which contains the target surface.
  • int surface - The number of the target surface in the object.
  • const Math::vec4 & color - Color, in which the sphere will be rendered.

void renderSolidCapsule (float arg1, float arg2, const Math::Mat4 & arg3, const Math::vec4 & arg4)

Renders a solid capsule.

Arguments

  • float arg1 - Radius of the capsule.
  • float arg2 - Height of the capsule.
  • const Math::Mat4 & arg3 - Transformation matrix used to position the capsule.
  • const Math::vec4 & arg4 - Capsule color.

void renderObject (const Ptr<Object> & object, const Math::vec4 & arg2)

Renders an object wireframe.

Arguments

  • const Ptr<Object> & object - Object, which wireframe will be rendered.
  • const Math::vec4 & arg2 - Color, in which the wireframe will be rendered.

void renderSolidObject (const Ptr<Object> & object, const Math::vec4 & arg2)

Renders a solid-colored object.

Arguments

  • const Ptr<Object> & object - Object smart pointer.
  • const Math::vec4 & arg2 - Color in which the object will be rendered.

void renderPoint3D (const Math::Vec3 & arg1, float arg2, const Math::vec4 & arg3)

Renders a 3D point of a given size and color. 3D points are rendered in the world space.

Arguments

  • const Math::Vec3 & arg1 - Point coordinates.
  • float arg2 - Point size in range [0;1]. The point size is set in proportion to the screen resolution.
  • const Math::vec4 & arg3 - Point color.

void renderSolidBox (const Math::vec3 & arg1, const Math::Mat4 & arg2, const Math::vec4 & arg3)

Renders a solid box of a given color.

Arguments

  • const Math::vec3 & arg1 - Size of the solid box.
  • const Math::Mat4 & arg2 - Transformation matrix used to position the solid box.
  • const Math::vec4 & arg3 - Box color.

void renderLine3D (const Math::Vec3 & arg1, const Math::Vec3 & arg2, const Math::vec4 & arg3)

Renders a 3D line of a given color. 3D lines are rendered in the world space.

Arguments

  • const Math::Vec3 & arg1 - Starting point of the line.
  • const Math::Vec3 & arg2 - Ending point of the line.
  • const Math::vec4 & arg3 - Line color.

void renderLine2D (const Math::vec3 & arg1, const Math::vec3 & arg2, const Math::vec4 & arg3)

Renders a 2D line of a given color by using 2 points. 2D lines are rendered in the screen plane; coordinates of the upper left corner are (0; 0), of the lower right corner — (1; 1).

Arguments

  • const Math::vec3 & arg1 - Starting point of the line.
  • const Math::vec3 & arg2 - Ending point of the line.
  • const Math::vec4 & arg3 - Line color.

void setTextureName (const char * name)

Updates the current name of the texture.

Arguments

  • const char * name - A new name of the texture.

void renderCylinder (float arg1, float arg2, const Math::Mat4 & arg3, const Math::vec4 & arg4)

Renders a wireframe cylinder of a given color.

Arguments

  • float arg1 - Radius of the cylinder.
  • float arg2 - Height of the cylinder.
  • const Math::Mat4 & arg3 - Transformation matrix used to position the cylinder.
  • const Math::vec4 & arg4 - Cylinder color.

void renderBillboard3D (const Math::Vec3 & arg1, float arg2, const Math::vec4 & arg3)

Renders a 3D billboard of the specified size.

Arguments

  • const Math::Vec3 & arg1 - Coordinates of the billboard.
  • float arg2 - The billboard size.
  • const Math::vec4 & arg3 - The billboard texture coordinates.

void renderVector (const Math::Vec3 & arg1, const Math::Vec3 & arg2, const Math::vec4 & arg3)

Renders a vector of a given color.

Arguments

  • const Math::Vec3 & arg1 - Coordinates of the vector origin.
  • const Math::Vec3 & arg2 - Coordinates of the vector target.
  • const Math::vec4 & arg3 - Vector color.

void renderSphere (float arg1, const Math::Mat4 & arg2, const Math::vec4 & arg3)

Renders a wireframe sphere of a given color.

Arguments

  • float arg1 - Radius of the sphere.
  • const Math::Mat4 & arg2 - Transformation matrix used to position the sphere.
  • const Math::vec4 & arg3 - Sphere color.

Math::mat4 getProjection ()

Returns the current projection matrix of the visualizer.

Return value

The projection matrix if the visualization is enabled.

void renderFrustum (const Math::mat4 & arg1, const Math::Mat4 & arg2, const Math::vec4 & arg3)

Renders a wireframe frustum of a given color.

Arguments

  • const Math::mat4 & arg1 - Projection matrix used to transform the coordinates.
  • const Math::Mat4 & arg2 - Transformation matrix used to position the frustum.
  • const Math::vec4 & arg3 - Frustum color.

void renderSolidSphere (float arg1, const Math::Mat4 & arg2, const Math::vec4 & arg3)

Renders a solid sphere of a given color.

Arguments

  • float arg1 - Radius of the solid sphere.
  • const Math::Mat4 & arg2 - Transformation matrix used to position the solid sphere.
  • const Math::vec4 & arg3 - Sphere color.

Math::Mat4 getModelview ()

Returns the current modelview matrix of the visualizer. This matrix prevents the desynchronization between the visualizer and the render. It is set after the camera update in the editor.

Return value

The modelview matrix if the visualization is enabled.

void renderCone (float arg1, float arg2, const Math::Mat4 & arg3, const Math::vec4 & arg4)

Renders a wireframe cone of a given color.

Arguments

  • float arg1 - Radius of the cone.
  • float arg2 - Angle of the cone.
  • const Math::Mat4 & arg3 - Transformation matrix used to position the cone.
  • const Math::vec4 & arg4 - Cone color.

float getScale (const Math::Vec3 & arg1)

Returns the scale factor of the visualizer at the specified world position.

Arguments

  • const Math::Vec3 & arg1 - World position.

Return value

Scale factor of the visualizer.

void renderCapsule (float arg1, float arg2, const Math::Mat4 & arg3, const Math::vec4 & arg4)

Renders a wireframe capsule (capped cylinder) of a given color.

Arguments

  • float arg1 - Radius of the capsule.
  • float arg2 - Height of the capsule.
  • const Math::Mat4 & arg3 - Transformation matrix used to position the capsule.
  • const Math::vec4 & arg4 - Capsule color.

void renderTextureHandler (const Ptr<Node> & node, float arg2)

Renders a texture handler of the specified size.

Arguments

  • const Ptr<Node> & node - Pointer to the node, for which the handler is rendered.
  • float arg2 - Texture size (length of one side of the texture).

void renderNodeBoundBox (const Ptr<Node> & node, const Math::vec4 & color)

Renders an axis-aligned bound box of a given node.

Arguments

  • const Ptr<Node> & node - Node, for which the bound box is rendered.
  • const Math::vec4 & color - Color, in which the box will be rendered.

void renderDirection (const Math::Vec3 & arg1, const Math::vec3 & arg2, const Math::vec4 & arg3)

Renders a direction vector of a given color.

Arguments

  • const Math::Vec3 & arg1 - Coordinates of the vector origin.
  • const Math::vec3 & arg2 - Target vector direction.
  • const Math::vec4 & arg3 - Vector color.

void renderSolidObjectSurface (const Ptr<Object> & object, int arg2, const Math::vec4 & arg3)

Renders a solid-colored surface of a given object.

Arguments

  • const Ptr<Object> & object - Object smart pointer.
  • int arg2 - The number of the object's surface.
  • const Math::vec4 & arg3 - Color, in which the object's surface will be rendered.

void renderSolidCylinder (float arg1, float arg2, const Math::Mat4 & arg3, const Math::vec4 & arg4)

Renders a solid cylinder of a given color.

Arguments

  • float arg1 - Radius of the cylinder.
  • float arg2 - Height of the cylinder.
  • const Math::Mat4 & arg3 - Transformation matrix used to position the cylinder.
  • const Math::vec4 & arg4 - Cylinder color.

void setProjection (const Math::mat4 & projection)

Updates the projection matrix of the visualizer.

Arguments

  • const Math::mat4 & projection - A projection matrix if the visualization is enabled.

void renderQuad2D (const Math::vec3 & arg1, const Math::vec3 & arg2, const Math::vec3 & arg3, const Math::vec3 & arg4, const Math::vec4 & arg5)

Renders a 2D quadrilateral of a given color. 2D quads are rendered in the screen plane; coordinates of the upper left corner are (0; 0), of the lower right corner—(1; 1).

Arguments

  • const Math::vec3 & arg1 - Coordinates of the first vertex.
  • const Math::vec3 & arg2 - Coordinates of the second vertex.
  • const Math::vec3 & arg3 - Coordinates of the third vertex.
  • const Math::vec3 & arg4 - Coordinates of the fourth vertex.
  • const Math::vec4 & arg5 - Quadrilateral color.

void setEnabled (int enabled)

Enables or disables the visualizer.

Arguments

  • int enabled - 1 to enable the visualizer, 0 to disable it.

void renderNodeBoundSphere (const Ptr<Node> & node, const Math::vec4 & color)

Renders a bound sphere of a given node.

Arguments

  • const Ptr<Node> & node - Node, for which the bound sphere is rendered.
  • const Math::vec4 & color - Color, in which the sphere will be rendered.

void renderLine2D (const Math::vec3 & arg1, const Math::vec3 & arg2, const Math::vec3 & arg3, const Math::vec4 & arg4)

Renders a 2D line of a given color by using 2 points. 2D lines are rendered in the screen plane; coordinates of the upper left corner are (0; 0), of the lower right corner — (1; 1).

Arguments

  • const Math::vec3 & arg1 - Coordinates of the starting point of the line.
  • const Math::vec3 & arg2 - Coordinates of the intermediate point of the line.
  • const Math::vec3 & arg3 - Coordinates of the ending point of the line.
  • const Math::vec4 & arg4 - Line color.

void renderLine3D (const Math::Vec3 & arg1, const Math::Vec3 & arg2, const Math::Vec3 & arg3, const Math::vec4 & arg4)

Renders a 3D line of a given color. 3D lines are rendered in the world space.

Arguments

  • const Math::Vec3 & arg1 - Coordinates of the starting point of the line.
  • const Math::Vec3 & arg2 - Coordinates of the intermediate point of the line.
  • const Math::Vec3 & arg3 - Coordinates of the ending point of the line.
  • const Math::vec4 & arg4 - Line color.

void renderPoint2D (const Math::vec3 & arg1, float arg2, const Math::vec4 & arg3)

Renders a 2D point of a given size and color. 2D points are rendered in the screen plane; coordinates of the upper left corner are (0; 0), of the lower right corner—(1; 1).

Arguments

  • const Math::vec3 & arg1 - Point coordinates.
  • float arg2 - Point size in range [0;1]. The point size is set in proportion to the screen resolution.
  • const Math::vec4 & arg3 - Point color.

void setModelview (const Math::Mat4 & modelview)

Updates the modelview matrix of the visualizer. This matrix prevents the desynchronization between the visualizer and the render. It is set after the camera update in the editor.

Arguments

  • const Math::Mat4 & modelview - A modelview matrix if the visualization is enabled.

void renderSphereHandler (const Ptr<Node> & node, float arg2, const Math::vec4 & arg3)

Renders a node handler in a form of a sphere.

Arguments

  • const Ptr<Node> & node - Pointer to the node, for which the handler is rendered.
  • float arg2 - Radius of the sphere.
  • const Math::vec4 & arg3 - Sphere color.

void renderSolidEllipse (const Math::vec3 & arg1, const Math::Mat4 & arg2, const Math::vec4 & arg3)

Renders a solid ellipse of a given color.

Arguments

  • const Math::vec3 & arg1 - Ellipse radius values along three axes.
  • const Math::Mat4 & arg2 - Transformation matrix used to position the ellipse.
  • const Math::vec4 & arg3 - Ellipse color.

void renderQuad3D (const Math::Vec3 & arg1, const Math::Vec3 & arg2, const Math::Vec3 & arg3, const Math::Vec3 & arg4, const Math::vec4 & arg5)

Renders a 3D quadrilateral of a given color. 3D quads are rendered in the world space.

Arguments

  • const Math::Vec3 & arg1 - Coordinates of the first vertex.
  • const Math::Vec3 & arg2 - Coordinates of the second vertex.
  • const Math::Vec3 & arg3 - Coordinates of the third vertex.
  • const Math::Vec3 & arg4 - Coordinates of the fourth vertex.
  • const Math::vec4 & arg5 - Quadrilateral color.

int isEnabled ()

Returns a value indicating if the visualizer is enabled.

Return value

Returns 1 if the visualizer is enabled; otherwise, 0.

void renderBox (const Math::vec3 & arg1, const Math::Mat4 & arg2, const Math::vec4 & arg3)

Renders a wireframe box of a given color.

Arguments

  • const Math::vec3 & arg1 - Dimensions of the box.
  • const Math::Mat4 & arg2 - Transformation matrix, which is used to position the box.
  • const Math::vec4 & arg3 - Box color.

int getSize ()

Returns the handler size. All handlers have the same size.

Return value

The current size of the handler in pixels.

void renderCircle (float arg1, const Math::Mat4 & arg2, const Math::vec4 & arg3)

Renders a wireframe circle of a given color.

Arguments

  • float arg1 - Radius of the circle.
  • const Math::Mat4 & arg2 - Transformation matrix used to position the circle.
  • const Math::vec4 & arg3 - Circle color.

void renderBoundSphere (const BoundSphere & bs, const Math::Mat4 & transform, const Math::vec4 & color)

Renders the bounding sphere in a given color.

Arguments

  • const BoundSphere & bs - The bounding sphere.
  • const Math::Mat4 & transform - Transformation matrix for the bounding sphere.
  • const Math::vec4 & color - Color, in which the sphere will be rendered.

void renderWorldSectorObjectSurfaces (const Ptr<WorldSector> & sector, const Math::vec4 & color)

Renders objects wireframes inside a given sector.

Arguments

  • const Ptr<WorldSector> & sector - Sector, in which the object wireframes will be rendered.
  • const Math::vec4 & color - Color, in which the wireframes will be rendered.

void renderSector (float arg1, float arg2, const Math::Mat4 & arg3, const Math::vec4 & arg4)

Renders a wireframe sector of a given color.

Arguments

  • float arg1 - Radius of the circle from which a sector is cut.
  • float arg2 - Angle of the sector.
  • const Math::Mat4 & arg3 - Transformation matrix used to position the sector.
  • const Math::vec4 & arg4 - Sector color.

void renderBoxHandler (const Ptr<Node> & node, const Math::vec3 & arg2, const Math::vec4 & arg3)

Renders a handler in a form of a box.

Arguments

  • const Ptr<Node> & node - Pointer to the node, for which the handler is rendered.
  • const Math::vec3 & arg2 - Dimensions of the box (length of one face of the box).
  • const Math::vec4 & arg3 - Box color.

void renderMessage3D (const Math::Vec3 & arg1, const Math::vec3 & arg2, const char * arg3, const Math::vec4 & arg4, int arg5)

Renders a message in a given color. Message position is specified in world coordinates.

Arguments

  • const Math::Vec3 & arg1 - Coordinates of the anchor point of the message (in world coordinates).
  • const Math::vec3 & arg2 - Center of the message. The first two values in the vector set the offset, the third one is ignored. For example, vec3(-1,-1,0) offsets the center of the message to its upper left edge. vec3(1,1,0) offsets the center to the lower right corner.
  • const char * arg3 - Message text to display.
  • const Math::vec4 & arg4 - Message color.
  • int arg5 - Message outline: 1 to use the outline, 0 not to use.

void renderEllipse (const Math::vec3 & arg1, const Math::Mat4 & arg2, const Math::vec4 & arg3)

Renders a wireframe ellipse of a given color.

Arguments

  • const Math::vec3 & arg1 - Ellipse radius values along three axes.
  • const Math::Mat4 & arg2 - Transformation matrix for the ellipse.
  • const Math::vec4 & arg3 - Ellipse color.

void renderBoundBox (const BoundBox & bb, const Math::Mat4 & transform, const Math::vec4 & color)

Renders the bounding box in a given color.

Arguments

  • const BoundBox & bb - The bounding box.
  • const Math::Mat4 & transform - Transformation matrix for the bounding box.
  • const Math::vec4 & color - Color, in which the box will be rendered.

renderBillboard3D (const Math::Vec3 & arg1, float arg2, const Math::vec4 & arg3, int screen_space = 0)

Arguments

  • const Math::Vec3 & arg1
  • float arg2
  • const Math::vec4 & arg3
  • int screen_space

renderVector (const Math::Vec3 & arg1, const Math::Vec3 & arg2, const Math::vec4 & arg3, float arrow_size = 0.25f, int screen_space = 0)

Arguments

  • const Math::Vec3 & arg1
  • const Math::Vec3 & arg2
  • const Math::vec4 & arg3
  • float arrow_size
  • int screen_space

renderPoint3D (const Math::Vec3 & arg1, float arg2, const Math::vec4 & arg3, int screen_space = 0)

Arguments

  • const Math::Vec3 & arg1
  • float arg2
  • const Math::vec4 & arg3
  • int screen_space

renderTextureHandler (const Ptr<Node> & node, float arg2, int screen_space = 1)

Arguments

  • const Ptr<Node> & node
  • float arg2
  • int screen_space

renderDirection (const Math::Vec3 & arg1, const Math::vec3 & arg2, const Math::vec4 & arg3, float arrow_size = 0.25f, int screen_space = 1)

Arguments

  • const Math::Vec3 & arg1
  • const Math::vec3 & arg2
  • const Math::vec4 & arg3
  • float arrow_size
  • int screen_space
Last update: 2017-07-03
Build: ()