Dragonfly  4.3
A text-based game engine
Public Member Functions | Private Attributes | List of all members
df::SceneGraph Class Reference
Collaboration diagram for df::SceneGraph:
Collaboration graph
[legend]

Public Member Functions

int insertObject (Object *p_o)
 
int removeObject (Object *p_o)
 
ObjectList activeObjects () const
 
ObjectList solidObjects () const
 
ObjectList visibleObjects (int altitude) const
 
ObjectList inactiveObjects () const
 
int updateAltitude (Object *p_o, int new_alt)
 
int updateSolidness (Object *p_o, Solidness new_solidness)
 
int updateVisible (Object *p_vo, bool new_visible)
 
int updateActive (Object *p_o, bool new_active)
 

Private Attributes

ObjectList m_active_objects
 
ObjectList m_solid_objects
 
ObjectList m_visible_objects [MAX_ALTITUDE+1]
 
ObjectList m_inactive_objects
 

Member Function Documentation

ObjectList df::SceneGraph::activeObjects ( ) const

Return all active Objects. Empty list if none.

ObjectList df::SceneGraph::inactiveObjects ( ) const

Return all inactive Objects. Empty list if none.

int df::SceneGraph::insertObject ( Object p_o)

Insert Object into SceneGraph.

int df::SceneGraph::removeObject ( Object p_o)

Remove Object from SceneGraph.

ObjectList df::SceneGraph::solidObjects ( ) const

Return all active, solid Objects. Empty list if none.

int df::SceneGraph::updateActive ( Object p_o,
bool  new_active 
)

Re-position Object in SceneGraph to new activeness.

Return 0 if ok, else -1.

int df::SceneGraph::updateAltitude ( Object p_o,
int  new_alt 
)

Re-position Object in SceneGraph to new altitude.

Return 0 if ok, else -1.

int df::SceneGraph::updateSolidness ( Object p_o,
Solidness  new_solidness 
)

Re-position Object in SceneGraph to new solidness.

Return 0 if ok, else -1.

int df::SceneGraph::updateVisible ( Object p_vo,
bool  new_visible 
)

Re-position Object in SceneGraph to new visibility.

Return 0 if ok, else -1.

ObjectList df::SceneGraph::visibleObjects ( int  altitude) const

Return all active, visible Objects at altitude. Empty list if none.

Member Data Documentation

ObjectList df::SceneGraph::m_active_objects
private

All active Objects.

ObjectList df::SceneGraph::m_inactive_objects
private

All inactive Objects.

ObjectList df::SceneGraph::m_solid_objects
private

Solid Objects.

ObjectList df::SceneGraph::m_visible_objects[MAX_ALTITUDE+1]
private

Visible Objects.