Atoms Crowd  4.1.0
AnimationStateClip.h
1 #pragma once
2 // ===========================================================================
3 // Copyright (c) 2015 Toolchefs Ltd. All rights reserved.
4 //
5 // Use of this software is subject to the terms of the Toolchefs license
6 // agreement provided at the time of installation or download, or which
7 // otherwise accompanies this software in either electronic or hard copy form.
8 // ===========================================================================
9 
10 #include <Atoms/Globals.h>
11 #include <AtomsCore/Globals.h>
12 
13 #include <vector>
14 #include <string>
15 
16 
17 namespace Atoms
18 {
20 
22  class ATOMS_EXPORT AnimationStateClip
23  {
24  public:
25 
26  enum MotionType
27  {
28  kStraight = 0,
29  kTurnLeft,
30  kTurnRight,
31  kTurnUp,
32  kTurnDown,
33  kBankLeft,
34  kBankRight
35  };
36 
37  enum MergeType
38  {
39  kMerge = 0,
40  kExclusive,
41  kRandom
42  };
43 
46 
48  /*
49  \param clipName Clip name
50  \param motionType Motion type
51  \param mergeType Merge type
52  \param angle Turning angle
53  \param blendAngle blendAngle
54  */
56  const std::string& clipName,
57  unsigned int motionType = kStraight,
58  unsigned int mergeType = kMerge,
59  double angle = 0.0,
60  double blendAngle = 0.0,
61  const std::string& tagName = "",
62  const bool synced = true,
63  const bool useClipDirection = false,
64  const double maxTurnAngle = 0.0,
65  const int blendFrames = 1);
66 
69 
72 
75 
77  inline const std::string& clipName() const;
78 
80  inline void setClipName(const std::string& name);
81 
83  inline const std::string& tagName() const;
84 
86  inline void setTagName(const std::string& name);
87 
89  inline unsigned int motionType() const;
90 
92  inline void setMotionType(unsigned int mType);
93 
95  inline unsigned int mergeType() const;
96 
98  inline void setMergeType(unsigned int mType);
99 
101  inline double angle() const;
102 
104  inline void setAngle(double value);
105 
107  inline double blendAngle() const;
108 
110  inline void setBlendAngle(double value);
111 
113  inline bool synced() const;
114 
116  inline void setSynced(const bool synced);
117 
119  inline bool useClipDirection() const;
120 
122  inline void setUseClipDirection(const bool useClipDirection);
123 
125  inline double maxTurnAngle() const;
126 
128  inline void setMaxTurnAngle(const double maxTurnAngle);
129 
131  inline int blendFrames() const;
132 
134  inline void setBlendFrames(const int blendFrames);
135 
136  private:
137 
139  std::string m_clipName;
140 
142  std::string m_tagName;
143 
145  unsigned int m_motionType;
146 
148  unsigned int m_mergeType;
149 
151  double m_angle;
152 
154  double m_blendAngle;
155 
157  bool m_synced;
158 
160  bool m_useClipDirection;
161 
163  double m_maxTurnAngle;
164 
166  int m_blendFrames;
167  };
168 }
169 
170 #include "AnimationStateClip.impl.h"
Atoms::AnimationStateClip::AnimationStateClip
AnimationStateClip()
Constructor.
Atoms::AnimationStateClip::~AnimationStateClip
~AnimationStateClip()
Destructor.
Atoms::AnimationStateClip::operator=
AnimationStateClip & operator=(const AnimationStateClip &rhs)
Copy assignment.
Atoms::AnimationStateClip::AnimationStateClip
AnimationStateClip(const std::string &clipName, unsigned int motionType=kStraight, unsigned int mergeType=kMerge, double angle=0.0, double blendAngle=0.0, const std::string &tagName="", const bool synced=true, const bool useClipDirection=false, const double maxTurnAngle=0.0, const int blendFrames=1)
Constructor.
Atoms
Atoms namespace.
Definition: Agent.h:28
Atoms::AnimationStateClip::AnimationStateClip
AnimationStateClip(const AnimationStateClip &rhs)
Copy constructor.
Atoms::AnimationStateClip
Animation State clip.
Definition: AnimationStateClip.h:23