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

Locomotion animation node, node which should control the walking of a person. More...

#include <LocomotionNode.h>

Classes

struct  WalkingCycle
 Walking cycle data of an animation. More...
 

Public Member Functions

 LocomotionNode (AdvancedAnimationComponent &advancedAnimationComponent)
 Constructor. More...
 
virtual ~LocomotionNode ()
 Destructor. More...
 
uint16 getLeftFootBoneId () const
 Return the bone ID of the left foot bone. More...
 
void setLeftFootBoneId (uint16 leftFootBoneId)
 Set the bone ID of the left foot bone. More...
 
uint16 getRightFootBoneId () const
 Return the bone ID of the left foot bone. More...
 
void setRightFootBoneId (uint16 rightFootBoneId)
 Set the bone ID of the left foot bone. More...
 
float getProgress () const
 Return animation progress. More...
 
void setProgress (float Progress)
 Set animation progress (will be wrapped into [0.0, 1.0]) More...
 
const WalkingCyclegetWalkingCycle () const
 Return the walking cycle data we set for our animation. More...
 
void setWalkingCycle (const WalkingCycle &walkingCycle)
 Set the walking cycle data we set for our animation. More...
 
const glm::vec2 & getKneeAngleConstrainMinMax () const
 Return the minimum and maximum constrain on the knee angle. More...
 
void setKneeAngleConstrainMinMax (const glm::vec2 &kneeAngleConstrainMinMax)
 Set the minimum and maximum constrain on the knee angle. More...
 
const glm::vec2 & getHeightConstrainMinMax () const
 Return the minimum and maximum constrain on height. More...
 
void setHeightConstrainMinMax (const glm::vec2 &heightConstrainMinMax)
 Set the minimum and maximum constrain on height. More...
 
- Public Member Functions inherited from qsf::AnimationNode
 AnimationNode (AdvancedAnimationComponent &advancedAnimationComponent, uint16 numberOfInputSlots, bool readOnlyFirstInput)
 Constructor. More...
 
virtual ~AnimationNode ()
 Destructor. More...
 
uint16 getNumberOfInputSlots () const
 Get the number of input slots of this node. More...
 
bool isFirstInputReadOnly () const
 Get if the first input slot is read only or can be changed and used as output. More...
 

Protected Member Functions

virtual void calculate () override
 Animation calculation method. More...
 
- Protected Member Functions inherited from qsf::AnimationNode
SkeletonHandlegetOutputSkeleton () const
 Get the output skeleton of this node. More...
 
const SkeletonHandlegetInputSkeleton (uint16 inputId) const
 Get a input skeleton of this node. More...
 
AdvancedAnimationComponentgetAdvancedAnimationComponent ()
 Give back a regerence to the advanced animation component where this node is created. More...
 
const AdvancedAnimationComponentgetAdvancedAnimationComponent () const
 
uint16 getBoneNumber () const
 Give back the number of bones we will have in skeletons. More...
 
void addOffsetFromKeyFrameSkeleton (const std::string &animationName, float progress, bool retarget=false)
 
void addOffsetToBindingPoseFromKeyFrameSkeleton (const std::string &animationName, float progress, bool retarget=false)
 
float getKeyFrameSkeletonTimeLength (const std::string &animationName, bool retarget=false) const
 
void setInputNodeCalculationNeeded (uint16 inputId, bool calculationNeeded)
 
void calculateSubNode (AnimationNode &subNode)
 Calculate another sub node with the output and input skeletons from this node. More...
 

Additional Inherited Members

- Static Public Attributes inherited from qsf::AnimationNode
static const uint16 MAXIMAL_NUMBER_OF_INPUTS = 6
 

Detailed Description

Locomotion animation node, node which should control the walking of a person.

Todo:
  • TODO(tl) Experimental node

Definition at line 35 of file LocomotionNode.h.

Constructor & Destructor Documentation

qsf::LocomotionNode::LocomotionNode ( AdvancedAnimationComponent advancedAnimationComponent)
explicit

Constructor.

Parameters
[in]advancedAnimationComponentA reference to an advanced animation component where this animation node lies
qsf::LocomotionNode::~LocomotionNode ( )
inlinevirtual

Destructor.

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

Member Function Documentation

virtual void qsf::LocomotionNode::calculate ( )
overrideprotectedvirtual

Animation calculation method.

Note
  • Overwrite this method and use the inputs and your own parameter to create the output

Implements qsf::AnimationNode.

const glm::vec2 & qsf::LocomotionNode::getHeightConstrainMinMax ( ) const
inline

Return the minimum and maximum constrain on height.

Definition at line 49 of file LocomotionNode-inl.h.

const glm::vec2 & qsf::LocomotionNode::getKneeAngleConstrainMinMax ( ) const
inline

Return the minimum and maximum constrain on the knee angle.

Definition at line 44 of file LocomotionNode-inl.h.

uint16 qsf::LocomotionNode::getLeftFootBoneId ( ) const
inline

Return the bone ID of the left foot bone.

Definition at line 19 of file LocomotionNode-inl.h.

float qsf::LocomotionNode::getProgress ( ) const
inline

Return animation progress.

Returns
Value between 0.0 and 1.0

Definition at line 29 of file LocomotionNode-inl.h.

uint16 qsf::LocomotionNode::getRightFootBoneId ( ) const
inline

Return the bone ID of the left foot bone.

Definition at line 24 of file LocomotionNode-inl.h.

const LocomotionNode::WalkingCycle & qsf::LocomotionNode::getWalkingCycle ( ) const
inline

Return the walking cycle data we set for our animation.

Definition at line 34 of file LocomotionNode-inl.h.

void qsf::LocomotionNode::setHeightConstrainMinMax ( const glm::vec2 &  heightConstrainMinMax)
inline

Set the minimum and maximum constrain on height.

Definition at line 54 of file LocomotionNode-inl.h.

void qsf::LocomotionNode::setKneeAngleConstrainMinMax ( const glm::vec2 &  kneeAngleConstrainMinMax)

Set the minimum and maximum constrain on the knee angle.

void qsf::LocomotionNode::setLeftFootBoneId ( uint16  leftFootBoneId)

Set the bone ID of the left foot bone.

void qsf::LocomotionNode::setProgress ( float  Progress)

Set animation progress (will be wrapped into [0.0, 1.0])

void qsf::LocomotionNode::setRightFootBoneId ( uint16  rightFootBoneId)

Set the bone ID of the left foot bone.

void qsf::LocomotionNode::setWalkingCycle ( const WalkingCycle walkingCycle)
inline

Set the walking cycle data we set for our animation.

Parameters
[in]walkingCycleWalking cycle data of current animation(number of cycles, offset until right foot touches the ground and offset between feet)

Definition at line 39 of file LocomotionNode-inl.h.


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