Ocular Engine
Core

Classes

class  Ocular::Core::AEvent
 
class  Ocular::Core::AEventListener
 
class  Ocular::Core::EventManager
 Abstract base class of all event objects. More...
 
class  Ocular::Core::KeyboardInputEvent
 
class  Ocular::Core::MouseButtonInputEvent
 
class  Ocular::Core::MouseMoveInputEvent
 
class  Ocular::Core::MouseScrollInputEvent
 
class  Ocular::Core::SceneObjectAddedEvent
 
class  Ocular::Core::SceneObjectRemovedEvent
 
class  Ocular::Core::ShutdownEvent
 
class  Ocular::Core::WindowResizeEvent
 
class  Ocular::Core::EventSnooper
 
class  Ocular::Core::Exception
 
class  Ocular::Core::FileReadWriteException
 
class  Ocular::Core::Directory
 
class  Ocular::Core::File
 
class  Ocular::Core::InputHandler
 
class  Ocular::Core::ConsoleLoggerListener
 
class  Ocular::Core::ILoggerListener
 
class  Ocular::Core::Logger
 
class  Ocular::Core::LoggerMessage
 
class  Ocular::Core::VSConsoleLoggerListener
 
class  Ocular::Core::Color
 
class  Ocular::Core::Object
 Base class of all representable Ocular constructs. More...
 
class  Ocular::Core::Buildable
 
class  Ocular::Core::BuilderNode
 Generic node system used for loading and saving SceneObjects and their components. More...
 
class  Ocular::Core::Exposable
 
struct  Ocular::Core::ExposedVariable
 
class  Ocular::Core::ObjectIO
 
class  Ocular::Core::Profiler
 
class  Ocular::Core::ProfilerNode
 
class  Ocular::Core::ProfilerScope
 
class  Ocular::Core::ForwardRenderer
 
class  Ocular::Core::Renderer
 
class  Ocular::Core::RendererRegistrar< T >
 
class  Ocular::Core::AWindow
 
struct  Ocular::Core::WindowDescriptor
 
class  Ocular::Core::WindowManager
 
class  Ocular::Core::MultiResource
 
class  Ocular::Core::Resource
 
class  Ocular::Core::ResourceDefaults
 
class  Ocular::Core::ResourceDetails
 Maintains a resource and usage details. More...
 
class  Ocular::Core::ResourceExplorer
 
class  Ocular::Core::AResourceLoader
 
class  Ocular::Core::ResourceLoaderManager
 
class  Ocular::Core::ResourceLoaderRegistrar< T >
 
class  Ocular::Core::ResourceManager
 
class  Ocular::Core::ResourceMemoryDetails
 
class  Ocular::Core::ResourceMetadata
 
class  Ocular::Core::AResourceSaver
 
class  Ocular::Core::ResourceSaverManager
 
class  Ocular::Core::ResourceSaverRegistrar< T >
 
class  Ocular::Core::ARenderable
 
class  Ocular::Core::ARoutine
 
class  Ocular::Core::BVHSceneNode
 
class  Ocular::Core::BVHSceneTree
 
struct  Ocular::Core::PerspectiveProjection
 
struct  Ocular::Core::OrthographicProjection
 
class  Ocular::Core::Camera
 
class  Ocular::Core::CameraManager
 
class  Ocular::Core::CameraRenderable
 
class  Ocular::Core::ComponentFactory< T >
 
class  Ocular::Core::ISceneTree
 
class  Ocular::Core::DirectionalLight
 
struct  Ocular::Core::GPULight
 Structure of generic light data passed to the GPU. More...
 
class  Ocular::Core::LightManager
 
class  Ocular::Core::LightSource
 
class  Ocular::Core::PointLight
 
class  Ocular::Core::PointLightRenderable
 
class  Ocular::Core::SpotLight
 
class  Ocular::Core::RenderableRegistrar< T >
 
class  Ocular::Core::MeshRenderable
 
class  Ocular::Core::RoutineRegistrar< T >
 
class  Ocular::Core::FreeFlyController
 
class  Ocular::Core::Scene
 
class  Ocular::Core::SceneLoader
 Handles the loading of .oscene files (Ocular Scene) More...
 
struct  Ocular::Core::Node_Internal
 
class  Ocular::Core::SceneObjectLoader
 Handles the loading of .opre files (Ocular Predefined Scene Object) More...
 
class  Ocular::Core::SceneManager
 
class  Ocular::Core::SceneNode
 
class  Ocular::Core::SceneObject
 
class  Ocular::Core::SceneObjectRegistrar< T >
 
class  Ocular::Core::SceneObjectSaver
 
class  Ocular::Core::SceneSaver
 Handles the saving of .oscene files (Ocular Scene) More...
 
class  Ocular::Core::SystemInfo
 
class  Ocular::Core::Clock
 
class  Ocular::Core::DateTime
 
