Drag[en]gine Game Engine  1.0
dePropField Class Reference

Prop Field. More...

#include <dePropField.h>

Inheritance diagram for dePropField:
deResource deObject

Public Member Functions

Management
const decDVectorGetPosition () const
 
void SetPosition (const decDVector &position)
 
int GetTypeCount () const
 
dePropFieldTypeGetTypeAt (int index) const
 
int IndexOfType (dePropFieldType *type) const
 
void AddType (dePropFieldType *type)
 
void RemoveType (dePropFieldType *type)
 
void RemoveAllTypes ()
 
void NotifyTypeChanged (int type)
 
void NotifyInstancesChanged (int type)
 
void NotifyAssignmentsChanged (int type)
 
void NotifyBendStatesChanged (int type)
 
void NotifyGroundChanged ()
 
void NotifyCreateInstances (float density)
 
void NotifyProjectInstances (const dePropFieldGround &ground, const decVector &direction)
 
System Peers
deBaseGraphicPropFieldGetGraphicPropField () const
 
void SetGraphicPropField (deBaseGraphicPropField *peer)
 
deBasePhysicsPropFieldGetPhysicsPropField () const
 
void SetPhysicsPropField (deBasePhysicsPropField *peer)
 
deBaseScriptingPropFieldGetScriptingPropField () const
 
void SetScriptingPropField (deBaseScriptingPropField *peer)
 
Linked List
deWorldGetParentWorld () const
 Parent world or NULL. More...
 
void SetParentWorld (deWorld *world)
 Set parent world or NULL. More...
 
dePropFieldGetLLWorldPrev () const
 Previous prop field in the parent world linked list. More...
 
void SetLLWorldPrev (dePropField *propField)
 Set next prop field in the parent world linked list. More...
 
dePropFieldGetLLWorldNext () const
 Next prop field in the parent world linked list. More...
 
void SetLLWorldNext (dePropField *propField)
 Set next prop field in the parent world linked list. More...
 
- Public Member Functions inherited from deResource
deResourceManagerGetResourceManager () const
 Resource manager or NULL if resource is leaking. More...
 
deEngineGetEngine () const
 Game engine object from resource manager. More...
 
deResourceGetLLManagerPrev () const
 Previous resource in the resource manager linked list. More...
 
void SetLLManagerPrev (deResource *resource)
 Set next resource in the resource manager linked list. More...
 
deResourceGetLLManagerNext () const
 Next resource in the resource manager linked list. More...
 
void SetLLManagerNext (deResource *resource)
 Set next resource in the resource manager linked list. More...
 
void MarkLeaking ()
 Marks the resource leaking. More...
 
 deResource (deResourceManager *resourceManager)
 Create resource. More...
 
- Public Member Functions inherited from deObject
int GetRefCount () const
 Reference count. More...
 
void AddReference ()
 Add reference increasing reference count by 1. More...
 
void FreeReference ()
 Decrease reference count by one and delete object if count reaches 0. More...
 
 deObject ()
 Create object with reference count of 1. More...
 

Constructors and Destructors

 dePropField (dePropFieldManager *manager)
 
virtual ~dePropField ()
 Clean up prop field. More...
 

Additional Inherited Members

- Protected Member Functions inherited from deResource
virtual ~deResource ()
 Clean up resource. More...
 
- Protected Member Functions inherited from deObject
virtual ~deObject ()
 Clean up object. More...
 

Detailed Description

Prop Field.

Prop fields define a large number of inexpensive models used to populate with vegetation or props in general for improved visuals. These props are not required to be rendered or simulated in a physical way for the game to work. Prop fields have a couple of restrictions on how these props are defined to create large numbers of props with little definition, processing and memory overhead. Each prop field contains a list of types.

Author
Pl├╝ss Roland
Version
1.0
Date
2009

Constructor & Destructor Documentation

◆ dePropField()

dePropField::dePropField ( dePropFieldManager manager)

Creates a new prop field.

◆ ~dePropField()

virtual dePropField::~dePropField ( )
protectedvirtual

Clean up prop field.

Note
Subclasses should set their destructor protected too to avoid users accidently deleting a reference counted object through the object pointer. Only FreeReference() is allowed to delete the object.

Member Function Documentation

◆ AddType()

void dePropField::AddType ( dePropFieldType type)

Adds a type.

Referenced by GetTypeCount().

