Radium Engine  1.5.20
Loading...
Searching...
No Matches
HandleArray.hpp
1#pragma once
2
3#include <Core/Animation/Pose.hpp>
4#include <Core/RaCore.hpp>
5#include <Core/Types.hpp>
6
7namespace Ra {
8namespace Core {
9namespace Animation {
10
14using Label = std::string;
15
19class RA_CORE_API HandleArray
20{
21 public:
25 enum class SpaceType : bool { LOCAL, MODEL };
27 "SpaceType is not a boolean" );
29 explicit HandleArray( const uint n );
30 HandleArray( const HandleArray& handle ) = default;
31 HandleArray& operator=( const HandleArray& handle ) = default;
32
33 virtual ~HandleArray();
34
38 inline virtual uint size() const { return m_pose.size(); }
39
43 virtual void clear();
44
48 virtual const Pose& getPose( const SpaceType MODE ) const;
49
55 virtual void setPose( const Pose& pose, const SpaceType MODE );
56
60 virtual const Transform& getTransform( const uint i, const SpaceType MODE ) const;
61
65 virtual void setTransform( const uint i, const Transform& T, const SpaceType MODE );
66
70 inline Label getName() const { return m_name; }
71
75 inline void setName( const Label& name ) { m_name = name; }
76
80 inline Label getLabel( const uint i ) const;
81
85 inline void setLabel( const uint i, const Label& text );
86
91
92 protected:
97
102};
103
104inline Label HandleArray::getLabel( const uint i ) const {
105 CORE_ASSERT( ( i < size() ), "Index i out of bound" );
106 return m_label.at( i );
107}
108
109inline void HandleArray::setLabel( const uint i, const Label& text ) {
110 CORE_ASSERT( ( i < size() ), "Index i out of bound" );
111 m_label[i] = text;
112}
113
114} // namespace Animation
115} // Namespace Core
116} // Namespace Ra
void setName(const Label &name)
Label getLabel(const uint i) const
void setLabel(const uint i, const Label &text)
hepler function to manage enum as underlying types in VariableSet
Definition Cage.cpp:3