Atoms Crowd  4.1.0
Atoms::AnimationStateOperator Class Reference
Inheritance diagram for Atoms::AnimationStateOperator:
Atoms::StateMachineBaseNodeOperator Atoms::Operator Atoms::AgentNode AtomsGraph::Node

Classes

class  AdditiveClipData
 
class  ClipData
 
class  MotionType
 
class  SubState
 

Public Member Functions

bool compute (const AtomsGraph::ComputeData *computeData)
 Compute function.
 
void reset ()
 Operator reset function.
 
void updateTurningData (AtomsCore::Vector3 &direction, AtomsCore::Vector3 &upDirVec, AtomsCore::Vector3 &projDir, AtomsCore::Vector3 &agentTurnAngle, bool behave3d, bool isFirst)
 
void initializeFirstFrame (AtomsCore::Vector3 &direction, AtomsCore::Vector3 &upDirVec, AtomsCore::Vector3 &projDir)
 
void advanceSingleClip (double timeStep, double frameStep, bool randomClip=false)
 
int pickNewRandomClipId (AnimationStateOperator::MotionType &motionType)
 
double getMergeWeight (const AnimationStateOperator::ClipData &clipData)
 
double updateTurnWeights (MotionType &motionType, double turnAngled, double &straight_weight, double maxWeight)
 
void computeTurnWeights (double maxWeight)
 
std::pair< int, int > getUnsyncedClipId ()
 
int getUnsyncedClip (MotionType &motionData, double turnAngled)
 
void buildNetwork (const AtomsPtr< Atoms::StateMachine > &stateMachine, const Atoms::AnimationState &state, std::map< std::string, std::string > &clipToAgentTypeNames, std::mutex &mutex, AtomsCore::Rand32 *idRandom)
 
bool isReadyToTransition (double frameRate=1.0, bool checkTransitionFrames=true, bool checkForceTransition=true)
 
double computeBlendInOffset (double frameRate, bool checkTransitionFrames=true)
 
void computeBlendInOffsetInPlace (double frameRate, bool checkTransitionFrames=true)
 
double getBlendInOffset ()
 
double getBlendInOffset (int clipId)
 
void prepareForBlendIn (double offset, double timeStep)
 
void prepareClipForBlendIn (int clipId, double offset)
 
int getActiveClipId ()
 
bool isBlendInStage (double offset, unsigned int blend)
 
bool isBlendInStage (int clipId, double offset, unsigned int blend)
 
bool isBlendOutStage (double &frameDifference, unsigned int blend)
 
double computeBlendInWeight (double offset, unsigned int blend)
 
double computeBlendInWeight (int clipId, double offset, unsigned int blend)
 
double computeBlendOutWeight (unsigned int blend)
 
double computeBlendOutWeight (int clipId, unsigned int blend)
 
void setUpBlendOutFrame (double offset, double timeStep)
 
bool isBlendOutFinished (unsigned int blend)
 
void setClipFrameAndWeights ()
 
void initSubState (double frame)
 
bool hasClips ()
 
- Public Member Functions inherited from Atoms::StateMachineBaseNodeOperator
void reset ()
 Operator reset function.
 
void resetTime ()
 
void setFps (double fps)
 
void setDoNotAdvanceClips (const bool value)
 
AgentBehaviourNetworknetwork ()
 
unsigned int blendIn ()
 
unsigned int blendOut ()
 
bool isOneShot ()
 
bool needLockDirectionForTurning ()
 
- Public Member Functions inherited from Atoms::Operator
virtual std::string typeStr () const =0
 Type string. More...
 
virtual unsigned int typeId () const =0
 Type id. More...
 
 Operator ()
 Constructor.
 
virtual ~Operator ()
 Destructor.
 
const AtomsCore::Posepose ()
 Get output pose.
 
AtomsGraph::PosePortoutPosePort ()
 Get output pose port.
 
virtual short baseNodeType () const
 Base node type.
 
const AtomsCore::SkeletonLodskeletonLod () const
 Return the active skeleton sim lod data.
 
virtual void computeFullPose (AtomsCore::Pose &FullPose)
 
- Public Member Functions inherited from Atoms::AgentNode
 AgentNode ()
 Constructor.
 
virtual ~AgentNode ()
 Destructor.
 
Agentagent ()
 Get agent.
 
void setAgent (Agent *agent)
 Set agent.
 
- Public Member Functions inherited from AtomsGraph::Node
 Node ()
 Constructor.
 
virtual ~Node ()
 Destructor.
 
virtual Nodeclone ()=0
 clone object More...
 
void addInputPort (Port *port)
 Adds input port.
 
template<class T >
T * getInputPort (const std::string &name)
 Gets input port.
 
PortgetInputPort (const std::string &name)
 Gets the input port with the given name.
 
void removeInputPort (const std::string &name)
 Removes the input port with the given name.
 
std::vector< std::string > getInputPortNames () const
 Gets all input port names.
 
port_iterator inputPortBegin ()
 Inputs port begin iterator.
 
port_iterator inputPortEnd ()
 Inputs port end iterator.
 
const_port_iterator inputPortCBegin () const
 Input port begin iterator.
 
const_port_iterator inputPortCEnd () const
 Input port end iterator.
 
size_t numInputPorts () const
 Gets number of input ports.
 
void addOutputPort (Port *port)
 Adds output port.
 
template<class T >
T * getOutputPort (const std::string &name)
 Gets the output port with the given name.
 
PortgetOutputPort (const std::string &name)
 Gets the output port with the given name.
 
void removeOutputPort (const std::string &name)
 Removes the output port with the given name.
 
std::vector< std::string > getOutputPortNames () const
 Gets all output port names.
 
port_iterator outputPortBegin ()
 Output port begin iterator.
 
port_iterator outputPortEnd ()
 Output port end iterator.
 
const_port_iterator outputPortCBegin () const
 Output port begin iterator.
 
const_port_iterator outputPortCEnd () const
 Output port end iterator.
 
size_t numOutputPorts () const
 Gets number of output ports.
 
void setDirty (bool value)
 Sets node dirty state.
 
bool isDirty () const
 Returns true if the node is dirty.
 
void setDirtyFlag ()
 This set node dirty without propagate the dirty to the connected nodes.
 
std::string name () const
 Gets the node name.
 
void setName (const std::string &name)
 Sets the node name.
 
void setProfileTime (size_t value)
 Set the profile time.
 
size_t profileTime () const
 Get the profile time.
 

Protected Attributes

std::vector< double > m_frames
 
std::vector< MotionTypem_motionInfo
 
std::vector< ClipDatam_clips
 
std::vector< AdditiveClipDatam_additiveClips
 
std::vector< std::string > m_clipNames
 
std::list< SubStatem_subStateQueue
 
AtomsCore::Rand32 * m_idRandom
 
AtomsCore::Vector3 m_previousDirection
 
AtomsCore::Vector3 m_cacheUpVector
 
AtomsCore::Vector3 m_cacheDirectionVector
 
AtomsCore::Vector3 m_turnAngle
 
AtomsCore::Vector3 m_prevTurnAngle
 
AtomsCore::Vector3 m_maxTurnAngle
 
double m_previousTime
 
int m_currentState
 
unsigned int m_postRandClipId
 
bool m_oneShot
 
bool m_transitionStarted
 
bool m_skipCycle
 
bool m_randomLoop
 
bool m_needLockDirectionForTurning
 
- Protected Attributes inherited from Atoms::StateMachineBaseNodeOperator
AgentBehaviourNetwork m_network
 
AtomsGraph::DoublePortm_timePort
 
AtomsGraph::DoublePortm_fpsPort
 
unsigned int m_blendIn
 
unsigned int m_blendOut
 
bool m_doNotAdvanceClips
 
bool m_needLockDirectionForTurning
 
bool m_oneShot
 
bool m_resetTime
 
bool m_first
 
- Protected Attributes inherited from Atoms::Operator
AtomsGraph::BooleanPortm_activePort
 Operator Active port.
 
AtomsGraph::PosePortm_outPose
 Output pose port.
 
- Protected Attributes inherited from Atoms::AgentNode
Agentm_agent
 Agent.
 

Additional Inherited Members

- Public Types inherited from AtomsGraph::Node
typedef std::vector< Port * >::iterator port_iterator
 
typedef std::vector< Port * >::const_iterator const_port_iterator
 

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