Drag[en]gine Game Engine  1.0
dePropFieldType Class Reference

Prop Field Type. More...

#include <dePropFieldType.h>

Public Member Functions

Constructors and Destructors
 dePropFieldType ()
 
 ~dePropFieldType ()
 
Management
deModelGetModel () const
 
void SetModel (deModel *model)
 
deSkinGetSkin () const
 
void SetSkin (deSkin *skin)
 
float GetRotationPerForce () const
 
void SetRotationPerForce (float rotation)
 
float GetRestitution () const
 
void SetRestitution (float restitution)
 
decCollisionFilterGetCollisionFilter ()
 Retrieves the collision filter. More...
 
const decCollisionFilterGetCollisionFilter () const
 
int GetInstanceCount () const
 
void SetInstanceCount (int count)
 
dePropFieldInstanceGetInstanceAt (int index) const
 
dePropFieldInstanceGetInstances () const
 
int GetBendStateCount () const
 
void SetBendStateCount (int count)
 
dePropFieldBendStateGetBendStateAt (int index) const
 
dePropFieldBendStateGetBendStates () const
 

Detailed Description

Prop Field Type.

Defines a prop type in a prop field. Each prop type has a static model, a skin and a list of instances. Each instance uses the parameters of the type but has a specific placement. Instances are projected onto the hosting surface. For performance and memory reasons the number of instances is an immutable parameter given during construction time. In games you need to init this number anyways only during loading time and during run time the number is constant. Editors can recreate the type to alter the count of instances. The parent prop field allows to mutate the list of types so this restriction is not a road blocking one.

Author
Pl├╝ss Roland
Version
1.0
Date
2009

Constructor & Destructor Documentation

◆ dePropFieldType()

dePropFieldType::dePropFieldType ( )

Creates a new prop field type. The instance count has to be at least 1.

◆ ~dePropFieldType()

dePropFieldType::~dePropFieldType ( )

Cleans up the prop field type.

Member Function Documentation

◆ GetBendStateAt()

dePropFieldBendState& dePropFieldType::GetBendStateAt ( int  index) const

Retrieves the bend state at the given index.

Referenced by GetBendStateCount().

◆ GetBendStateCount()

int dePropFieldType::GetBendStateCount ( ) const
inline

Retrieves the number of bend states.

References GetBendStateAt(), and SetBendStateCount().

◆ GetBendStates()

dePropFieldBendState* dePropFieldType::GetBendStates ( ) const
inline

Retrieves the list of bend states. Be careful with this method call as it is one intended only for performance usage. Make sure you to not read or write more than GetBendStateCount elements. This array is not guaranteed to be the same for the entire lifetime of this object but is a continuous list. If possible use the GetBendStateAt method call to obtain the individual bend states as there boundary checks are conducted. If you need direct access due to performance reasons only keep to this pointer for the short time you do some work.

◆ GetCollisionFilter() [1/2]

decCollisionFilter& dePropFieldType::GetCollisionFilter ( )
inline

Retrieves the collision filter.

◆ GetCollisionFilter() [2/2]

const decCollisionFilter& dePropFieldType::GetCollisionFilter ( ) const
inline

◆ GetInstanceAt()

dePropFieldInstance& dePropFieldType::GetInstanceAt ( int  index) const

Retrieves the instance at the given index.

Referenced by GetInstanceCount().

◆ GetInstanceCount()

int dePropFieldType::GetInstanceCount ( ) const
inline

Retrieves the number of instances.

References GetInstanceAt(), and SetInstanceCount().

◆ GetInstances()

dePropFieldInstance* dePropFieldType::GetInstances ( ) const
inline

Retrieves the list of instances. Be careful with this method call as it is one intended only for performance usage. Make sure you to not read or write more than GetInstanceCount elements. You can be sure that the returned array is the same for the entire lifetime of this object and contains the instances in a continuous list. If possible use the GetInstanceAt method call to obtain the individual instances as there boundary checks are conducted.

◆ GetModel()

deModel* dePropFieldType::GetModel ( ) const
inline

Retrieves the model or NULL if not set.

References SetModel().

◆ GetRestitution()

float dePropFieldType::GetRestitution ( ) const
inline

Retrieves the restitution.

References SetRestitution().

◆ GetRotationPerForce()

float dePropFieldType::GetRotationPerForce ( ) const
inline

Retrieves the rotation per force.

References SetRotationPerForce().

◆ GetSkin()

deSkin* dePropFieldType::GetSkin ( ) const
inline

Retrieves the skin or NULL if not set.

References SetSkin().

◆ SetBendStateCount()

void dePropFieldType::SetBendStateCount ( int  count)

Sets the number of bend states.

Referenced by GetBendStateCount().

◆ SetInstanceCount()

void dePropFieldType::SetInstanceCount ( int  count)

Sets the number of instances.

Referenced by GetInstanceCount().

◆ SetModel()

void dePropFieldType::SetModel ( deModel model)

Sets the model or NULL it not set.

Referenced by GetModel().

◆ SetRestitution()

void dePropFieldType::SetRestitution ( float  restitution)

Sets the restitution.

Referenced by GetRestitution().

◆ SetRotationPerForce()

void dePropFieldType::SetRotationPerForce ( float  rotation)

Sets the rotation per force.

Referenced by GetRotationPerForce().

◆ SetSkin()

void dePropFieldType::SetSkin ( deSkin skin)

Sets the skin or NULL if not set.

Referenced by GetSkin().


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