3 #include <Core/RaCore.hpp>
23 const Time& end = -std::numeric_limits<Time>::max() ) :
24 m_start( start ), m_end( end ) {}
41 inline void setStart(
const Time& start ) { m_start = std::min( start, m_end ); }
51 inline void setEnd(
const Time& end ) { m_end = std::max( end, m_start ); }
66 m_start = std::min( m_start, time.
m_start );
67 m_end = std::max( m_end, time.
m_end );
77 inline bool isValid()
const {
return m_start < m_end; }
83 inline Time duration()
const {
return isValid() ? m_end - m_start : 0; }
88 inline bool contains(
const Time& t )
const {
return ( ( t >= m_start ) && ( t <= m_end ) ); }
106 return ( ( m_start == time.
m_start ) && ( m_end == time.
m_end ) );
117 inline bool operator==(
const Time& t )
const {
return ( t == m_start ) && ( t == m_end ); }
Time m_start
Animation starting time.
void setStart(const Time &start)
void extends(const AnimationTime &time)
bool operator<(const Time &t) const
void extends(const Time &t)
void setEnd(const Time &end)
bool operator==(const Time &t) const
bool intersect(const AnimationTime &time) const
bool operator==(const AnimationTime &time) const
bool operator!=(const AnimationTime &time) const
bool operator>(const Time &t) const
Time m_end
Animation ending time.
bool contains(const Time &t) const