Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | Protected Attributes | List of all members
om::graphics::base::Renderable Class Referenceabstract

A base class for objects that can produce renderable graphics data. More...

#include <omGraphicsRenderable.h>

Inheritance diagram for om::graphics::base::Renderable:
om::graphics::devices::GraphicsContextObject om::graphics::scenes::GraphicsObject om::graphics::scenes::GraphicsScene om::graphics::shapes::GraphicsShape om::graphics::shapes::BoxShape om::graphics::shapes::GridShape om::graphics::shapes::Light om::graphics::shapes::LODShape om::graphics::shapes::MeshShape om::graphics::shapes::SkyBoxShape om::graphics::shapes::SubdivisionShape om::graphics::shapes::TransformControl

Public Member Functions

 Renderable ()
 Create a new renderable object with the default renderable flags. More...
 
 Renderable (const RenderableFlags &newFlags)
 Create a new renderable object with the specified renderable flags. More...
 
RenderableFlagsgetFlags ()
 Return a reference to an object that contains boolean parameters of the renderable. More...
 
const RenderableFlagsgetFlags () const
 Return an object that contains boolean parameters of the renderable. More...
 
void setFlags (const RenderableFlags &newFlags)
 Set an object that contains boolean parameters of the renderable. More...
 
Bool flagIsSet (RenderableFlags::Flag flag) const
 Return whether or not the specified boolan flag is set for this renderable. More...
 
Bool flagsAreSet (const RenderableFlags &otherFlags) const
 Return whether or not all of the specified boolan flags are set for this renderable. More...
 
void setFlag (RenderableFlags::Flag flag, Bool newIsSet=true)
 Set whether or not the specified boolan flag is set for this renderable. More...
 
Bool getIsVisible () const
 Get whether or not the renderable and its children are visible in the scene. More...
 
void setIsVisible (Bool newIsVisible)
 Set whether or not the renderable and its children are visible in the scene. More...
 
Bool getShadowsEnabled () const
 Return whether or not this renderable can cast shadows. More...
 
void setShadowsEnabled (Bool newCanCastShadows)
 Set whether or not this renderable can cast shadows. More...
 
virtual void getRenderables (const shapes::RenderRequest &request, const Transform3 &worldTransform, shapes::RenderQueue &outputQueue) const =0
 Process the renderable and add all child renderable objects to the output render queue. More...
 
- Public Member Functions inherited from om::graphics::devices::GraphicsContextObject
virtual ~GraphicsContextObject ()
 Destory this graphics context object. More...
 
GraphicsContextgetContext () const
 Return a pointer to the graphics context this context object is using to do rendering. More...
 
virtual void setContext (GraphicsContext *newContext)
 Set a pointer to the graphics context this context object should use to do rendering. More...
 
void clearContext ()
 Clear the previous context from this object. More...
 
void upload ()
 Upload this resource's CPU representation to the GPU device. More...
 
virtual void upload (UploadRequest &request)
 Upload this resource's CPU representation to the GPU device. More...
 
void download ()
 Upload this resource's CPU representation to the GPU device. More...
 
virtual void download (DownloadRequest &request)
 Download the resource's GPU representation to CPU memory. More...
 
virtual Bool isUploaded () const
 Return whether or not this graphics resource has been successfully created and uploaded to the device. More...
 
virtual Bool isDownloaded () const
 Return whether or not this graphics resource has a copy of its data stored in CPU-side memory. More...
 
virtual Bool isValid () const
 Return whether or not the state of this graphics resource is valid (either on CPU or GPU) and able to be used for rendering. More...
 

Protected Attributes

RenderableFlags flags
 An object containing boolean configuration flags for this renderable. More...
 
- Protected Attributes inherited from om::graphics::devices::GraphicsContextObject
GraphicsContextcontext
 A pointer to the graphics context this object is using. More...
 

Additional Inherited Members

- Protected Member Functions inherited from om::graphics::devices::GraphicsContextObject
 GraphicsContextObject ()
 Create a new graphics context object that doesn't have an associated graphics context. More...
 
 GraphicsContextObject (GraphicsContext *newContext)
 Create a new graphics context object that uses the specified context for rendering. More...
 

Detailed Description

A base class for objects that can produce renderable graphics data.

Constructor & Destructor Documentation

om::graphics::base::Renderable::Renderable ( )
inline

Create a new renderable object with the default renderable flags.

om::graphics::base::Renderable::Renderable ( const RenderableFlags newFlags)
inline

Create a new renderable object with the specified renderable flags.

Member Function Documentation

RenderableFlags& om::graphics::base::Renderable::getFlags ( )
inline

Return a reference to an object that contains boolean parameters of the renderable.

const RenderableFlags& om::graphics::base::Renderable::getFlags ( ) const
inline

Return an object that contains boolean parameters of the renderable.

void om::graphics::base::Renderable::setFlags ( const RenderableFlags newFlags)
inline

Set an object that contains boolean parameters of the renderable.

Bool om::graphics::base::Renderable::flagIsSet ( RenderableFlags::Flag  flag) const
inline

Return whether or not the specified boolan flag is set for this renderable.

Bool om::graphics::base::Renderable::flagsAreSet ( const RenderableFlags otherFlags) const
inline

Return whether or not all of the specified boolan flags are set for this renderable.

void om::graphics::base::Renderable::setFlag ( RenderableFlags::Flag  flag,
Bool  newIsSet = true 
)
inline

Set whether or not the specified boolan flag is set for this renderable.

Bool om::graphics::base::Renderable::getIsVisible ( ) const
inline

Get whether or not the renderable and its children are visible in the scene.

void om::graphics::base::Renderable::setIsVisible ( Bool  newIsVisible)
inline

Set whether or not the renderable and its children are visible in the scene.

Bool om::graphics::base::Renderable::getShadowsEnabled ( ) const
inline

Return whether or not this renderable can cast shadows.

void om::graphics::base::Renderable::setShadowsEnabled ( Bool  newCanCastShadows)
inline

Set whether or not this renderable can cast shadows.

virtual void om::graphics::base::Renderable::getRenderables ( const shapes::RenderRequest request,
const Transform3 worldTransform,
shapes::RenderQueue outputQueue 
) const
pure virtual

Member Data Documentation

RenderableFlags om::graphics::base::Renderable::flags
protected

An object containing boolean configuration flags for this renderable.


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