CEL

Public API Reference

iPcDynamicWorld Struct Reference

Interface to the dynamic world plugin. More...

#include <propclass/dynworld.h>

Inheritance diagram for iPcDynamicWorld:

List of all members.

Public Member Functions

virtual iDynamicCellAddCell (const char *name, iSector *sector, CS::Physics::iPhysicalSector *dynSector=0)=0
 Add a new cell to the world.
virtual iDynamicFactoryAddFactory (const char *factory, float maxradius, float imposterradius)=0
 Add a new dynamic factory to the world.
virtual iDynamicFactoryAddLightFactory (const char *factory, float maxradius)=0
 Add a new dynamic factory to the world.
virtual iDynamicFactoryAddLogicFactory (const char *factory, float maxradius, float imposterradius, const csBox3 &box)=0
 Add a special dynamic factory which is intended for game logic purposes.
virtual void DeleteAll ()=0
 Delete everything.
virtual void DeleteFactories ()=0
 Remove all factories.
virtual void Dump ()=0
 For debugging: dump information about the DynWorld status.
virtual void EnableGameMode (bool e)=0
 Enable/disable game mode.
virtual void EnablePhysics (bool e)=0
 Enable/disable physics mode.
virtual iDynamicCellFindCell (const char *name)=0
 Find a cell by name.
virtual iDecalTemplateFindDecalTemplate (const char *name)=0
 Find a decal template by name.
virtual iDynamicFactoryFindFactory (const char *name) const =0
 Find a factory.
virtual iDynamicObjectFindObject (uint id) const =0
 Find an object given it's id.
virtual iDynamicObjectFindObject (const char *name) const =0
 Find an object given its entity name.
virtual iDynamicObjectFindObject (iMeshWrapper *mesh) const =0
 Find an object given its mesh.
virtual iDynamicObjectFindObject (CS::Physics::iRigidBody *body) const =0
 Find an object given its rigid body.
virtual iDynamicObjectFindObject (iCelEntity *entity) const =0
 Find a dynamic object from the entity.
virtual void ForceInvisible (iDynamicObject *dynobj)=0
 Force a dynamic object to be invisible.
virtual void ForceView (iCamera *camera)=0
 Similar to PrepareView but doesn't do fading.
virtual void ForceVisible (iDynamicObject *dynobj)=0
 Force a dynamic object to be visible.
virtual csPtr
< iDynamicCellIterator
GetCells () const =0
 Get an iterator to iterate over all cells.
virtual iDynamicCellGetCurrentCell () const =0
 Get the current cell.
virtual iDecalTemplateGetDecalTemplate (size_t index) const =0
 Get a decal template.
virtual size_t GetDecalTemplateCount () const =0
 Get the number of decal templates.
virtual iDynamicFactoryGetFactory (size_t index) const =0
 Get a factory.
virtual size_t GetFactoryCount () const =0
 Get the number of factories.
virtual float GetRadius () const =0
 Get the view radius.
virtual void InhibitEntities (bool e)=0
 Inhibit the creation of entities.
virtual bool IsInhibitEntities () const =0
 Returns true if entity creation is inhibited.
virtual csRef< iStringLoad (iDocumentNode *node)=0
 Load the world from XML.
virtual void MarkBaseline ()=0
 Mark the baseline.
virtual void PrepareView (iCamera *camera, float elapsed_time)=0
 Prepare the sector for viewing at a certain location.
virtual void RegisterDecalTemplate (const char *name, iDecalTemplate *tpl)=0
 Register a new decal template.
virtual void RemoveCell (iDynamicCell *cell)=0
 Remove a cell.
virtual void RemoveDecalTemplate (const char *name)=0
 Remove a decal template.
virtual void RemoveDecalTemplates ()=0
 Remove all decal templates.
virtual void RemoveFactory (iDynamicFactory *factory)=0
 Remove a factory from the world.
virtual void RestoreModifications (iDataBuffer *buf)=0
 Restore a save file from the baseline.
virtual void Save (iDocumentNode *node)=0
 Save the world to XML.
virtual csPtr< iDataBufferSaveModifications ()=0
 Save the modifications since the baseline.
virtual void SetCurrentCell (iDynamicCell *cell)=0
 Set a cell as current.
virtual void SetDynamicCellCreator (iDynamicCellCreator *creator)=0
 Set a dynamic cell creator to be used when the dynamic world plugin needs to create a cell.
virtual void SetELCM (iELCM *elcm)=0
 Set an optional ELCM plugin to use for managing life time of entities.
