Drag[en]gine Game Engine  1.21
dePropField Class Reference

Prop Field. More...

#include <dePropField.h>

Inheritance diagram for dePropField:
deResource deObject

Public Types

typedef deTObjectReference< dePropFieldRef
 Type holding strong reference. More...
 
- Public Types inherited from deResource
typedef deTObjectReference< deResourceRef
 Type holding strong reference. More...
 
- Public Types inherited from deObject
typedef deTObjectReference< deObjectRef
 Type holding strong reference. More...
 

Public Member Functions

Management
const decDVectorGetPosition () const
 Position. More...
 
void SetPosition (const decDVector &position)
 Set position. More...
 
int GetTypeCount () const
 Number of types. More...
 
dePropFieldTypeGetTypeAt (int index) const
 Type at the given index. More...
 
int IndexOfType (dePropFieldType *type) const
 Index of the given type of -1 if not found. More...
 
void AddType (dePropFieldType *type)
 Adds a type. More...
 
void RemoveType (dePropFieldType *type)
 Removes the given type. More...
 
void RemoveAllTypes ()
 Removes all types. More...
 
void NotifyTypeChanged (int type)
 Notifies the peers that the given type changed. More...
 
void NotifyInstancesChanged (int type)
 Notifies the peers that the given type instances changed. More...
 
void NotifyAssignmentsChanged (int type)
 Notifies the peers that the given type instances to bend states assignments changed. More...
 
void NotifyBendStatesChanged (int type)
 Notifies the peers that the given type bend states changed. More...
 
void NotifyGroundChanged ()
 Notifies the graphic module that the ground changed. More...
 
void NotifyCreateInstances (float density)
 Requests the scripting module to create instances using the given density. More...
 
void NotifyProjectInstances (const dePropFieldGround &ground, const decVector &direction)
 Requests the physics module to project all instances to the given ground. More...
 
System Peers
deBaseGraphicPropFieldGetPeerGraphic () const
 Graphic system peer object. More...
 
void SetPeerGraphic (deBaseGraphicPropField *peer)
 Set graphic system peer object. More...
 
deBasePhysicsPropFieldGetPeerPhysics () const
 Physics system peer object. More...
 
void SetPeerPhysics (deBasePhysicsPropField *peer)
 Set physics system peer object. More...
 
deBaseScriptingPropFieldGetPeerScripting () const
 Scripting system peer object. More...
 
void SetPeerScripting (deBaseScriptingPropField *peer)
 Set scripting system peer object. More...
 
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)
 Create new prop field. More...
 
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.

Member Typedef Documentation

◆ Ref

Type holding strong reference.

Constructor & Destructor Documentation

◆ dePropField()

dePropField::dePropField ( dePropFieldManager manager)

Create 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.

◆ GetLLWorldNext()

dePropField* dePropField::GetLLWorldNext ( ) const
inline

Next prop field in the parent world linked list.

◆ GetLLWorldPrev()

dePropField* dePropField::GetLLWorldPrev ( ) const
inline

Previous prop field in the parent world linked list.

◆ GetParentWorld()

deWorld* dePropField::GetParentWorld ( ) const
inline

Parent world or NULL.

◆ GetPeerGraphic()

deBaseGraphicPropField* dePropField::GetPeerGraphic ( ) const
inline

Graphic system peer object.

◆ GetPeerPhysics()

deBasePhysicsPropField* dePropField::GetPeerPhysics ( ) const
inline

Physics system peer object.

◆ GetPeerScripting()

deBaseScriptingPropField* dePropField::GetPeerScripting ( ) const
inline

Scripting system peer object.

◆ GetPosition()

const decDVector& dePropField::GetPosition ( ) const
inline

Position.

◆ GetTypeAt()

dePropFieldType* dePropField::GetTypeAt ( int  index) const

Type at the given index.

◆ GetTypeCount()

int dePropField::GetTypeCount ( ) const
inline

Number of types.

◆ IndexOfType()

int dePropField::IndexOfType ( dePropFieldType type) const

Index of the given type of -1 if not found.

◆ NotifyAssignmentsChanged()

void dePropField::NotifyAssignmentsChanged ( int  type)

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

◆ NotifyBendStatesChanged()

void dePropField::NotifyBendStatesChanged ( int  type)

Notifies the peers that the given type bend states changed.

◆ NotifyCreateInstances()

void dePropField::NotifyCreateInstances ( float  density)

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

◆ NotifyGroundChanged()

void dePropField::NotifyGroundChanged ( )

Notifies the graphic module that the ground changed.

◆ NotifyInstancesChanged()

void dePropField::NotifyInstancesChanged ( int  type)

Notifies the peers that the given type instances changed.

◆ NotifyProjectInstances()

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

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

◆ NotifyTypeChanged()

void dePropField::NotifyTypeChanged ( int  type)

Notifies the peers that the given type changed.

◆ RemoveAllTypes()

void dePropField::RemoveAllTypes ( )

Removes all types.

◆ RemoveType()

void dePropField::RemoveType ( dePropFieldType type)

Removes the given type.

◆ SetLLWorldNext()

void dePropField::SetLLWorldNext ( dePropField propField)

Set next prop field in the parent world linked list.

◆ SetLLWorldPrev()

void dePropField::SetLLWorldPrev ( dePropField propField)

Set next prop field in the parent world linked list.

◆ SetParentWorld()

void dePropField::SetParentWorld ( deWorld world)

Set parent world or NULL.

◆ SetPeerGraphic()

void dePropField::SetPeerGraphic ( deBaseGraphicPropField peer)

Set graphic system peer object.

◆ SetPeerPhysics()

void dePropField::SetPeerPhysics ( deBasePhysicsPropField peer)

Set physics system peer object.

◆ SetPeerScripting()

void dePropField::SetPeerScripting ( deBaseScriptingPropField peer)

Set scripting system peer object.

◆ SetPosition()

void dePropField::SetPosition ( const decDVector position)

Set position.


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