Emergency 20 Dokumentation  4.2.0
em5::DlkLadderComponent Class Reference

EMERGENCY 5 DLK ladder component. More...

#include <DLKLadderComponent.h>

Inheritance diagram for em5::DlkLadderComponent:
qsf::Component qsf::InheritedObject qsf::WeakPtrTarget qsf::Object

Public Types

enum  AnimationState { STATE_NONE, STATE_ALIGN_LADDER, STATE_DEPLOY_LADDER, STATE_FOLD_LADDER }
 
- Public Types inherited from qsf::Component
enum  TransformChangeFlag {
  TRANSFORM_CHANGE_POSITION = 0x01, TRANSFORM_CHANGE_ROTATION = 0x02, TRANSFORM_CHANGE_SCALE = 0x04, TRANSFORM_CHANGE_TRANSFORM = 0x07,
  TRANSFORM_CHANGE_FOR_SIMULATION = 0x08, TRANSFORM_CHANGE_FOR_ANIMATION = 0x10
}
 
typedef BitFlagSet< uint8, TransformChangeFlagTransformChangeFlags
 
- 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

 DlkLadderComponent (qsf::Prototype *prototype)
 Constructor. More...
 
virtual ~DlkLadderComponent ()
 Destructor. More...
 
void alignLadder (const glm::vec3 &position)
 Move the ladder arm of the DLK to the given position; used to rescue people. More...
 
void deployLadder (const glm::vec3 &position)
 Move the ladder arm of the DLK up in the air, in direction of position; used extinguish fire. More...
 
void foldLadder ()
 Move the ladder arm of the DLK back to starting position. More...
 
bool isAnimationPlaying () const
 Return if the ladder animation is running or not. More...
 
float getVerticalRescueOffset () const
 
void setVerticalRescueOffset (float verticalRescueOffset)
 
float getVerticalDeployOffset () const
 
void setVerticalDeployOffset (float verticalDeployOffset)
 
float getLadderMaxRotateSpeed () const
 
void setLadderMaxRotateSpeed (float ladderMaxRotateSpeed)
 
float getLadderMinRotateSpeed () const
 
void setLadderMinRotateSpeed (float ladderMinRotateSpeed)
 
float getLadderUpSpeed () const
 
void setLadderUpSpeed (float ladderUpSpeed)
 
float getLadderExtendSpeed () const
 
void setLadderExtendSpeed (float ladderExtendSpeed)
 
float getMaxAngle () const
 
void setMaxAngle (float maxAngle)
 
float getMinLength () const
 
void setMinLength (float minLength)
 
float getMaxLength () const
 
void setMaxLength (float maxLength)
 
float getSynchronLength () const
 
void setSynchronLength (float synchronLength)
 
float getTimeUltimatum () const
 
void setTimeUltimatum (float timeUltimatum)
 
const qsf::AssetProxygetAnimationLadderBaseUp () const
 
void setAnimationLadderBaseUp (const qsf::AssetProxy &skeleton)
 
const qsf::AssetProxygetAnimationLadderExtend () const
 
void setAnimationLadderExtend (const qsf::AssetProxy &skeleton)
 
const AnimationState getLastAnimationState () const
 
const glm::vec3 & getTargetPosition () const
 
qsf::EntitygetStageEntity () const
 
virtual void serialize (qsf::BinarySerializer &serializer) override
 Serialize or deserialize the component using a binary serializer. More...
 
- Public Member Functions inherited from qsf::Component
virtual ~Component ()
 Destructor. More...
 
PrototypegetPrototype () const
 Return the prototype this component is in. More...
 
EntitygetEntity () const
 Return a reference to the entity this component is in. More...
 
uint32 getId () const
 Return the unique component identifier. More...
 
ComponentManagergetComponentManager () const
 Return the component manager that's responsible for this component instance. More...
 
ComponentCollectiongetComponentCollection () const
 Return the component collection that's responsible for this component instance. More...
 
bool isSimulating () const
 Return whether or not the component is in simulating mode. More...
 
bool isActive () const
 Return whether or not the component is considered to be active. More...
 
void setActive (bool active)
 Set whether or not the component is considered to be active. More...
 
bool isDebug () const
 Return whether or not the component is considered to be in debug mode. More...
 
bool isHidden () const
 Return whether or not the component is hidden. More...
 
void setHidden (bool hidden)
 Set whether or not the component is hidden. More...
 
bool isGloballyHidden () const
 Return whether or not the component is globally hidden. More...
 
void setGloballyHidden (bool globallyHidden)
 Set whether or not the component is globally hidden. More...
 
bool isReallyHidden () const
 Return whether or not the component is really hidden. More...
 
bool startup (bool ownerIsRunning)
 Startup the component. More...
 