◆ GetGraphicPropField()

deBaseGraphicPropField* dePropField::GetGraphicPropField ( ) const
inline

Retrieves the graphic system peer object.

References SetGraphicPropField().

◆ GetLLWorldNext()

dePropField* dePropField::GetLLWorldNext ( ) const
inline

Next prop field in the parent world linked list.

References SetLLWorldNext().

◆ GetLLWorldPrev()

dePropField* dePropField::GetLLWorldPrev ( ) const
inline

Previous prop field in the parent world linked list.

References SetLLWorldPrev().

◆ GetParentWorld()

deWorld* dePropField::GetParentWorld ( ) const
inline

Parent world or NULL.

References SetParentWorld().

◆ GetPhysicsPropField()

deBasePhysicsPropField* dePropField::GetPhysicsPropField ( ) const
inline

Retrieves the physics system peer object.

References SetPhysicsPropField().

◆ GetPosition()

const decDVector& dePropField::GetPosition ( ) const
inline

Retrieves the position.

References SetPosition().

◆ GetScriptingPropField()

deBaseScriptingPropField* dePropField::GetScriptingPropField ( ) const
inline

Retrieves the scripting system peer object.

References SetScriptingPropField().

◆ GetTypeAt()

dePropFieldType* dePropField::GetTypeAt ( int  index) const

Retrieves the type at the given index.

Referenced by GetTypeCount().

◆ GetTypeCount()

◆ IndexOfType()

int dePropField::IndexOfType ( dePropFieldType type) const

Retrieves the index of the given type of -1 if not found.

Referenced by GetTypeCount().

◆ NotifyAssignmentsChanged()

void dePropField::NotifyAssignmentsChanged ( int  type)

Notifies the peers that the given type instances to bend states assignments changed.

Referenced by GetTypeCount().

◆ NotifyBendStatesChanged()

void dePropField::NotifyBendStatesChanged ( int  type)

Notifies the peers that the given type bend states changed.

Referenced by GetTypeCount().

◆ NotifyCreateInstances()

void dePropField::NotifyCreateInstances ( float  density)

Requests the scripting module to create instances using the given density.

Referenced by GetTypeCount().

◆ NotifyGroundChanged()

void dePropField::NotifyGroundChanged ( )

Notifies the graphic module that the ground changed.

Referenced by GetTypeCount().

◆ NotifyInstancesChanged()

void dePropField::NotifyInstancesChanged ( int  type)

Notifies the peers that the given type instances changed.

Referenced by GetTypeCount().

◆ NotifyProjectInstances()

void dePropField::NotifyProjectInstances ( const dePropFieldGround ground,
const decVector direction 
)

Requests the physics module to project all instances to the given ground.

Referenced by GetTypeCount().

◆ NotifyTypeChanged()

void dePropField::NotifyTypeChanged ( int  type)

Notifies the peers that the given type changed.

Referenced by GetTypeCount().

◆ RemoveAllTypes()

void dePropField::RemoveAllTypes ( )

Removes all types.

Referenced by GetTypeCount().

◆ RemoveType()

void dePropField::RemoveType ( dePropFieldType type)

Removes the given type.

Referenced by GetTypeCount().

◆ SetGraphicPropField()

void dePropField::SetGraphicPropField ( deBaseGraphicPropField peer)

Sets the graphic system peer object.

Referenced by GetGraphicPropField().

◆ SetLLWorldNext()

void dePropField::SetLLWorldNext ( dePropField propField)

Set next prop field in the parent world linked list.

Referenced by GetLLWorldNext().

◆ SetLLWorldPrev()

void dePropField::SetLLWorldPrev ( dePropField propField)

Set next prop field in the parent world linked list.

Referenced by GetLLWorldPrev().

◆ SetParentWorld()

void dePropField::SetParentWorld ( deWorld world)

Set parent world or NULL.

Referenced by GetParentWorld().

◆ SetPhysicsPropField()

void dePropField::SetPhysicsPropField ( deBasePhysicsPropField peer)

Sets the physics system peer object.

Referenced by GetPhysicsPropField().

◆ SetPosition()

void dePropField::SetPosition ( const decDVector position)

Sets the position.

Referenced by GetPosition().

◆ SetScriptingPropField()

void dePropField::SetScriptingPropField ( deBaseScriptingPropField peer)

Sets the scripting system peer object.

Referenced by GetScriptingPropField().


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