Emergency 20 Dokumentation  4.2.0
em5::PersonAnimationController Class Reference

Person animation class, handles the move cycle animation for persons. More...

#include <PersonAnimationController.h>

Inheritance diagram for em5::PersonAnimationController:
qsf::Object

Public Types

enum  MovementState { MOVEMENTSTATE_UNDEFINED, MOVEMENTSTATE_IDLE, MOVEMENTSTATE_WALK, MOVEMENTSTATE_INJURED }
 
enum  PersonType { PERSONTYPE_OTHER, PERSONTYPE_DIVER }
 
- Public Types inherited from qsf::Object
enum  PropertyOverrideState { PROPERTY_INVALID, PROPERTY_DEFAULT, PROPERTY_OVERRIDE, PROPERTY_REMOVED }
 
enum  SerializationMethod { SERIALIZE_FLAT, SERIALIZE_COMPLETE, SERIALIZE_DIFFERENTIAL, SERIALIZE_IGNORE_UNKNOWN }
 
enum  SerializationMode { MODE_MINIMAL, MODE_COMPATIBLE }
 

Public Member Functions

 PersonAnimationController (qsf::Entity &callerEntity)
 Constructor. More...
 
virtual ~PersonAnimationController ()
 Destructor. More...
 
virtual void updateAnimation ()
 
virtual void resetAnimationState ()
 
virtual void forceIdleAnimationUpdate ()
 
virtual std::string getInjuredAnimation (qsf::Entity &entity)
 
- Public Member Functions inherited from qsf::Object
virtual ~Object ()
 Destructor. More...
 
const camp::Class & getCampClass () const
 Return the CAMP class. More...
 
int getPropertyIndexById (const StringHash &propertyId) const
 Return the CAMP property index by using the unique class property ID. More...
 
uint32 getPropertyIdByIndex (int index) const
 Return the unique class property ID with the given index. More...
 
std::string getPropertyNameById (const StringHash &propertyId) const
 Return the CAMP property name by using the unique class property ID. More...
 
const camp::Property * getCampPropertyById (const StringHash &propertyId) const
 Return the CAMP property by using the unique class property ID. More...
 
void setPropertyValuesByString (const std::string &values)
 Set CAMP reflection property values by using a given string. More...
 
void setPropertiesToDefaultValues ()
 Set all CAMP reflection system properties to their default values. More...
 
void serializeToBoostPTree (boost::property_tree::ptree &pTree, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL) const
 
void serializeToBoostPTree (boost::property_tree::ptree &pTree, const camp::Class &campClass, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL) const
 
bool deserializeFromBoostPTree (const boost::property_tree::ptree &pTree, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL)
 
bool deserializeFromBoostPTree (const boost::property_tree::ptree &pTree, const camp::Class &campClass, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL)
 
void serializeToBinarySerializer (BinarySerializer &serializer, SerializationMode mode=MODE_MINIMAL, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL) const
 
void deserializeFromBinarySerializer (BinarySerializer &serializer, SerializationMode mode=MODE_MINIMAL, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL, bool setOverrideState=true)
 
virtual camp::Value getPropertyDefaultValue (const StringHash &propertyId) const
 
virtual PropertyOverrideState getPropertyOverrideState (const StringHash &propertyId) const
 
virtual bool setPropertyOverrideState (const StringHash &propertyId, PropertyOverrideState overrideState)
 
virtual void onPreDeserialize ()
 Called right before the object is deserialized using any of the above methods. Default implementation is empty. More...
 
virtual void onPostDeserialize ()
 Called right after the object was deserialized using any of the above methods. Default implementation is empty. More...
 
virtual ScriptgetAssociatedScript () const
 Return the script instance associated with this object instance. More...
 

Protected Member Functions

MovementState calculateMovementState ()
 
bool setInjuredAnimation ()
 
void setAnimationState ()
 
void setMovementAnimationParamedics ()
 
void setMovementAnimationDoctor ()
 
void setMovementAnimationFireFighter ()
 
void setMovementAnimationDiver ()
 
void setMovementAnimationResueDogLeader ()
 
void setMovementAnimationPolicePerson ()
 
