10 #include <Atoms/Globals.h>
11 #include <AtomsCore/AtomsMath.h>
12 #include <AtomsUtils/Triangle.h>
13 #include <Atoms/Locomotion/LocomotionHelper.h>
27 bool disableDirectionBlending;
44 inline unsigned int numLocomotionClips()
const {
return m_clips.size(); };
46 inline unsigned int numTriangles()
const {
return m_triangles.size(); } ;
49 void addAnimationClip(
const std::string& clipName,
const AtomsCore::Vector2 coords,
const int inBlend,
const int outBlend,
const bool disableDirectionBlending,
const bool unsynced,
const int waitFrames);
52 void buildTriangles(
const LocomotionSort xSort = LocomotionSort::kGreater,
const LocomotionSort ySort = LocomotionSort::kLess,
const float eps = 1e-4);
61 void addTriangle(
const unsigned int p0Id,
const unsigned int p1Id,
const unsigned int p2Id);
67 std::vector<AtomsUtils::Triangle2>
getTriangles()
const {
return m_triangles; };
74 std::vector<AtomsUtils::Triangle2> m_triangles;
76 std::vector<LocomotionClip> m_clips;
Definition: Locomotion.h:21
Animation clip.
Definition: Locomotion.h:34
void clearTriangles()
clears all triangles
const AtomsUtils::Triangle2 & getTriangle(unsigned int index) const
Gets a locomotion triangle.
const LocomotionClip & getClip(unsigned int index) const
Gets a locomotion clip.
~Locomotion()
Destructor.
Definition: Locomotion.h:42
std::vector< AtomsUtils::Triangle2 > getTrianglesWithoutUnsync() const
get all triangles without the sync clips
void addAnimationClip(const std::string &clipName, const AtomsCore::Vector2 coords, const int inBlend, const int outBlend, const bool disableDirectionBlending, const bool unsynced, const int waitFrames)
Add a new clip.
std::vector< AtomsUtils::Triangle2 > getTriangles() const
get a copy of all triangles
Definition: Locomotion.h:67
void buildTriangles(const LocomotionSort xSort=LocomotionSort::kGreater, const LocomotionSort ySort=LocomotionSort::kLess, const float eps=1e-4)
builds the triangles for this locomotion system
void addTriangle(const unsigned int p0Id, const unsigned int p1Id, const unsigned int p2Id)
adds a triangle
Triangle 2D class.
Definition: Triangle.h:87
AtomsMath::Vector2 Vector2
Vector2 class.
Definition: AtomsMath.h:54
Atoms namespace.
Definition: Agent.h:29
AtomsPtr< Locomotion > LocomotionPtr
locomotion pointer
Definition: Locomotion.h:84
AtomsPtr< const Locomotion > LocomotionCPtr
locomotion const pointer
Definition: Locomotion.h:86