Emergency 2017 Dokumentation  v3.0.1
qsf::PhysicsRagdollComponent Class Reference

Physics ragdoll component class. More...

#include <PhysicsRagdollComponent.h>

Public Member Functions

 PhysicsRagdollComponent (Prototype *prototype)
 Constructor. More...
 
virtual ~PhysicsRagdollComponent ()
 Destructor. More...
 
const AssetProxygetRagdollPrefab () const
 Return the ragdoll prefab asset to use. More...
 
void setRagdollPrefab (const AssetProxy &ragdollPrefab)
 Set the ragdoll prefab asset to use. More...
 
- Public Member Functions inherited from qsf::PhysicsComponent
virtual ~PhysicsComponent ()
 Destructor. More...
 
short getCollisionFilterGroup () const
 
void setCollisionFilterGroup (short filter)
 
short getCollisionMask () const
 
void setCollisionMask (short mask)
 
uint32 getCollisionTypeId () const
 
void setCollisionTypeId (uint32 collisionTypeId)
 
float getFriction () const
 
void setFriction (float friction)
 
float getRollingFriction () const
 
void setRollingFriction (float rollingFriction)
 
- 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 ()
 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...
 
virtual void serialize (BinarySerializer &serializer)
 Serialize or deserialize the component using a binary serializer. 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
 "qsf::PhysicsRagdollComponent" unique component ID More...
 
static const uint32 RAGDOLL_PREFAB
 "RagdollPrefab" unique class property ID inside the class More...
 
- Static Public Attributes inherited from qsf::PhysicsComponent
static const uint32 COMPONENT_ID
 "qsf::PhysicsComponent" unique component ID More...
 
static const uint32 COLLISION_FILTER_GROUP
 "CollisionFilterGroup" unique class property ID inside the class More...
 
static const uint32 COLLISION_MASK
 "CollisionMask" unique class property ID inside the class More...
 
static const uint32 COLLISION_TYPE_ID
 "CollisionTypeId" unique class property ID inside the class More...
 
static const uint32 COLLISION_FRICTION
 "CollisionFriction" unique class property ID inside the class More...
 
static const uint32 COLLISION_ROLLINGFRICTION
 "CollisionRollingFriction" unique class property ID inside the class More...
 
static short mDefaultCollisionFilterGroup
 
static short mDefaultCollisionMask
 
- Static Public Attributes inherited from qsf::Component
static const uint32 COMPONENT_ID
 "qsf::Component" unique component ID More...
 

Protected Member Functions

virtual void onCollisionFilterGroupOrCollisionMaskChanged () override
 Method is called in case the collision filter group or collision mask property has been changed. More...
 
- Protected Member Functions inherited from qsf::PhysicsComponent
 PhysicsComponent (Prototype *prototype)
 Constructor. More...
 
virtual bool onStartup () override
 Startup the component. More...
 
- 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 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 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...
 

Additional Inherited Members

- 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 }
 
- Protected Attributes inherited from qsf::PhysicsComponent
short mCollisionFilterGroup
 The collision filter group with which this shape is registered in the world. Data type required by bullet. More...
 
short mCollisionMask
 The collision mask used to define with which other entities this item may collide. Data type required by bullet. More...
 
uint32 mCollisionTypeId
 ID of the high level collision type, if not "qsf::getUninitialized<uint32>()" it will set the low level cryptic "CollisionFilterGroup" and "CollisionMask" properties using pre-defined values. More...
 
float mFriction
 The friction which this shape will have. More...
 
float mRollingFriction
 The rolling friction which this shape will have. 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

Physics ragdoll component class.

Todo:
  • TODO(co) Under construction

Definition at line 34 of file PhysicsRagdollComponent.h.

Constructor & Destructor Documentation

qsf::PhysicsRagdollComponent::PhysicsRagdollComponent ( Prototype prototype)
inlineexplicit

Constructor.

Parameters
[in]prototypeThe prototype this component is in, no null pointer allowed

Definition at line 14 of file PhysicsRagdollComponent-inl.h.

qsf::PhysicsRagdollComponent::~PhysicsRagdollComponent ( )
inlinevirtual

Destructor.

Definition at line 20 of file PhysicsRagdollComponent-inl.h.

Member Function Documentation

const AssetProxy & qsf::PhysicsRagdollComponent::getRagdollPrefab ( ) const
inline

Return the ragdoll prefab asset to use.

Returns
The ragdoll prefab asset to use (e.g. "sample/prefab/ragdoll/human"), do no destroy the returned instance
Note
  • Connected to the CAMP reflection system

Definition at line 25 of file PhysicsRagdollComponent-inl.h.

virtual void qsf::PhysicsRagdollComponent::onCollisionFilterGroupOrCollisionMaskChanged ( )
overrideprotectedvirtual

Method is called in case the collision filter group or collision mask property has been changed.

Implements qsf::PhysicsComponent.

void qsf::PhysicsRagdollComponent::setRagdollPrefab ( const AssetProxy ragdollPrefab)

Set the ragdoll prefab asset to use.

Parameters
[in]ragdollPrefabThe ragdoll prefab asset to use (e.g. "sample/prefab/ragdoll/human")
Note
  • Connected to the CAMP reflection system

Member Data Documentation

const uint32 qsf::PhysicsRagdollComponent::COMPONENT_ID
static

"qsf::PhysicsRagdollComponent" unique component ID

Definition at line 42 of file PhysicsRagdollComponent.h.

const uint32 qsf::PhysicsRagdollComponent::RAGDOLL_PREFAB
static

"RagdollPrefab" unique class property ID inside the class

Definition at line 43 of file PhysicsRagdollComponent.h.


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