Atoms Crowd  4.1.0
Atoms::Agent Class Reference

Agent. More...

#include <Agent.h>

Public Member Functions

 ~Agent ()
 Destructor.
 
const AgentTypeCPtragentType () const
 Gets the agent type. More...
 
void setAgentType (AgentTypeCPtr agentType)
 Sets the agent type. More...
 
AtomsCore::Posepose ()
 Gets the agent pose. More...
 
const AtomsCore::Posepose () const
 Gets the agent pose. More...
 
void setPose (const AtomsCore::Pose &value)
 Set agent pose. More...
 
void computePose (double simTime=0.0)
 Computes the agent pose. More...
 
AtomsCore::MapMetadatametadata ()
 Gets the agent metadata map. More...
 
const AtomsCore::MapMetadatametadata () const
 Gets the agent metadata map. More...
 
void setMetadata (const AtomsCore::MapMetadata &value)
 Set agent metadata.
 
AgentBehaviourNetworknetwork ()
 Gets the agent behaviour network.
 
size_t memSize () const
 Gets the memory size of this agent.
 
void computeBoundingBox ()
 Computes the agent bounding box.
 
void computeMeshBoundingBox ()
 Compute the bounding box using the skinned meshes.
 
AtomsCore::Box3 boundingBox () const
 Gets the agent bounding box.
 
void setBoundingBox (const AtomsCore::Box3 &box)
 Sets the agent bounding box.
 
AtomsCore::Rand48 & random ()
 Return the internal agent random numbers generator.
 
void reset ()
 Reset the agent.
 
size_t profileTime () const
 Get the profile time.
 
size_t profileThreadId () const
 Get the profile thread id.
 
void setProfileThreadBatch (size_t value)
 Set the profile thread id.
 
size_t profileThreadBatch () const
 Get the profile thread batch.
 
void lock ()
 lock the agent mutex
 
void unlock ()
 unlock the agent mutex
 
std::mutex & mutex ()
 Agent mutex.
 
AtomsPtr< AtomsCore::IntMetadata > & groupId ()
 
AtomsPtr< AtomsCore::StringMetadata > & groupIdStr ()
 
AtomsPtr< AtomsCore::IntMetadata > & id ()
 
AtomsPtr< AtomsCore::Vector3Metadata > & position ()
 
AtomsPtr< AtomsCore::Vector3Metadata > & scale ()
 
AtomsPtr< AtomsCore::QuaternionMetadata > & rotation ()
 
AtomsPtr< AtomsCore::Vector3Metadata > & direction ()
 
AtomsPtr< AtomsCore::Vector3Metadata > & up ()
 
AtomsPtr< AtomsCore::Vector3Metadata > & velocity ()
 
AtomsPtr< AtomsCore::Vector3Metadata > & gravity ()
 
AtomsPtr< AtomsCore::DoubleMetadata > & birth ()
 
AtomsPtr< AtomsCore::IntMetadata > & state ()
 
AtomsPtr< AtomsCore::IntMetadata > & currentState ()
 
AtomsPtr< AtomsCore::IntMetadata > & active ()
 
AtomsPtr< AtomsCore::DoubleMetadata > & frameRate ()
 
AtomsPtr< AtomsCore::DoubleMetadata > & frameRateOverride ()
 
AtomsPtr< AtomsCore::BoolMetadata > & disableIk ()
 
AtomsPtr< AtomsCore::BoolMetadata > & disableFootLock ()
 
AtomsPtr< AtomsCore::IntMetadata > & syncLevel ()
 
AtomsPtr< AtomsCore::IntMetadata > & animationMode ()
 
AtomsPtr< AtomsCore::Metadata > & animState ()
 
AtomsPtr< AtomsCore::BoolMetadata > & forceClipTransition ()
 
AtomsPtr< AtomsCore::BoolMetadata > & visible ()
 
AtomsPtr< AtomsCore::DoubleMetadata > & linearVelocity ()
 
AtomsPtr< AtomsCore::DoubleMetadata > & angularVelocity ()
 
AtomsPtr< AtomsCore::BoolMetadata > & locomotionActive ()
 
AtomsPtr< AtomsCore::Vector3Metadata > & velocityOverride ()
 
AtomsPtr< AtomsCore::BoolMetadata > & useVelocityOverride ()
 
