Ocular Engine
Ocular::Editor::AxisGizmoRenderable Class Reference

#include <AxisGizmoRenderable.hpp>

Inheritance diagram for Ocular::Editor::AxisGizmoRenderable:
Ocular::Core::ARenderable Ocular::Core::Object Ocular::Core::ObjectIO Ocular::Core::Exposable Ocular::Core::Buildable

Public Member Functions

virtual bool initialize () override
virtual bool preRender () override
virtual void render () override
virtual void render (Graphics::Material *material) override
virtual uint32_t getRenderPriority () const override
void setSelected (bool selected)
- Public Member Functions inherited from Ocular::Core::ARenderable
 ARenderable (std::string const &name="ARenderable", std::string const &type="ARenderable", SceneObject *parent=nullptr)
virtual void postRender ()
virtual bool preRenderDebug ()
virtual void renderDebug ()
virtual void postRenderDebug ()
virtual void buildBounds (Math::BoundsSphere *sphere, Math::BoundsAABB *aabb, Math::BoundsOBB *obb, Math::Matrix4x4 const &matrix=Math::Matrix4x4())
SceneObjectgetParent () const
std::string const & getName () const
- Public Member Functions inherited from Ocular::Core::Object
 Object (std::string name, std::string className)
 Creates a new Object with the specified name and class. More...
 Object (std::string name)
 Creates a new Object with the specified name. More...
 Object ()
 Creates a new Object with the default name ('Name').
std::string const & getName () const
void setName (std::string name)
 Sets the name of the Object. More...
std::string const & getClass () const
void setUUID (std::string const &uuid)
UUID const & getUUID () const
int64_t getCreationTime () const
virtual std::string toString () const
template<class T >
bool isType ()
- Public Member Functions inherited from Ocular::Core::ObjectIO
virtual void onLoad (BuilderNode const *node) override
virtual void onSave (BuilderNode *node) const override
- Public Member Functions inherited from Ocular::Core::Exposable
void getAllExposedNames (std::vector< std::string > &names) const
bool getVariable (std::string const &name, ExposedVariable &var)
template<typename T >
bool getVariableValue (std::string const &name, T &var)
template<typename T >
bool setVariableValue (std::string const &name, T const &value)
virtual void onVariableModified (std::string const &varName)

Protected Member Functions

bool initializeMaterials ()
bool initializeMaterialNormal ()
bool initializeMaterialSelected ()
bool initializeMesh ()
- Protected Member Functions inherited from Ocular::Core::Exposable
void exposeVariable (std::string const &name, std::string const &type, bool isPointer, bool isExposed, void *data)

Protected Attributes

 Material when rendering the component when not selected. Will use axis color.
 Material when rendering the component when it is selected.
Graphics::DepthStencilState m_DSSPreRender
Graphics::DepthStencilState m_DSSPostRender
bool m_IsSelected
- Protected Attributes inherited from Ocular::Core::ARenderable
- Protected Attributes inherited from Ocular::Core::Object
std::string m_Name
std::string m_Class
const int64_t m_CreationTime
- Protected Attributes inherited from Ocular::Core::Exposable
std::unordered_map< std::string, ExposedVariablem_ExposedVariables

Detailed Description

Special purpose renderable attached to an AxisComponentGizmo object. Responsible for setting the axis color and ensuring it is drawn in front of all other objects.

Member Function Documentation

uint32_t Ocular::Editor::AxisGizmoRenderable::getRenderPriority ( ) const

Virtual method that should be overridden by child implementations.

Implementation is left up to the user as Renderables do not have a pre-set number of Materials (where RenderPriority is defined) or a Material heirarchy.

Some Renderable implementations may have a single Material, some may have multiple.

Some may wish to use the priority of the first Material, others an average priority of all Materials attached to the Renderable.

The render priority of the Renderable. By default, returns 2000 (Opaque priority).

Reimplemented from Ocular::Core::ARenderable.

bool Ocular::Editor::AxisGizmoRenderable::preRender ( )

Called prior to the render method.

Should handle any setup required for rendering to be successful, such as Material binding, etc.

If return FALSE, rendering will be cancelled.

Reimplemented from Ocular::Core::ARenderable.

void Ocular::Editor::AxisGizmoRenderable::render ( )

Performs any necessary rendering calls such as GraphicsDriver::renderMesh.

Reimplemented from Ocular::Core::ARenderable.

void Ocular::Editor::AxisGizmoRenderable::render ( Graphics::Material material)

Renders the renderable with the specified Material.

Use this version of the render method when doing operations such as post-processing when all objects need to be rendered using the same effect.


Reimplemented from Ocular::Core::ARenderable.

The documentation for this class was generated from the following files: