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

drawIcon (const Vector3 & center, const Vector2 & size, const TString & name, const Vector4 & color)

void

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

void

drawSolidBox (const Vector3 & center, const Vector3 & size, const Vector4 & color, const Matrix4 * transform = nullptr)

void

drawSolidMesh (Mesh & mesh, const Vector4 & color, const Matrix4 * transform = nullptr)

void

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

void

drawSolidSphere (const Vector3 & center, float radius, const Vector4 & color, const Matrix4 * transform = nullptr)

void

drawSolidTriangles (const Vector3Vector & points, const IndexVector & indices, const Vector4 & color, const Matrix4 * transform = nullptr)

void

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

void

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

void

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

void

drawWireCircle (const Vector3 & center, float radius, const Vector4 & color, const Matrix4 * transform = nullptr)

void

drawWireCylinder (const Vector3 & center, float radius, float height, const Vector4 & color, const Matrix4 * transform = nullptr)

void

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

void

drawWireRectangle (const Vector3 & center, const Vector2 & size, const Vector4 & color, const Matrix4 * transform = nullptr)

void

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

Methods DescriptionΒΆ

void Gizmos::drawIcon (Vector3 & center, Vector2 & size, TString & name, Vector4 & color)

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


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

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::drawSolidBox (Vector3 & center, Vector3 & size, Vector4 & color, Matrix4 * transform = nullptr)

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::drawSolidMesh (Mesh & mesh, Vector4 & color, Matrix4 * transform = nullptr)

Draws a mesh with a specified color and transform.


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

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


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

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::drawSolidTriangles (Vector3Vector & points, IndexVector & indices, Vector4 & color, Matrix4 * transform = nullptr)

Draws solid triangles 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::drawWireArc (Vector3 & center, float radius, float start, float angle, Vector4 & color, Matrix4 * transform = nullptr)

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 angles to draw a sector in degrees. Parameter transform can be used to move, rotate and scale this arc.


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

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 = nullptr)

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::drawWireCircle (Vector3 & center, float radius, Vector4 & color, Matrix4 * transform = nullptr)

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::drawWireCylinder (Vector3 & center, float radius, float height, Vector4 & color, Matrix4 * transform = nullptr)

Draws a wire cylinder 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 cylinder.


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

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::drawWireRectangle (Vector3 & center, Vector2 & size, Vector4 & color, Matrix4 * transform = nullptr)

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::drawWireSphere (Vector3 & center, float radius, Vector4 & color, Matrix4 * transform = nullptr)

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.