class
GizmoDrawing
Provides easy access to the rendering of gizmo elements.
Gizmos are icons and 3D objects usually rendered in scene view for various visualization purposes (for example a Camera component will have a gizmo that draws a Camera icon since otherwise it has no visual representation). Aside from being rendered, gizmos can also be selected by the user as if they were normal scene elements.
Public
Constructors
GizmoDrawing
Methods
StartGizmo
Starts gizmo creation.
All further call will be referencing this gizmo. Must be followed by a matching EndGizmo().
- gizmoManager
- Manager into which all the draw commands will be recorded.
- gizmoParent
- Scene object this gizmo is attached to. Selecting the gizmo will select this scene object.
EndGizmo
Ends gizmo creation.
Must be called after a matching startGizmo().
SetTransform
Changes the transform that will be applied to meshes of any further gizmo draw calls.
SetPickable
If pickable is set to true, gizmo can be selected by the user, otherwise it will be drawn but cannot be interacted with.
GetTransform
Returns the currently set gizmo transform.
DrawCube
Draws an axis aligned cuboid.
- position
- Center of the cuboid.
- extents
- Radius of the cuboid in each axis.
DrawSphere
Draws a sphere.
DrawCone
Draws a solid cone.
- basePosition
- Position of the center of the base of the cone.
- normal
- Orientation of the cone, pointing from center base to the tip of the cone.
- height
- Height of the cone (along the normal).
- radius
- Radius of the base of the cone.
- scale
- Scale applied to cone's disc width & height. Allows you to create elliptical cones.
DrawDisc
Draws a solid disc.
- position
- Center of the disc.
- normal
- Orientation of the disc, pointing in the direction the disc is visible in.
- radius
- Radius of the disc.
DrawWireCube
Draws a wireframe axis aligned cuboid.
- position
- Center of the cuboid.
- extents
- Radius of the cuboid in each axis.
DrawWireSphere
Draws a wireframe sphere represented by three discs.
DrawWireHemisphere
Draws a wireframe hemisphere represented by three arcs.
DrawWireCapsule
Draws a wireframe capsule.
- position
- World coordinates of the center of the capsule.
- height
- Distance between the centers of the capsule's hemispheres.
- radius
- Distance of each point from the capsule's center-line.
DrawWireCone
Draws a wireframe cone.
- basePosition
- Position of the center of the base of the cone.
- normal
- Orientation of the cone, pointing from center base to the tip of the cone.
- height
- Height of the cone (along the normal).
- radius
- Radius of the base of the cone.
- scale
- Scale applied to cone's disc width & height. Allows you to create elliptical cones.
DrawLine
Draws a line between two points.
DrawLineList
Draws a list of lines.
Provided array must contain pairs of the line start point followed by an end point.
DrawWireDisc
Draws a wireframe disc.
- position
- Center of the disc.
- normal
- Orientation of the disc, pointing in the direction the disc is visible in.
- radius
- Radius of the disc.
DrawWireArc
Draws a wireframe arc.
- position
- Center of the arc.
- normal
- Orientation of the arc, pointing in the direction the arc is visible in.
- radius
- Radius of the arc.
- startAngle
- Angle at which to start the arc.
- amountAngle
- Length of the arc.
DrawWireMesh
Draws a wireframe mesh.
- meshData
- Object containing mesh vertices and indices. Vertices must be Vertex3 and indices 32-bit.
DrawFrustum
Draws a wireframe frustum.
- position
- Origin of the frustum, or the eye point.
- aspect
- Ratio of frustum width over frustum height.
- FOV
- Horizontal field of view in degrees.
- nearPlane
- Distance to the near frustum plane.
- farPlane
- Distance to the far frustum plane.
DrawIcon
Draws an icon that always faces the camera.
- position
- Position of the center of the icon.
- image
- Sprite image for the icon to draw.
- fixedScale
- If true then the icon will remain the same size regardless of the distance from camera.
DrawText
Draws a mesh representing 2D text with the specified properties.
- position
- Position to render the text at. Text will be centered around this point.
- text
- Text to draw.
- font
- Font to use for rendering the text's characters.
- fontSize
- Size of the characters, in points.
staticInstance
Returns a reference to the module instance.
Module has to have been started up first otherwise an exception will be thrown.
staticInstancePtr
Returns a pointer to the module instance.
Module has to have been started up first otherwise an exception will be thrown.
staticShutDown
Shuts down this module and frees any resources it is using.
staticIsStarted
Query if the module has been started.
Protected
Methods
~Module<T>
OnStartUp
Override if you want your module to be notified once it has been constructed and started.
OnShutDown
Override if you want your module to be notified just before it is deleted.
staticInstanceInternal
Returns a singleton instance of this module.