Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | Related Pages

RenderEntity Class Reference

#include <renderentity.h>

Inheritance diagram for RenderEntity:

Inheritance graph
[legend]
Collaboration diagram for RenderEntity:

Collaboration graph
[legend]
List of all members.

Detailed Description

Interface for renderable objects A renderable object overloads and implements the Render method, optionally using the base Render method to use the automatic check for redundant multiple render calls per frame. This base class keeps track of the last frame the object was rendered, and if already rendered the current frame, the base Render method will return false (otherwise true).

Render objects are derived from Activator for easy on/off management. The base Render method returns false if the object is not active.

Author:
Mattias Jansson (mattias@realityrift.com)
Todo:
What happens with frame tracker in a multithreaded app with multiple render devices?


Public Member Functions

 RenderEntity ()
virtual ~RenderEntity ()
virtual bool Render (Frustum *pkFrustum=0, bool bForce=false)
bool IsActive () const
virtual void Activate ()
virtual void Deactivate ()
bool Toggle ()

Public Attributes

unsigned int m_uiLastFrame

Static Public Attributes

unsigned int s_uiFrameCount

Protected Attributes

bool m_bActive


Constructor & Destructor Documentation

RenderEntity  )  [inline]
 

virtual ~RenderEntity  )  [inline, virtual]
 


Member Function Documentation

virtual bool Render Frustum pkFrustum = 0,
bool  bForce = false
[inline, virtual]
 

Render object

Parameters:
pkFrustum Current view frustum (if any)
bForce Render even if rendered previously this frame or deactivated (default false)
Returns:
true if we were rendered, false if not (already rendered, not forced)

Reimplemented in Camera, Console, Light, MeshEntity, ProfileManager, Room, SceneNode, Skeleton, SkyBox, SkyDome, and Sprite.

bool IsActive  )  const [inline, inherited]
 

Query state of object

Returns:
true if active, false if not

void Activate  )  [inline, virtual, inherited]
 

Activate object

void Deactivate  )  [inline, virtual, inherited]
 

Deactivate object

bool Toggle  )  [inline, inherited]
 

Toggle active state. This method does not need to be overloaded, it is only a wrapper to Activate and Deactivate

Returns:
true if activated, false if deactivated


Member Data Documentation

unsigned int s_uiFrameCount [static]
 

Frame counter (at 500 frames per second, can be active ~100 days continously before loop, and then it will just skip one frame -> safe enough)

unsigned int m_uiLastFrame
 

Last frame count we were rendered

bool m_bActive [protected, inherited]
 

Active flag


The documentation for this class was generated from the following file:
Generated on Wed Jan 21 14:21:14 2004 for NeoEngine by doxygen 1.3.5