bool isRunning () const
 Return whether or not the component is up-and-running. More...
 
void shutdown ()
 Shutdown the component. More...
 
uint64 getPrototypeId () const
 Return the ID of the prototype this component is in. More...
 
uint64 getEntityId () const
 Return the ID of the entity this component is in. More...
 
virtual void onInvalidation ()
 Invalidate the component. More...
 
virtual void setDebug (bool debugMode)
 Set whether or not the component is considered to be in debug mode. More...
 
- Public Member Functions inherited from qsf::InheritedObject
void copyPropertyOverrideStateFrom (const InheritedObject &object, bool add=false)
 
void setAllPropertyOverrideFlags (bool value)
 
void autoCreatePropertyOverrideState ()
 
virtual camp::Value getPropertyDefaultValue (const StringHash &propertyId) const override
 
virtual PropertyOverrideState getPropertyOverrideState (const StringHash &propertyId) const override
 
virtual bool setPropertyOverrideState (const StringHash &propertyId, PropertyOverrideState overrideState) override
 
- 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 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...
 

Static Public Attributes

static const uint32 COMPONENT_ID
 "em5::DlkLadderComponent" unique component ID More...
 
static const float YAW_EPSILON
 Epsilon to check if yaw orientation can be assumed equal. More...
 
static const float ANIMATION_EPSILON
 Epsilon to check if animation offset can be assumed equal. More...
 
static const glm::vec3 ARM_ORIENTATION
 Orientation of ladder arm. More...
 
- Static Public Attributes inherited from qsf::Component
static const uint32 COMPONENT_ID
 "qsf::Component" unique component ID More...
 

Additional Inherited Members

- Protected Member Functions inherited from qsf::Component
 Component (Prototype *prototype)
 Constructor. More...
 
void promotePropertyChange (uint32 propertyId)
 A component property value was changed. More...
 
template<typename T , typename S >
bool assignAndPromoteChange (T &variable, const S &newValue, uint32 propertyId)
 Comfort function for updating an exported member variable and promoting any change that happened. More...
 
void setRegisterForSimulationTransformChanges (bool enable)
 Register or unregister this component as simulation transform listener. More...
 
void setRegisterForAnimationTransformChanges (bool enable)
 Register or unregister this component as animation transform listener. More...
 
virtual const ObjectgetPropertyDefaultsProvider () const override
 
virtual bool ignoreOwnerRunningState () const
 Return whether or not the component will only startup if the owner is in running state. More...
 
virtual bool implementsOnComponentPropertyChange () const
 Signal whether this component needs the "onComponentPropertyChange" callback at all. More...
 
virtual void onComponentPropertyChange (const Component &component, uint32 propertyId)
 Called in case a component property value was changed. More...
 
virtual void onComponentTransformChange (const Transform &transform, TransformChangeFlags flags)
 Called in case a component transformation value was changed. More...
 
virtual void onSetSimulating (bool simulating)
 Set whether or not the component is in simulating mode. More...
 
virtual void onSetActive (bool active)
 Set whether or not the component is considered to be active. More...
 
virtual void onSetDebug (bool debug)
 Set whether or not the component is considered to be in debug mode. More...
 
virtual void onSetHidden (bool hidden)
 Set whether or not the component is considered to be hidden. More...
 
virtual bool onStartup ()
 Startup the component. More...
 
virtual void onShutdown ()
 Shutdown the component. More...
 
- Protected Member Functions inherited from qsf::InheritedObject
 InheritedObject ()
 Default constructor. More...
 
- Protected Member Functions inherited from qsf::Object
 Object ()
 Default constructor. More...
 
- Protected Member Functions inherited from qsf::WeakPtrTarget
 WeakPtrTarget ()
 Default constructor. More...
 
 WeakPtrTarget (const WeakPtrTarget &other)
 Copy constructor. More...
 
 WeakPtrTarget (WeakPtrTarget &&)=delete
 Delete the move constructor, as WeakPtrTarget would need a proper move constructor-implementation that ensures that its pointer gets updated in the WeakPtrBase as well. More...
 
 ~WeakPtrTarget ()
 Destructor. More...
 
void invalidateAllWeakPtr ()
 Invalidate all weak pointers to this object. More...
 
void operator= (const WeakPtrTarget &other)
 Copy operator. More...
 
- Protected Attributes inherited from qsf::InheritedObject
std::bitset< 128 > mPropertyOverrideFlags
 One bit for each property; if set, the property is overridden. More...
 

Detailed Description

EMERGENCY 5 DLK ladder component.

Remarks
EMERGENCY 5 DLK units can move the ladder and align it to a target.

Member Enumeration Documentation

