Gizmos

Inherited: None

Description

Note: Gizmos can be drawn only in Editor.

The Gizmos class provides a collection of static methods to draw various shapes and primitives for debugging in a 3D space. Users can use these methods to visualize different elements during development and debugging.

Public Methods

None

Static Methods

void

drawArc (const Vector3 & center, float radius, float start, float angle, const Vector4 & color, const Matrix4 & transform = Matrix4())

void

drawBox (const Vector3 & center, const Vector3 & size, const Vector4 & color, const Matrix4 & transform = Matrix4())

void

drawCircle (const Vector3 & center, float radius, const Vector4 & color, const Matrix4 & transform = Matrix4())

void

drawIcon (const Vector3 & center, const Vector2 & size, const std::string & name, const Vector4 & color, const Matrix4 & transform = Matrix4())

void

drawLines (const Vector3Vector & points, const IndexVector & indices, const Vector4 & color, const Matrix4 & transform = Matrix4())

void

drawMesh (Mesh & mesh, const Vector4 & color, const Matrix4 & transform = Matrix4())

void

drawRectangle (const Vector3 & center, const Vector2 & size, const Vector4 & color, const Matrix4 & transform = Matrix4())

void

drawSolidArc (const Vector3 & center, float radius, float start, float angle, const Vector4 & color, const Matrix4 & transform = Matrix4())

void

drawSphere (const Vector3 & center, float radius, const Vector4 & color, const Matrix4 & transform = Matrix4())

void

drawWireBox (const Vector3 & center, const Vector3 & size, const Vector4 & color, const Matrix4 & transform = Matrix4())

void

drawWireCapsule (const Vector3 & center, float radius, float height, const Vector4 & color, const Matrix4 & transform = Matrix4())

void

drawWireMesh (Mesh & mesh, const Vector4 & color, const Matrix4 & transform = Matrix4())

void

drawWireSphere (const Vector3 & center, float radius, const Vector4 & color, const Matrix4 & transform = Matrix4())

Methods Description

void Gizmos::drawArc (Vector3 & center, float radius, float start, float angle, Vector4 & color, Matrix4 & transform = Matrix4())

Draws a wire arc in the 3D space with the specified center, radius and color in the 3D space. Parameters start and angle allows to specify angle*s to draw a sector in degrees. Parameter *transform can be used to move, rotate and scale this arc.


void Gizmos::drawBox (Vector3 & center, Vector3 & size, Vector4 & color, Matrix4 & transform = Matrix4())

Draws a solid box with specified center, size and color in the 3D space. Parameter transform can be used to move, rotate and scale this box.


void Gizmos::drawCircle (Vector3 & center, float radius, Vector4 & color, Matrix4 & transform = Matrix4())

Draws a wire circle in the 3D space with the specified center, radius and color in the 3D space. Parameter transform can be used to move, rotate and scale this circle.


void Gizmos::drawIcon (Vector3 & center, Vector2 & size, std::string & name, Vector4 & color, Matrix4 & transform = Matrix4())

Draws an billboard icon at the specified center with the given size, color, and transform. Parameter name will be used to set a texture to render.


void Gizmos::drawLines (Vector3Vector & points, IndexVector & indices, Vector4 & color, Matrix4 & transform = Matrix4())

Draws lines connecting specified points and color in 3D space. Parameter indices specifies relations between points. Parameter transform can be used to move, rotate and scale this structure.


void Gizmos::drawMesh (Mesh & mesh, Vector4 & color, Matrix4 & transform = Matrix4())

Draws a mesh with a specified color and transform.


void Gizmos::drawRectangle (Vector3 & center, Vector2 & size, Vector4 & color, Matrix4 & transform = Matrix4())

Draws a wire rectangle in the 3D space with the specified center, size and color in the 3D space. Parameter transform can be used to move, rotate and scale this rectangle.


void Gizmos::drawSolidArc (Vector3 & center, float radius, float start, float angle, Vector4 & color, Matrix4 & transform = Matrix4())

Draws a solid arc in the 3D space with the specified center, radius and color in the 3D space. Parameters start and angle allows to specify angle*s to draw a sector in degrees. Parameter *transform can be used to move, rotate and scale this arc.


void Gizmos::drawSphere (Vector3 & center, float radius, Vector4 & color, Matrix4 & transform = Matrix4())

Draws a solid sphere with specified center, radius and color in the 3D space. Parameter transform can be used to move, rotate and scale this sphere.


void Gizmos::drawWireBox (Vector3 & center, Vector3 & size, Vector4 & color, Matrix4 & transform = Matrix4())

Draws a wire box in the 3D space with the specified center, size and color in the 3D space. Parameter transform can be used to move, rotate and scale this box.


void Gizmos::drawWireCapsule (Vector3 & center, float radius, float height, Vector4 & color, Matrix4 & transform = Matrix4())

Draws a wire capsule in the 3D space with the specified center, radius, height and color in the 3D space. Parameter transform can be used to move, rotate and scale this capsule.


void Gizmos::drawWireMesh (Mesh & mesh, Vector4 & color, Matrix4 & transform = Matrix4())

Draws a wireframe version of the specified mesh and color in 3D space. Parameter transform can be used to move, rotate and scale this mesh.


void Gizmos::drawWireSphere (Vector3 & center, float radius, Vector4 & color, Matrix4 & transform = Matrix4())

Draws a wire sphere in the 3D space with the specified center, radius and color in the 3D space. Parameter transform can be used to move, rotate and scale this sphere.