Loading [MathJax]/extensions/TeX/AMSsymbols.js
Radium Engine  1.7.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HandleArray.hpp
1#pragma once
2
3#include <Core/Animation/Pose.hpp>
4#include <Core/CoreMacros.hpp>
5#include <Core/RaCore.hpp>
6#include <Core/Types.hpp>
7#include <memory>
8#include <string>
9#include <type_traits>
10#include <vector>
11
12namespace Ra {
13namespace Core {
14namespace Animation {
15
19using Label = std::string;
20
24class RA_CORE_API HandleArray
25{
26 public:
30 enum class SpaceType : bool { LOCAL, MODEL };
32 "SpaceType is not a boolean" );
34 explicit HandleArray( const uint n );
35 HandleArray( const HandleArray& handle ) = default;
36 HandleArray& operator=( const HandleArray& handle ) = default;
37
38 virtual ~HandleArray();
39
43 inline virtual uint size() const { return m_pose.size(); }
44
48 virtual void clear();
49
53 virtual const Pose& getPose( const SpaceType MODE ) const;
54
60 virtual void setPose( const Pose& pose, const SpaceType MODE );
61
65 virtual const Transform& getTransform( const uint i, const SpaceType MODE ) const;
66
70 virtual void setTransform( const uint i, const Transform& T, const SpaceType MODE );
71
75 inline Label getName() const { return m_name; }
76
80 inline void setName( const Label& name ) { m_name = name; }
81
85 inline Label getLabel( const uint i ) const;
86
90 inline void setLabel( const uint i, const Label& text );
91
96
97 protected:
102
107};
108
109inline Label HandleArray::getLabel( const uint i ) const {
110 CORE_ASSERT( ( i < size() ), "Index i out of bound" );
111 return m_label.at( i );
112}
113
114inline void HandleArray::setLabel( const uint i, const Label& text ) {
115 CORE_ASSERT( ( i < size() ), "Index i out of bound" );
116 m_label[i] = text;
117}
118
119} // namespace Animation
120} // Namespace Core
121} // 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:4