virtual void SetRadius (float radius)=0
 Set the view radius.
virtual void UpdateObject (iDynamicObject *dynobj)=0
 Update a dynamic object in case external situations change.
virtual void UpdateObjects (iDynamicFactory *factory)=0
 Update all objects created from a factory.
virtual void UpdateObjects (iDynamicCell *cell)=0
 Update all objects in a cell.

Detailed Description

Interface to the dynamic world plugin.

This property class supports the following properties:

Definition at line 745 of file dynworld.h.


Member Function Documentation

virtual iDynamicCell* iPcDynamicWorld::AddCell ( const char *  name,
iSector sector,
CS::Physics::iPhysicalSector dynSector = 0 
) [pure virtual]

Add a new cell to the world.

If dynSys is 0 then this function will create its own physical sector and it will also destroy it in case the cell is removed.

virtual iDynamicFactory* iPcDynamicWorld::AddFactory ( const char *  factory,
float  maxradius,
float  imposterradius 
) [pure virtual]

Add a new dynamic factory to the world.

Parameters:
maxradius is a relative maximum radius (0 to 1) at which point the object should become visible. It is relative to the total maximum radius maintained by this world.
imposterradius is the relative radius (0 to 1) at which the object should be impostered. Set to negative if you don't want to use imposters at all. It is also relative to the total maximum radius maintained by this world. Note that imposterradius should always be less then maxradius.
virtual iDynamicFactory* iPcDynamicWorld::AddLightFactory ( const char *  factory,
float  maxradius 
) [pure virtual]

Add a new dynamic factory to the world.

This version supports a light factory.

Parameters:
maxradius is a relative maximum radius (0 to 1) at which point the light should become visible. It is relative to the total maximum radius maintained by this world.
virtual iDynamicFactory* iPcDynamicWorld::AddLogicFactory ( const char *  factory,
float  maxradius,
float  imposterradius,
const csBox3 box 
) [pure virtual]

Add a special dynamic factory which is intended for game logic purposes.

The objects created by this factory are invisible (in game mode) and can act as special containers for game logic or for connecting joints.

virtual void iPcDynamicWorld::DeleteAll (  )  [pure virtual]

Delete everything.

virtual void iPcDynamicWorld::DeleteFactories (  )  [pure virtual]

Remove all factories.

virtual void iPcDynamicWorld::Dump (  )  [pure virtual]

For debugging: dump information about the DynWorld status.

virtual void iPcDynamicWorld::EnableGameMode ( bool  e  )  [pure virtual]

Enable/disable game mode.

In game mode (default) logic objects are invisible. If game mode is disabled then they are visible but with a transparent texture.

virtual void iPcDynamicWorld::EnablePhysics ( bool  e  )  [pure virtual]

Enable/disable physics mode.

Physics mode is enabled by default. If enabled physics bodies will be made for the objects if they have them defined. Otherwise no such bodies are created. It is safe to call this function after objects have been created already. Existing bodies will be created/removed on demand.

virtual iDynamicCell* iPcDynamicWorld::FindCell ( const char *  name  )  [pure virtual]

Find a cell by name.

virtual iDecalTemplate* iPcDynamicWorld::FindDecalTemplate ( const char *  name  )  [pure virtual]

Find a decal template by name.

virtual iDynamicFactory* iPcDynamicWorld::FindFactory ( const char *  name  )  const [pure virtual]

Find a factory.

virtual iDynamicObject* iPcDynamicWorld::FindObject ( uint  id  )  const [pure virtual]

Find an object given it's id.

virtual iDynamicObject* iPcDynamicWorld::FindObject ( const char *  name  )  const [pure virtual]

Find an object given its entity name.

This only works for dynamic objects for which a unique entity name has been given.

virtual iDynamicObject* iPcDynamicWorld::FindObject ( iMeshWrapper mesh  )  const [pure virtual]

Find an object given its mesh.

virtual iDynamicObject* iPcDynamicWorld::FindObject ( CS::Physics::iRigidBody body  )  const [pure virtual]

Find an object given its rigid body.

virtual iDynamicObject* iPcDynamicWorld::FindObject ( iCelEntity entity  )  const [pure virtual]

Find a dynamic object from the entity.

virtual void iPcDynamicWorld::ForceInvisible ( iDynamicObject dynobj  )  [pure virtual]

Force a dynamic object to be invisible.

This will force the removal of the mesh.

virtual void iPcDynamicWorld::ForceView ( iCamera camera  )  [pure virtual]

Similar to PrepareView but doesn't do fading.