void setMovementAnimationSekSpecialist ()
 
void setMovementAnimationPoliceDogLeader ()
 
void setMovementAnimationArrested ()
 
void setMovementContaminatedLead ()
 
void setMovementAnimationUnit ()
 
bool blendToAnimation (qsf::Entity &entity, const std::string &animationName, float animationBlendTime) const
 
void checkMovingEntity ()
 
- Protected Member Functions inherited from qsf::Object
 Object ()
 Default constructor. More...
 

Protected Attributes

qsf::EntitymEntity
 
MovementState mMovementState
 
MovementState mFormerMovementState
 
PersonType mPersonType
 
bool mIsSwimming
 
qsf::WeakPtr< qsf::EntitymMovingEntity
 
qsf::WeakPtr< qsf::MovableComponentmMovableComponent
 
qsf::WeakPtr< qsf::ai::NavigationComponentmNavigationComponent
 
qsf::WeakPtr< qsf::ActionComponentmActionComponent
 

Detailed Description

Person animation class, handles the move cycle animation for persons.

Member Enumeration Documentation

Enumerator
MOVEMENTSTATE_UNDEFINED 
MOVEMENTSTATE_IDLE 
MOVEMENTSTATE_WALK 
MOVEMENTSTATE_INJURED 
Enumerator
PERSONTYPE_OTHER 
PERSONTYPE_DIVER 

Constructor & Destructor Documentation

em5::PersonAnimationController::PersonAnimationController ( qsf::Entity callerEntity)
explicit

Constructor.

virtual em5::PersonAnimationController::~PersonAnimationController ( )
virtual

Destructor.

Member Function Documentation

bool em5::PersonAnimationController::blendToAnimation ( qsf::Entity entity,
const std::string &  animationName,
float  animationBlendTime 
) const
protected
MovementState em5::PersonAnimationController::calculateMovementState ( )
protected
void em5::PersonAnimationController::checkMovingEntity ( )
protected
virtual void em5::PersonAnimationController::forceIdleAnimationUpdate ( )
virtual
virtual std::string em5::PersonAnimationController::getInjuredAnimation ( qsf::Entity entity)
virtual
virtual void em5::PersonAnimationController::resetAnimationState ( )
virtual
void em5::PersonAnimationController::setAnimationState ( )
protected
bool em5::PersonAnimationController::setInjuredAnimation ( )
protected
void em5::PersonAnimationController::setMovementAnimationArrested ( )
protected
void em5::PersonAnimationController::setMovementAnimationDiver ( )
protected
void em5::PersonAnimationController::setMovementAnimationDoctor ( )
protected
void em5::PersonAnimationController::setMovementAnimationFireFighter ( )
protected
void em5::PersonAnimationController::setMovementAnimationParamedics ( )
protected
void em5::PersonAnimationController::setMovementAnimationPoliceDogLeader ( )
protected
void em5::PersonAnimationController::setMovementAnimationPolicePerson ( )
protected
void em5::PersonAnimationController::setMovementAnimationResueDogLeader ( )
protected
void em5::PersonAnimationController::setMovementAnimationSekSpecialist ( )
protected
void em5::PersonAnimationController::setMovementAnimationUnit ( )
protected
void em5::PersonAnimationController::setMovementContaminatedLead ( )
protected
virtual void em5::PersonAnimationController::updateAnimation ( )
virtual

Member Data Documentation

qsf::WeakPtr<qsf::ActionComponent> em5::PersonAnimationController::mActionComponent
protected
qsf::Entity& em5::PersonAnimationController::mEntity
protected
MovementState em5::PersonAnimationController::mFormerMovementState
protected
bool em5::PersonAnimationController::mIsSwimming
protected
qsf::WeakPtr<qsf::MovableComponent> em5::PersonAnimationController::mMovableComponent
protected
MovementState em5::PersonAnimationController::mMovementState
protected
qsf::WeakPtr<qsf::Entity> em5::PersonAnimationController::mMovingEntity
protected
qsf::WeakPtr<qsf::ai::NavigationComponent> em5::PersonAnimationController::mNavigationComponent
protected
PersonType em5::PersonAnimationController::mPersonType
protected

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