Radium Engine  1.5.20
Loading...
Searching...
No Matches
Ra::Core::Asset::AnimationTime Class Reference

#include <Core/Asset/AnimationTime.hpp>

+ Collaboration diagram for Ra::Core::Asset::AnimationTime:

Public Types

using Time = Scalar
 

Public Member Functions

 AnimationTime (const Time &start=std::numeric_limits< Time >::max(), const Time &end=-std::numeric_limits< Time >::max())
 
 AnimationTime (const AnimationTime &time)=default
 
Time
Time getStart () const
 
void setStart (const Time &start)
 
Time getEnd () const
 
void setEnd (const Time &end)
 
void extends (const Time &t)
 
void extends (const AnimationTime &time)
 
Query
bool isValid () const
 
Time duration () const
 
bool contains (const Time &t) const
 
bool intersect (const AnimationTime &time) const
 

Comparison operators

Time m_start
 Animation starting time.
 
Time m_end
 Animation ending time.
 
bool operator== (const AnimationTime &time) const
 
bool operator!= (const AnimationTime &time) const
 
bool operator== (const Time &t) const
 
bool operator< (const Time &t) const
 
bool operator> (const Time &t) const
 

Detailed Description

The AnimationTime class stores the start and end times of an animation.

Definition at line 14 of file AnimationTime.hpp.

Member Typedef Documentation

◆ Time

Defines the type for time values.

Definition at line 20 of file AnimationTime.hpp.

Constructor & Destructor Documentation

◆ AnimationTime()

Ra::Core::Asset::AnimationTime::AnimationTime ( const Time & start = std::numeric_limits<Time>::max(),
const Time & end = -std::numeric_limits<Time>::max() )
inline

Definition at line 22 of file AnimationTime.hpp.

◆ ~AnimationTime()

Ra::Core::Asset::AnimationTime::~AnimationTime ( )
inline

Definition at line 28 of file AnimationTime.hpp.

Member Function Documentation

◆ contains()

bool Ra::Core::Asset::AnimationTime::contains ( const Time & t) const
inline

Return true if \( t \in [start,end] \).

Definition at line 88 of file AnimationTime.hpp.

◆ duration()

Time Ra::Core::Asset::AnimationTime::duration ( ) const
inline

Return the animation duration.

Note
if the AnimationTime is invalid, returns 0.

Definition at line 83 of file AnimationTime.hpp.

◆ extends() [1/2]

void Ra::Core::Asset::AnimationTime::extends ( const AnimationTime & time)
inline

Performs the merge of *this with time, resulting in *this being the smallest AnimationTime containing both *this and time.

Definition at line 65 of file AnimationTime.hpp.

+ Here is the call graph for this function:

◆ extends() [2/2]

void Ra::Core::Asset::AnimationTime::extends ( const Time & t)
inline

Extends *this so that \( t \in [start,end] \).

Definition at line 56 of file AnimationTime.hpp.

◆ getEnd()

Time Ra::Core::Asset::AnimationTime::getEnd ( ) const
inline

Return the animation end time.

Definition at line 46 of file AnimationTime.hpp.

◆ getStart()

Time Ra::Core::Asset::AnimationTime::getStart ( ) const
inline

Return the animation start time.

Definition at line 36 of file AnimationTime.hpp.

◆ intersect()

bool Ra::Core::Asset::AnimationTime::intersect ( const AnimationTime & time) const
inline

Return true if \( *this \cap time \neq \emptyset \).

Definition at line 93 of file AnimationTime.hpp.

◆ isValid()

bool Ra::Core::Asset::AnimationTime::isValid ( ) const
inline

Return true if \( start < end \).

Definition at line 77 of file AnimationTime.hpp.

◆ operator!=()

bool Ra::Core::Asset::AnimationTime::operator!= ( const AnimationTime & time) const
inline

Returns true if *this and time represent different animation times.

Definition at line 112 of file AnimationTime.hpp.

◆ operator<()

bool Ra::Core::Asset::AnimationTime::operator< ( const Time & t) const
inline

Returns true if \( t < end \).

Definition at line 122 of file AnimationTime.hpp.

◆ operator==() [1/2]

bool Ra::Core::Asset::AnimationTime::operator== ( const AnimationTime & time) const
inline

Returns true if *this and time represent the same animation time.

Definition at line 105 of file AnimationTime.hpp.

◆ operator==() [2/2]

bool Ra::Core::Asset::AnimationTime::operator== ( const Time & t) const
inline

Returns true if \( t \in [start,end] \).

Definition at line 117 of file AnimationTime.hpp.

◆ operator>()

bool Ra::Core::Asset::AnimationTime::operator> ( const Time & t) const
inline

Returns true if \( t > start \).

Definition at line 127 of file AnimationTime.hpp.

◆ setEnd()

void Ra::Core::Asset::AnimationTime::setEnd ( const Time & end)
inline

Return the animation end time in end.

Definition at line 51 of file AnimationTime.hpp.

+ Here is the call graph for this function:

◆ setStart()

void Ra::Core::Asset::AnimationTime::setStart ( const Time & start)
inline

Return the animation start time in start.

Definition at line 41 of file AnimationTime.hpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_end

Time Ra::Core::Asset::AnimationTime::m_end
protected

Animation ending time.

Definition at line 134 of file AnimationTime.hpp.

◆ m_start

Time Ra::Core::Asset::AnimationTime::m_start
protected

Animation starting time.

Definition at line 131 of file AnimationTime.hpp.


The documentation for this class was generated from the following file: