Atoms Crowd  7.0.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  const double randomWeight = 1.0);
67 
70 
73 
76 
78  inline const std::string& clipName() const;
79 
81  inline void setClipName(const std::string& name);
82 
84  inline const std::string& tagName() const;
85 
87  inline void setTagName(const std::string& name);
88 
90  inline unsigned int motionType() const;
91 
93  inline void setMotionType(unsigned int mType);
94 
96  inline unsigned int mergeType() const;
97 
99  inline void setMergeType(unsigned int mType);
100 
102  inline double angle() const;
103 
105  inline void setAngle(double value);
106 
108  inline double blendAngle() const;
109 
111  inline void setBlendAngle(double value);
112 
114  inline bool synced() const;
115 
117  inline void setSynced(const bool synced);
118 
120  inline bool useClipDirection() const;
121 
123  inline void setUseClipDirection(const bool useClipDirection);
124 
126  inline double maxTurnAngle() const;
127 
129  inline void setMaxTurnAngle(const double maxTurnAngle);
130 
132  inline int blendFrames() const;
133 
135  inline void setBlendFrames(const int blendFrames);
136 
138  inline double randomWeight() const;
139 
141  inline void setRandomWeight(const double randomWeight);
142 
143  private:
144 
146  std::string m_clipName;
147 
149  std::string m_tagName;
150 
152  unsigned int m_motionType;
153 
155  unsigned int m_mergeType;
156 
158  double m_angle;
159 
161  double m_blendAngle;
162 
164  bool m_synced;
165 
167  bool m_useClipDirection;
168 
170  double m_maxTurnAngle;
171 
173  int m_blendFrames;
174 
176  double m_randomWeight;
177  };
178 }
179 
180 #include "AnimationStateClip.impl.h"
Animation State clip.
Definition: AnimationStateClip.h:23
AnimationStateClip & operator=(const AnimationStateClip &rhs)
Copy assignment.
AnimationStateClip(const AnimationStateClip &rhs)
Copy constructor.
AnimationStateClip()
Constructor.
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, const double randomWeight=1.0)
Constructor.
~AnimationStateClip()
Destructor.
Atoms namespace.
Definition: Agent.h:29