Atoms Crowd  7.0.0
AgentType.impl.h
1 // ===========================================================================
2 // Copyright (c) 2015 Toolchefs Ltd. All rights reserved.
3 //
4 // Use of this software is subject to the terms of the Toolchefs license
5 // agreement provided at the time of installation or download, or which
6 // otherwise accompanies this software in either electronic or hard copy form.
7 // ===========================================================================
8 
9 namespace Atoms
10 {
12  {
13  return m_skeleton;
14  }
15 
17  {
18  return m_skeleton;
19  }
20 
22  {
23  return m_metadata;
24  }
25 
27  {
28  return m_metadata;
29  }
30 
31  const std::string& AgentType::name() const
32  {
33  return m_name;
34  }
35 
36  void AgentType::setName(const std::string& name)
37  {
38  m_name = name;
39  }
40 
41  const std::vector<AtomsCore::JointChain>& AgentType::jointChains() const
42  {
43  return m_jointChains;
44  }
45 
46  const std::vector<AtomsCore::Matrix>& AgentType::retargetJointRefWorldMatrix() const
47  {
48  return m_retargetJointRefWorldMatrix;
49  }
50 
51  const std::vector<AtomsCore::Quaternion>& AgentType::retargetJointOffset() const
52  {
53  return m_retargetJointOffset;
54  }
55 
56  const std::vector<AgentType::RetargetJointChainData>& AgentType::retargetData(const std::string &other) const
57  {
58  return m_retargetData.find(other)->second;
59  }
60 
61  const bool AgentType::hasRetargetData(const std::string &other) const
62  {
63  auto it = m_retargetData.find(other);
64  if (it == m_retargetData.end())
65  return false;
66  else
67  return true;
68  }
69 
71  {
72  return m_radius;
73  }
74 
75  void AgentType::setCollisionRadius(double value)
76  {
77  m_radius = value;
78  }
79 
81  {
82  return m_hasVirtualRoot;
83  }
84 
86  {
87  return m_virtualRootPosition;
88  }
89 
90  AgentType::FacingDirection AgentType::getFacingDirection() const
91  {
92  return m_facingDirection;
93  }
94 
95  void AgentType::setFacingDirection(AgentType::FacingDirection direction)
96  {
97  m_facingDirection = direction;
98  }
99 }
double collisionRadius() const
Get collision radius.
Definition: AgentType.impl.h:70
const std::vector< AtomsCore::Quaternion > & retargetJointOffset() const
Gets characterization joint rotation offset.
Definition: AgentType.impl.h:51
const bool hasRetargetData(const std::string &other) const
Gets if the given agent type is included in the retarget catalog.
Definition: AgentType.impl.h:61
void setName(const std::string &name)
Set name.
Definition: AgentType.impl.h:36
const std::string & name() const
Get name.
Definition: AgentType.impl.h:31
const std::vector< AtomsCore::Matrix > & retargetJointRefWorldMatrix() const
Gets characterization joint worldMatrix in ref pose.
Definition: AgentType.impl.h:46
const std::vector< AtomsCore::JointChain > & jointChains() const
Gets characterization joint chains.
Definition: AgentType.impl.h:41
void setFacingDirection(FacingDirection direction)
Set facing direction.
Definition: AgentType.impl.h:95
const std::vector< RetargetJointChainData > & retargetData(const std::string &other) const
Gets retarget data map (a key for each other agent types as source)
Definition: AgentType.impl.h:56
void setCollisionRadius(double value)
Set collision radius.
Definition: AgentType.impl.h:75
bool hasVirtualRoot() const
Returns if this agent type has a virtual root.
Definition: AgentType.impl.h:80
AtomsCore::MapMetadata & metadata()
Gets the metadata map.
Definition: AgentType.impl.h:21
AtomsCore::Skeleton & skeleton()
Gets the agent type skeleton.
Definition: AgentType.impl.h:11
const AtomsCore::Vector3 & virtualRootPosition() const
Get virtual root position.
Definition: AgentType.impl.h:85
FacingDirection getFacingDirection() const
Get facing direction.
Definition: AgentType.impl.h:90
MapMetadata class.
Definition: MapMetadata.h:24
Skeleton class.
Definition: Skeleton.h:68
AtomsMath::Vector3 Vector3
Vector3 class.
Definition: AtomsMath.h:57
Atoms namespace.
Definition: Agent.h:29