cubos::engine::Gizmos::Gizmo class

Class that describes a type of gizmo.

Public functions

void draw(GizmosRenderer& renderer, DrawPhase phase, const glm::mat<4, 4, float, glm::packed_highp>& mvp) pure virtual
Draws the gizmo to screen.
auto decreaseLifespan(float delta) -> bool
Decreases the time the gizmo has left before it is destroyed.

Public variables

const uint32_t id
Gizmo identifier.

Protected variables

glm::vec3 mColor
Color of the gizmo.
float mLifespan
Time in seconds the gizmo has left to live.

Function documentation

void cubos::engine::Gizmos::Gizmo::draw(GizmosRenderer& renderer, DrawPhase phase, const glm::mat<4, 4, float, glm::packed_highp>& mvp) pure virtual

Draws the gizmo to screen.

Parameters
renderer Renderer.
phase
mvp The view projection matrix to use for drawing the gizmo.

bool cubos::engine::Gizmos::Gizmo::decreaseLifespan(float delta)

Decreases the time the gizmo has left before it is destroyed.

Parameters
delta Seconds since the last frame.