Radium Engine  1.5.0
HandleArray.cpp
1 #include <Core/Animation/HandleArray.hpp>
2 
3 namespace Ra {
4 namespace Core {
5 namespace Animation {
6 
7 HandleArray::HandleArray() : m_pose(), m_name( "" ), m_label() {}
8 
9 HandleArray::HandleArray( const uint n ) :
10  m_pose( n, Transform::Identity() ), m_name( "" ), m_label( n, "" ) {}
11 
12 HandleArray::~HandleArray() {}
13 
14 void HandleArray::clear() {
15  m_pose.clear();
16 }
17 
18 const Pose& HandleArray::getPose( const SpaceType /*MODE*/ ) const {
19  return m_pose;
20 }
21 
22 void HandleArray::setPose( const Pose& pose, const SpaceType /*MODE*/ ) {
23  m_pose = pose;
24 }
25 
26 const Transform& HandleArray::getTransform( const uint i, const SpaceType /*MODE*/ ) const {
27  CORE_ASSERT( ( i < size() ), "Index i out of bound" );
28  return m_pose[i];
29 }
30 
31 void HandleArray::setTransform( const uint i, const Transform& T, const SpaceType /*MODE*/ ) {
32  CORE_ASSERT( ( i < size() ), "Index i out of bound" );
33  m_pose[i] = T;
34 }
35 
36 } // namespace Animation
37 } // Namespace Core
38 } // Namespace Ra
Definition: Cage.cpp:3