AtomsPtr< AtomsCore::Vector3Metadata > & _navtp ()
 
AtomsPtr< AtomsCore::Vector3ArrayMetadata > & _navfp ()
 
AtomsPtr< const AtomsCore::IntMetadata > groupId () const
 
AtomsPtr< const AtomsCore::StringMetadata > groupIdStr () const
 
AtomsPtr< const AtomsCore::IntMetadata > id () const
 
AtomsPtr< const AtomsCore::Vector3Metadata > position () const
 
AtomsPtr< const AtomsCore::Vector3Metadata > scale () const
 
AtomsPtr< const AtomsCore::QuaternionMetadata > rotation () const
 
AtomsPtr< const AtomsCore::Vector3Metadata > direction () const
 
AtomsPtr< const AtomsCore::Vector3Metadata > up () const
 
AtomsPtr< const AtomsCore::Vector3Metadata > velocity () const
 
AtomsPtr< const AtomsCore::Vector3Metadata > gravity () const
 
AtomsPtr< const AtomsCore::DoubleMetadata > birth () const
 
AtomsPtr< const AtomsCore::IntMetadata > state () const
 
AtomsPtr< const AtomsCore::IntMetadata > currentState () const
 
AtomsPtr< const AtomsCore::IntMetadata > active () const
 
AtomsPtr< const AtomsCore::DoubleMetadata > frameRate () const
 
AtomsPtr< const AtomsCore::DoubleMetadata > frameRateOverride () const
 
AtomsPtr< const AtomsCore::BoolMetadata > disableIk () const
 
AtomsPtr< const AtomsCore::BoolMetadata > disableFootLock () const
 
AtomsPtr< const AtomsCore::IntMetadata > syncLevel () const
 
AtomsPtr< const AtomsCore::IntMetadata > animationMode () const
 
AtomsPtr< const AtomsCore::MetadataanimState () const
 
AtomsPtr< const AtomsCore::BoolMetadata > forceClipTransition () const
 
AtomsPtr< const AtomsCore::BoolMetadata > visible () const
 
AtomsPtr< const AtomsCore::DoubleMetadata > linearVelocity () const
 
AtomsPtr< const AtomsCore::DoubleMetadata > angularVelocity () const
 
AtomsPtr< const AtomsCore::BoolMetadata > locomotionActive () const
 
AtomsPtr< const AtomsCore::Vector3Metadata > velocityOverride () const
 
AtomsPtr< const AtomsCore::BoolMetadata > useVelocityOverride () const
 
AtomsPtr< const AtomsCore::Vector3Metadata > _navtp () const
 
AtomsPtr< const AtomsCore::Vector3ArrayMetadata > _navfp () const
 

Friends

class AgentsPool
 

Detailed Description

Agent.

This class defines an agent. It contains a pose, the behaviour network used to compute it, a pointer to the agent type and a metadata map.

Member Function Documentation

◆ agentType()

const AgentTypeCPtr & Atoms::Agent::agentType ( ) const
inline

Gets the agent type.

Returns
The agent type

◆ computePose()

void Atoms::Agent::computePose ( double  simTime = 0.0)

Computes the agent pose.

Trigger the behaviour network evaluation and copies the result into the pose

Parameters
simTimeTime

◆ metadata() [1/2]

AtomsCore::MapMetadata & Atoms::Agent::metadata ( )
inline

Gets the agent metadata map.

Returns
The agent metadata map

◆ metadata() [2/2]

const AtomsCore::MapMetadata & Atoms::Agent::metadata ( ) const
inline

Gets the agent metadata map.

Returns
The agent metadata map

◆ pose() [1/2]

AtomsCore::Pose & Atoms::Agent::pose ( )
inline

Gets the agent pose.

Returns
The agent pose

◆ pose() [2/2]

const AtomsCore::Pose & Atoms::Agent::pose ( ) const
inline

Gets the agent pose.

Returns
The agent pose

◆ setAgentType()

void Atoms::Agent::setAgentType ( AgentTypeCPtr  agentType)

Sets the agent type.

It sets the agent type and initializes the pose

Parameters
agentTypeAgent type

◆ setPose()

void Atoms::Agent::setPose ( const AtomsCore::Pose value)
inline

Set agent pose.

Set an agent pose.


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