Ocular Engine
|
Functions | |
Ocular::Core::ARenderable::ARenderable (std::string const &name="ARenderable", std::string const &type="ARenderable", SceneObject *parent=nullptr) | |
virtual bool | Ocular::Core::ARenderable::initialize () |
virtual bool | Ocular::Core::ARenderable::preRender () |
virtual void | Ocular::Core::ARenderable::render () |
virtual void | Ocular::Core::ARenderable::render (Graphics::Material *material) |
virtual void | Ocular::Core::ARenderable::postRender () |
virtual bool | Ocular::Core::ARenderable::preRenderDebug () |
virtual void | Ocular::Core::ARenderable::renderDebug () |
virtual void | Ocular::Core::ARenderable::postRenderDebug () |
virtual void | Ocular::Core::ARenderable::buildBounds (Math::BoundsSphere *sphere, Math::BoundsAABB *aabb, Math::BoundsOBB *obb, Math::Matrix4x4 const &matrix=Math::Matrix4x4()) |
SceneObject * | Ocular::Core::ARenderable::getParent () const |
std::string const & | Ocular::Core::ARenderable::getName () const |
virtual uint32_t | Ocular::Core::ARenderable::getRenderPriority () const |
Ocular::Core::MeshRenderable::MeshRenderable (std::string const &name="MeshRenderable", SceneObject *parent=nullptr) | |
virtual bool | Ocular::Core::MeshRenderable::initialize () override |
virtual bool | Ocular::Core::MeshRenderable::preRender () override |
virtual void | Ocular::Core::MeshRenderable::render () override |
virtual void | Ocular::Core::MeshRenderable::render (Graphics::Material *material) override |
virtual void | Ocular::Core::MeshRenderable::onLoad (BuilderNode const *node) override |
virtual void | Ocular::Core::MeshRenderable::onSave (BuilderNode *node) const override |
virtual void | Ocular::Core::MeshRenderable::buildBounds (Math::BoundsSphere *sphere, Math::BoundsAABB *aabb, Math::BoundsOBB *obb, Math::Matrix4x4 const &matrix=Math::Matrix4x4()) override |
virtual uint32_t | Ocular::Core::MeshRenderable::getRenderPriority () const override |
bool | Ocular::Core::MeshRenderable::setMesh (std::string const &name) |
void | Ocular::Core::MeshRenderable::setMesh (Graphics::Mesh *mesh) |
Graphics::Mesh * | Ocular::Core::MeshRenderable::getMesh () const |
uint32_t | Ocular::Core::MeshRenderable::addMaterial (std::string const &name) |
uint32_t | Ocular::Core::MeshRenderable::addMaterial (Graphics::Material *material) |
bool | Ocular::Core::MeshRenderable::setMaterial (std::string const &name, uint32_t index=0, bool resize=false) |
void | Ocular::Core::MeshRenderable::setMaterial (Graphics::Material *material, uint32_t index=0, bool resize=false) |
void | Ocular::Core::MeshRenderable::removeMaterial (uint32_t index) |
Graphics::Material * | Ocular::Core::MeshRenderable::getMaterial (uint32_t index=0) const |
uint32_t | Ocular::Core::MeshRenderable::getNumMaterials () const |
bool | Ocular::Core::MeshRenderable::validateMaterialIndex (uint32_t index, bool resize) |
Graphics::Material * | Ocular::Core::MeshRenderable::findMaterial (std::string const &name) |
Variables | |
SceneObject * | Ocular::Core::ARenderable::m_Parent |
Graphics::Mesh * | Ocular::Core::MeshRenderable::m_Mesh |
std::vector< Graphics::Material * > | Ocular::Core::MeshRenderable::m_Materials |
Friends | |
class | Ocular::Core::ARenderable::SceneObject |
uint32_t Ocular::Core::MeshRenderable::addMaterial | ( | std::string const & | name | ) |
Adds a new Material.
[in] | name | The mapping-name of the Material resource. |
uint32_t Ocular::Core::MeshRenderable::addMaterial | ( | Graphics::Material * | material | ) |
Adds a new Material.
[in] | material | Pointer to the Material resource. May be NULL. |
Graphics::Material * Ocular::Core::MeshRenderable::getMaterial | ( | uint32_t | index = 0 | ) | const |
Retrieves the material assigned to the specific index.
[in] | index |
Graphics::Mesh * Ocular::Core::MeshRenderable::getMesh | ( | ) | const |
Returns the Mesh currently being rendered.
std::string const & Ocular::Core::ARenderable::getName | ( | ) | const |
Returns the non-unique name assigned to this Renderable.
uint32_t Ocular::Core::MeshRenderable::getNumMaterials | ( | ) | const |
SceneObject * Ocular::Core::ARenderable::getParent | ( | ) | const |
Returns the SceneObject that this Renderable belongs to.
|
overridevirtual |
Reimplemented from Ocular::Core::ARenderable.
|
virtual |
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.
Reimplemented in Ocular::Core::MeshRenderable, and Ocular::Editor::AxisGizmoRenderable.
|
overridevirtual |
Alternate creation method (opposed to the constructor) in which one is provided with a BuilderNode chain. This chain may be explored to retrieve any relevant variables, and their values, that may have been stored in it.
This method will typically mirror the onSave, in which relevant values are stored within the chain.
[in] | node | Node to extract variable information from |
Reimplemented from Ocular::Core::ObjectIO.
|
overridevirtual |
Method used to add an object's data to an existing node chain in preparation for being save to a file.
[in] | node | Node to place variable information in |
Reimplemented from Ocular::Core::ObjectIO.
|
virtual |
Performs any post-render cleanup or state resetting.
For example, if a particular Renderable should be drawn as lines then the RenderState should be returned to triangle list or whatever else the default for that application may be.
Note that manual state changes should be kept to a minimal, and where possible, they should be specified via Materials so that any active renderers may best optimize and reduce the number of state changes.
|
virtual |
Special debug mode post-render call.
This method is typically invoked in special debug scenarios and/or inside of editor preview windows.
By default, it calls the standard post-render method.
Reimplemented in Ocular::Core::PointLightRenderable, and Ocular::Core::CameraRenderable.
|
virtual |
Called prior to the render method.
Should handle any setup required for rendering to be successful, such as Material binding, etc.
Reimplemented in Ocular::Core::MeshRenderable, and Ocular::Editor::AxisGizmoRenderable.
|
overridevirtual |
Called prior to the render method.
Should handle any setup required for rendering to be successful, such as Material binding, etc.
Reimplemented from Ocular::Core::ARenderable.
|
virtual |
Special debug mode pre-render call.
This method is typically invoked in special debug scenarios and/or inside of editor preview windows.
By default, it calls the standard pre-render method.
Reimplemented in Ocular::Core::PointLightRenderable, and Ocular::Core::CameraRenderable.
void Ocular::Core::MeshRenderable::removeMaterial | ( | uint32_t | index | ) |
Removes the Material at the specified index.
This completely deletes the Material from the Renderable. You may use setMaterial to set it NULL instead if that is more desireable.
[in] | index |
|
virtual |
Performs any necessary rendering calls such as GraphicsDriver::renderMesh.
Reimplemented in Ocular::Core::MeshRenderable, and Ocular::Editor::AxisGizmoRenderable.
|
overridevirtual |
Performs any necessary rendering calls such as GraphicsDriver::renderMesh.
Reimplemented from Ocular::Core::ARenderable.
|
overridevirtual |
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.
[in] | material |
Reimplemented from Ocular::Core::ARenderable.
|
virtual |
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.
[in] | material |
Reimplemented in Ocular::Core::MeshRenderable, and Ocular::Editor::AxisGizmoRenderable.
|
virtual |
Special debug mode render call.
This method is typically invoked in special debug scenarios and/or inside of editor preview windows.
By default, it calls the standard render method.
Reimplemented in Ocular::Core::PointLightRenderable, and Ocular::Core::CameraRenderable.
bool Ocular::Core::MeshRenderable::setMaterial | ( | std::string const & | name, |
uint32_t | index = 0 , |
||
bool | resize = false |
||
) |
Sets the Material at the specified index.
If an invalid name is specified, then any associated SubMeshes will not be rendered.
[in] | name | The mapping-name of the Material resource. |
[in] | index | The index to place the Material at. |
[in] | resize | If true, will add NULL Materials to the Material container until the specified index is valid. |
void Ocular::Core::MeshRenderable::setMaterial | ( | Graphics::Material * | material, |
uint32_t | index = 0 , |
||
bool | resize = false |
||
) |
Sets the Material at the specified index.
If NULL is passed, then any associated SubMeshes will not be rendered.
[in] | material | Pointer to the Material resource. May be NULL. |
[in] | index | The index to place the Material at. |
[in] | resize | If true, will add NULL Materials to the Material container until the specified index is valid. |
bool Ocular::Core::MeshRenderable::setMesh | ( | std::string const & | name | ) |
Sets the Mesh to be rendered.
[in] | name | The mapping-name of the Mesh resource to render. |
void Ocular::Core::MeshRenderable::setMesh | ( | Graphics::Mesh * | mesh | ) |
Sets the Mesh to be rendered.
[in] | mesh | Pointer to the Mesh resource to render. May be NULL. |