#include <AnimationFrame.h>
Public Member Functions | |
| AnimationFrame () | |
| AnimationFrame (const std::string &name, unsigned int frameNumber) | |
| AnimationFrame (const std::string &name, unsigned int frameNumber, double time) | |
| bool | operator< (const AnimationFrame &frame) const |
| bool | operator> (const AnimationFrame &frame) const |
| bool | operator== (const AnimationFrame &frame) const |
| bool | operator!= (const AnimationFrame &frame) const |
Public Attributes | |
| std::string | mName |
| unsigned int | mFrameNumber |
| double | mTime |
An animation frame contains three values: name, frame number, and time. The name is not used internally, but is provided so that objects can provide a meaningful way for the user to uniquely identify a frame. The frame number is zero-based and should be unique to each frame in an animation. The time value corresponds to either seconds after midnight on January 1, 1970 UTC or elapsed seconds after the start of the animation. A double precision value is used to allow milliseconds to be specified as a fractional second. A negative time value, which is the default state, indicates that time is not associated with the frame.
Definition at line 30 of file AnimationFrame.h.
| AnimationFrame::AnimationFrame | ( | ) |
| AnimationFrame::AnimationFrame | ( | const std::string & | name, | |
| unsigned int | frameNumber | |||
| ) |
Constructs an animation frame with no associated time.
| name | The frame name. | |
| frameNumber | The frame number. Any positive number can be used to create the frame, but the number should be unique for all frames in an animation. |
Definition at line 54 of file AnimationFrame.h.
| AnimationFrame::AnimationFrame | ( | const std::string & | name, | |
| unsigned int | frameNumber, | |||
| double | time | |||
| ) |
Constructs an animation frame with an associated time value.
| name | The frame name. | |
| frameNumber | The frame number. Any positive number can be used to create the frame, but the number should be unique for all frames in an animation. | |
| time | The frame time in seconds after midnight, January 1, 1970 UTC or elapsed seconds after the start of the animation. A fractional second represents milliseconds. |
Definition at line 76 of file AnimationFrame.h.
| bool AnimationFrame::operator< | ( | const AnimationFrame & | frame | ) | const |
Queries whether this frame has a lesser frame number or time than this frame.
| frame | The animation frame to compare against this frame. |
true if the time value of this frame is less than the time value of frame. If the time value of either this frame or frame is invalid (negative), returns true if the frame number of this frame is less than the frame number of frame. Definition at line 96 of file AnimationFrame.h.
| bool AnimationFrame::operator> | ( | const AnimationFrame & | frame | ) | const |
Queries whether this frame has a greater frame number or time than this frame.
| frame | The animation frame to compare against this frame. |
true if the time value of this frame is greater than the time value of frame. If the time value of either this frame or frame is invalid (negative), returns true if the frame number of this frame is greater than the frame number of frame. Definition at line 120 of file AnimationFrame.h.
| bool AnimationFrame::operator== | ( | const AnimationFrame & | frame | ) | const |
Queries whether an animation frame is identical to this frame.
| frame | The animation frame to compare against this frame. |
true if both the frame number and time of this frame are equal to those of frame. Definition at line 139 of file AnimationFrame.h.
| bool AnimationFrame::operator!= | ( | const AnimationFrame & | frame | ) | const |
Queries whether an animation frame is different from this frame.
| frame | The animation frame to compare against this frame. |
true if both the frame number and time of this frame are different than those of frame. Definition at line 153 of file AnimationFrame.h.
| std::string AnimationFrame::mName |
| unsigned int AnimationFrame::mFrameNumber |
The frame number.
The frame number is zero-based and each frame in an animation should have a unique number.
Definition at line 171 of file AnimationFrame.h.
| double AnimationFrame::mTime |
The frame time.
If the frame type is FRAME_TIME, the time is specified in seconds after midnight, January 1, 1970 UTC. If the frame type is FRAME_ELAPSED_TIME, the time is specified in elapsed seconds after the start of the animation. In both cases, a fractional second represents milliseconds.
Definition at line 182 of file AnimationFrame.h.