Radium Engine
1.5.0
HandleArray.hpp
1
#pragma once
2
3
#include <Core/Animation/Pose.hpp>
4
#include <Core/RaCore.hpp>
5
#include <
Core/Types.hpp
>
6
7
namespace
Ra
{
8
namespace
Core {
9
namespace
Animation {
10
14
using
Label = std::string;
15
19
class
RA_CORE_API
HandleArray
20
{
21
public
:
25
enum class
SpaceType
: bool { LOCAL, MODEL };
26
static_assert( std::is_same<
bool
,
typename
std::underlying_type<SpaceType>::type>::value,
27
"SpaceType is not a boolean"
);
28
HandleArray
();
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
90
LocalPose
m_pose
;
91
92
protected
:
96
Label
m_name
;
97
101
std::vector<Label>
m_label
;
102
};
103
104
inline
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
109
inline
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
Types.hpp
Ra::Core::Animation::HandleArray
Definition:
HandleArray.hpp:20
Ra::Core::Animation::HandleArray::m_pose
LocalPose m_pose
Definition:
HandleArray.hpp:90
Ra::Core::Animation::HandleArray::setName
void setName(const Label &name)
Definition:
HandleArray.hpp:75
Ra::Core::Animation::HandleArray::getLabel
Label getLabel(const uint i) const
Definition:
HandleArray.hpp:104
Ra::Core::Animation::HandleArray::m_label
std::vector< Label > m_label
Definition:
HandleArray.hpp:101
Ra::Core::Animation::HandleArray::m_name
Label m_name
Definition:
HandleArray.hpp:96
Ra::Core::Animation::HandleArray::SpaceType
SpaceType
Definition:
HandleArray.hpp:25
Ra::Core::Animation::HandleArray::getName
Label getName() const
Definition:
HandleArray.hpp:70
Ra::Core::Animation::HandleArray::size
virtual uint size() const
Definition:
HandleArray.hpp:38
Ra::Core::Animation::HandleArray::setLabel
void setLabel(const uint i, const Label &text)
Definition:
HandleArray.hpp:109
Ra
Definition:
Cage.cpp:3
src
Core
Animation
HandleArray.hpp
Generated on Wed Apr 5 2023 15:07:30 for Radium Engine by
1.9.1