Drag[en]gine Game Engine  1.21
dePropFieldType Class Reference

Prop Field Type. More...

#include <dePropFieldType.h>

Public Member Functions

Constructors and Destructors
 dePropFieldType ()
 Create new prop field type. The instance count has to be at least 1. More...
 
 ~dePropFieldType ()
 Clean up prop field type. More...
 
Management
deModelGetModel () const
 Model or NULL if not set. More...
 
void SetModel (deModel *model)
 Set model or NULL it not set. More...
 
deSkinGetSkin () const
 Skin or NULL if not set. More...
 
void SetSkin (deSkin *skin)
 Set skin or NULL if not set. More...
 
float GetRotationPerForce () const
 Rotation per force. More...
 
void SetRotationPerForce (float rotation)
 Set rotation per force. More...
 
float GetRestitution () const
 Restitution. More...
 
void SetRestitution (float restitution)
 Set restitution. More...
 
const decCollisionFilterGetCollisionFilter () const
 Collision filter. More...
 
void SetCollisionFilter (const decCollisionFilter &collisionFilter)
 Set collision filter. More...
 
int GetInstanceCount () const
 Number of instances. More...
 
void SetInstanceCount (int count)
 Set number of instances. More...
 
dePropFieldInstanceGetInstanceAt (int index) const
 Instance at the given index. More...
 
dePropFieldInstanceGetInstances () const
 
int GetBendStateCount () const
 Number of bend states. More...
 
void SetBendStateCount (int count)
 Set number of bend states. More...
 
dePropFieldBendStateGetBendStateAt (int index) const
 Bend state at the given index. More...
 
dePropFieldBendStateGetBendStates () const
 List of bend states. More...
 

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.

Constructor & Destructor Documentation

◆ dePropFieldType()

dePropFieldType::dePropFieldType ( )

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

◆ ~dePropFieldType()

dePropFieldType::~dePropFieldType ( )

Clean up prop field type.

Member Function Documentation

◆ GetBendStateAt()

dePropFieldBendState& dePropFieldType::GetBendStateAt ( int  index) const

Bend state at the given index.

◆ GetBendStateCount()

int dePropFieldType::GetBendStateCount ( ) const
inline

Number of bend states.

◆ GetBendStates()

dePropFieldBendState* dePropFieldType::GetBendStates ( ) const
inline

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()

const decCollisionFilter& dePropFieldType::GetCollisionFilter ( ) const
inline

Collision filter.

◆ GetInstanceAt()

dePropFieldInstance& dePropFieldType::GetInstanceAt ( int  index) const

Instance at the given index.

◆ GetInstanceCount()

int dePropFieldType::GetInstanceCount ( ) const
inline

Number of instances.

◆ 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

Model or NULL if not set.

◆ GetRestitution()

float dePropFieldType::GetRestitution ( ) const
inline

Restitution.

◆ GetRotationPerForce()

float dePropFieldType::GetRotationPerForce ( ) const
inline

Rotation per force.

◆ GetSkin()

deSkin* dePropFieldType::GetSkin ( ) const
inline

Skin or NULL if not set.

◆ SetBendStateCount()

void dePropFieldType::SetBendStateCount ( int  count)

Set number of bend states.

◆ SetCollisionFilter()

void dePropFieldType::SetCollisionFilter ( const decCollisionFilter collisionFilter)

Set collision filter.

◆ SetInstanceCount()

void dePropFieldType::SetInstanceCount ( int  count)

Set number of instances.

◆ SetModel()

void dePropFieldType::SetModel ( deModel model)

Set model or NULL it not set.

◆ SetRestitution()

void dePropFieldType::SetRestitution ( float  restitution)

Set restitution.

◆ SetRotationPerForce()

void dePropFieldType::SetRotationPerForce ( float  rotation)

Set rotation per force.

◆ SetSkin()

void dePropFieldType::SetSkin ( deSkin skin)

Set skin or NULL if not set.


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