The new visible objects will be visible at once and the invisible objects will be invisible at once. This is useful for teleport and quick cell traversal.

virtual void iPcDynamicWorld::ForceVisible ( iDynamicObject dynobj  )  [pure virtual]

Force a dynamic object to be visible.

This will force the creation of the mesh.

virtual csPtr<iDynamicCellIterator> iPcDynamicWorld::GetCells (  )  const [pure virtual]

Get an iterator to iterate over all cells.

virtual iDynamicCell* iPcDynamicWorld::GetCurrentCell (  )  const [pure virtual]

Get the current cell.

virtual iDecalTemplate* iPcDynamicWorld::GetDecalTemplate ( size_t  index  )  const [pure virtual]

Get a decal template.

virtual size_t iPcDynamicWorld::GetDecalTemplateCount (  )  const [pure virtual]

Get the number of decal templates.

virtual iDynamicFactory* iPcDynamicWorld::GetFactory ( size_t  index  )  const [pure virtual]

Get a factory.

virtual size_t iPcDynamicWorld::GetFactoryCount (  )  const [pure virtual]

Get the number of factories.

virtual float iPcDynamicWorld::GetRadius (  )  const [pure virtual]

Get the view radius.

virtual void iPcDynamicWorld::InhibitEntities ( bool  e  )  [pure virtual]

Inhibit the creation of entities.

This is useful in case you have an editor and don't want the entities to be created. Note that changing this flag has no effect on already existing dynamic objects.

virtual bool iPcDynamicWorld::IsInhibitEntities (  )  const [pure virtual]

Returns true if entity creation is inhibited.

virtual csRef<iString> iPcDynamicWorld::Load ( iDocumentNode node  )  [pure virtual]

Load the world from XML.

Return 0 on success or otherwise a string with the error.

virtual void iPcDynamicWorld::MarkBaseline (  )  [pure virtual]

Mark the baseline.

virtual void iPcDynamicWorld::PrepareView ( iCamera camera,
float  elapsed_time 
) [pure virtual]

Prepare the sector for viewing at a certain location.

virtual void iPcDynamicWorld::RegisterDecalTemplate ( const char *  name,
iDecalTemplate tpl 
) [pure virtual]

Register a new decal template.

The dynamic world plugin will then keep track (and hold a reference) to this template so that dynamic objects can later use it.

virtual void iPcDynamicWorld::RemoveCell ( iDynamicCell cell  )  [pure virtual]

Remove a cell.

virtual void iPcDynamicWorld::RemoveDecalTemplate ( const char *  name  )  [pure virtual]

Remove a decal template.

virtual void iPcDynamicWorld::RemoveDecalTemplates (  )  [pure virtual]

Remove all decal templates.

virtual void iPcDynamicWorld::RemoveFactory ( iDynamicFactory factory  )  [pure virtual]

Remove a factory from the world.

virtual void iPcDynamicWorld::RestoreModifications ( iDataBuffer buf  )  [pure virtual]

Restore a save file from the baseline.

virtual void iPcDynamicWorld::Save ( iDocumentNode node  )  [pure virtual]

Save the world to XML.

virtual csPtr<iDataBuffer> iPcDynamicWorld::SaveModifications (  )  [pure virtual]

Save the modifications since the baseline.

virtual void iPcDynamicWorld::SetCurrentCell ( iDynamicCell cell  )  [pure virtual]

Set a cell as current.

virtual void iPcDynamicWorld::SetDynamicCellCreator ( iDynamicCellCreator creator  )  [pure virtual]

Set a dynamic cell creator to be used when the dynamic world plugin needs to create a cell.

virtual void iPcDynamicWorld::SetELCM ( iELCM elcm  )  [pure virtual]

Set an optional ELCM plugin to use for managing life time of entities.

virtual void iPcDynamicWorld::SetRadius ( float  radius  )  [pure virtual]

Set the view radius.

Default radius is 20.

virtual void iPcDynamicWorld::UpdateObject ( iDynamicObject dynobj  )  [pure virtual]

Update a dynamic object in case external situations change.

This may recreate the physics bodies, joints, recreate the mesh and/or light if needed and so on. This is typically used by editors to be able to refresh the objects currently being edited.

virtual void iPcDynamicWorld::UpdateObjects ( iDynamicFactory factory  )  [pure virtual]

Update all objects created from a factory.

virtual void iPcDynamicWorld::UpdateObjects ( iDynamicCell cell  )  [pure virtual]

Update all objects in a cell.


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

Generated for CEL: Crystal Entity Layer 2.1 by doxygen 1.6.1