class  Ocular::Core::Timer
 
class  Ocular::Core::UUID
 
class  Ocular::Editor::EditorCameraController
 

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
 

Detailed Description

Function Documentation

uint32_t Ocular::Core::MeshRenderable::addMaterial ( std::string const &  name)

Adds a new Material.

Parameters
[in]nameThe mapping-name of the Material resource.
Returns
Index assigned to the new Material
uint32_t Ocular::Core::MeshRenderable::addMaterial ( Graphics::Material material)

Adds a new Material.

Parameters
[in]materialPointer to the Material resource. May be NULL.
Returns
Index assigned to the new Material
Graphics::Material * Ocular::Core::MeshRenderable::getMaterial ( uint32_t  index = 0) const

Retrieves the material assigned to the specific index.

Parameters
[in]index
Returns
Pointer to specified Material. May be NULL.
Graphics::Mesh * Ocular::Core::MeshRenderable::getMesh ( ) const

Returns the Mesh currently being rendered.

Returns
Pointer to the rendered Mesh. May be NULL.
std::string const & Ocular::Core::ARenderable::getName ( ) const

Returns the non-unique name assigned to this Renderable.

uint32_t Ocular::Core::MeshRenderable::getNumMaterials ( ) const
Returns
The number of stored Materials. This includes any Materials set to NULL.
SceneObject * Ocular::Core::ARenderable::getParent ( ) const

Returns the SceneObject that this Renderable belongs to.

uint32_t Ocular::Core::MeshRenderable::getRenderPriority ( ) const
overridevirtual
Returns
The highest render priority of all Materials in the MeshRenderable

Reimplemented from Ocular::Core::ARenderable.

uint32_t Ocular::Core::ARenderable::getRenderPriority ( ) const
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.

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

Reimplemented in Ocular::Core::MeshRenderable, and Ocular::Editor::AxisGizmoRenderable.

void Ocular::Core::MeshRenderable::onLoad ( BuilderNode const *  node)
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.

Parameters
[in]nodeNode to extract variable information from

Reimplemented from Ocular::Core::ObjectIO.

void Ocular::Core::MeshRenderable::onSave ( BuilderNode node) const
overridevirtual

Method used to add an object's data to an existing node chain in preparation for being save to a file.

Parameters
[in]nodeNode to place variable information in

Reimplemented from Ocular::Core::ObjectIO.

void Ocular::Core::ARenderable::postRender ( )
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.

void Ocular::Core::ARenderable::postRenderDebug ( )
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.

bool Ocular::Core::ARenderable::preRender ( )
virtual

Called prior to the render method.

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

Returns
If return FALSE, rendering will be cancelled.

Reimplemented in Ocular::Core::MeshRenderable, and Ocular::Editor::AxisGizmoRenderable.

bool Ocular::Core::MeshRenderable::preRender ( )
overridevirtual

Called prior to the render method.

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

Returns
If return FALSE, rendering will be cancelled.

Reimplemented from Ocular::Core::ARenderable.

bool Ocular::Core::ARenderable::preRenderDebug ( )
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.

Returns
If return FALSE, rendering will be cancelled.

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.

Parameters
[in]index
void Ocular::Core::ARenderable::render ( )
virtual

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

Reimplemented in Ocular::Core::MeshRenderable, and Ocular::Editor::AxisGizmoRenderable.

void Ocular::Core::MeshRenderable::render ( )
overridevirtual

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

Reimplemented from Ocular::Core::ARenderable.

void Ocular::Core::MeshRenderable::render ( Graphics::Material material)
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.

Parameters
[in]material

Reimplemented from Ocular::Core::ARenderable.

void Ocular::Core::ARenderable::render ( Graphics::Material material)
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.

Parameters
[in]material

Reimplemented in Ocular::Core::MeshRenderable, and Ocular::Editor::AxisGizmoRenderable.

void Ocular::Core::ARenderable::renderDebug ( )
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.

Parameters
[in]nameThe mapping-name of the Material resource.
[in]indexThe index to place the Material at.
[in]resizeIf true, will add NULL Materials to the Material container until the specified index is valid.
Returns
Returns FALSE if the index exceeds the internal Material container bounds when 'resize' is FALSE
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.

Parameters
[in]materialPointer to the Material resource. May be NULL.
[in]indexThe index to place the Material at.
[in]resizeIf true, will add NULL Materials to the Material container until the specified index is valid.
Returns
Returns FALSE if the index exceeds the internal Material container bounds when 'resize' is FALSE
bool Ocular::Core::MeshRenderable::setMesh ( std::string const &  name)

Sets the Mesh to be rendered.

Parameters
[in]nameThe mapping-name of the Mesh resource to render.
void Ocular::Core::MeshRenderable::setMesh ( Graphics::Mesh mesh)

Sets the Mesh to be rendered.

Parameters
[in]meshPointer to the Mesh resource to render. May be NULL.