diff --git a/lib/Ray/sources/Model/ModelAnimations.cpp b/lib/Ray/sources/Model/ModelAnimations.cpp index b70abf56..1b5f9cc4 100644 --- a/lib/Ray/sources/Model/ModelAnimations.cpp +++ b/lib/Ray/sources/Model/ModelAnimations.cpp @@ -39,3 +39,12 @@ const RAY::ModelAnimation &RAY::ModelAnimations::at(int index) const return this->_animations.at(index); } +const RAY::ModelAnimation &RAY::ModelAnimations::operator[](int index) const +{ + return this->_animations[index]; +} + +RAY::ModelAnimation &RAY::ModelAnimations::at(int index) +{ + return this->_animations.at(index); +} diff --git a/lib/Ray/sources/Model/ModelAnimations.hpp b/lib/Ray/sources/Model/ModelAnimations.hpp index 9188955a..83978b82 100644 --- a/lib/Ray/sources/Model/ModelAnimations.hpp +++ b/lib/Ray/sources/Model/ModelAnimations.hpp @@ -36,9 +36,15 @@ namespace RAY { //! @brief Castin Object to raw model animation pointer ModelAnimation &operator[](int index); - //! @brief Same usage as the operator[] but const + //! @brief std [] const + const ModelAnimation &operator[](int index) const; + + //! @brief std at const const ModelAnimation &at(int index) const; + //! @brief std at + ModelAnimation &at(int index); + //! @return the number of loaded animations size_t getAnimationsCount() const;