Enumerator
STATE_NONE 
STATE_ALIGN_LADDER 
STATE_DEPLOY_LADDER 
STATE_FOLD_LADDER 

Constructor & Destructor Documentation

em5::DlkLadderComponent::DlkLadderComponent ( qsf::Prototype prototype)
explicit

Constructor.

Parameters
[in]prototypeThe prototype this component is in, no null pointer allowed
virtual em5::DlkLadderComponent::~DlkLadderComponent ( )
virtual

Destructor.

Member Function Documentation

void em5::DlkLadderComponent::alignLadder ( const glm::vec3 &  position)

Move the ladder arm of the DLK to the given position; used to rescue people.

Parameters
[in]positionThe position the arm should move to
void em5::DlkLadderComponent::deployLadder ( const glm::vec3 &  position)

Move the ladder arm of the DLK up in the air, in direction of position; used extinguish fire.

Parameters
[in]positionThe position as a reference point
void em5::DlkLadderComponent::foldLadder ( )

Move the ladder arm of the DLK back to starting position.

const qsf::AssetProxy & em5::DlkLadderComponent::getAnimationLadderBaseUp ( ) const
inline
const qsf::AssetProxy & em5::DlkLadderComponent::getAnimationLadderExtend ( ) const
inline
float em5::DlkLadderComponent::getLadderExtendSpeed ( ) const
inline
float em5::DlkLadderComponent::getLadderMaxRotateSpeed ( ) const
inline
float em5::DlkLadderComponent::getLadderMinRotateSpeed ( ) const
inline
float em5::DlkLadderComponent::getLadderUpSpeed ( ) const
inline
const DlkLadderComponent::AnimationState em5::DlkLadderComponent::getLastAnimationState ( ) const
inline
float em5::DlkLadderComponent::getMaxAngle ( ) const
inline
float em5::DlkLadderComponent::getMaxLength ( ) const
inline
float em5::DlkLadderComponent::getMinLength ( ) const
inline
qsf::Entity* em5::DlkLadderComponent::getStageEntity ( ) const
float em5::DlkLadderComponent::getSynchronLength ( ) const
inline
const glm::vec3 & em5::DlkLadderComponent::getTargetPosition ( ) const
inline
float em5::DlkLadderComponent::getTimeUltimatum ( ) const
inline
float em5::DlkLadderComponent::getVerticalDeployOffset ( ) const
inline
float em5::DlkLadderComponent::getVerticalRescueOffset ( ) const
inline
bool em5::DlkLadderComponent::isAnimationPlaying ( ) const

Return if the ladder animation is running or not.

virtual void em5::DlkLadderComponent::serialize ( qsf::BinarySerializer serializer)
overridevirtual

Serialize or deserialize the component using a binary serializer.

Parameters
[in]serializerThe serializer, which can be either in read or write mode

Reimplemented from qsf::Component.

void em5::DlkLadderComponent::setAnimationLadderBaseUp ( const qsf::AssetProxy skeleton)
inline
void em5::DlkLadderComponent::setAnimationLadderExtend ( const qsf::AssetProxy skeleton)
inline
void em5::DlkLadderComponent::setLadderExtendSpeed ( float  ladderExtendSpeed)
inline
void em5::DlkLadderComponent::setLadderMaxRotateSpeed ( float  ladderMaxRotateSpeed)
inline
void em5::DlkLadderComponent::setLadderMinRotateSpeed ( float  ladderMinRotateSpeed)
inline
void em5::DlkLadderComponent::setLadderUpSpeed ( float  ladderUpSpeed)
inline
void em5::DlkLadderComponent::setMaxAngle ( float  maxAngle)
inline
void em5::DlkLadderComponent::setMaxLength ( float  maxLength)
inline
void em5::DlkLadderComponent::setMinLength ( float  minLength)
inline
void em5::DlkLadderComponent::setSynchronLength ( float  synchronLength)
inline
void em5::DlkLadderComponent::setTimeUltimatum ( float  timeUltimatum)
inline
void em5::DlkLadderComponent::setVerticalDeployOffset ( float  verticalDeployOffset)
inline
void em5::DlkLadderComponent::setVerticalRescueOffset ( float  verticalRescueOffset)
inline

Member Data Documentation

const float em5::DlkLadderComponent::ANIMATION_EPSILON
static

Epsilon to check if animation offset can be assumed equal.

const glm::vec3 em5::DlkLadderComponent::ARM_ORIENTATION
static

Orientation of ladder arm.

const uint32 em5::DlkLadderComponent::COMPONENT_ID
static

"em5::DlkLadderComponent" unique component ID

const float em5::DlkLadderComponent::YAW_EPSILON
static

Epsilon to check if yaw orientation can be assumed equal.


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