AnimationFrame Class Reference

Stores information about a single frame in an animation. More...

#include <AnimationFrame.h>

List of all members.

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


Detailed Description

Stores information about a single frame in an animation.

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.

See also:
Animation

Definition at line 30 of file AnimationFrame.h.


Constructor & Destructor Documentation

AnimationFrame::AnimationFrame (  ) 

Constructs a default empty animation frame.

Definition at line 36 of file AnimationFrame.h.

AnimationFrame::AnimationFrame ( const std::string &  name,
unsigned int  frameNumber 
)

Constructs an animation frame with no associated time.

Parameters:
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.
See also:
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.

Parameters:
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.
See also:
Animation

Definition at line 76 of file AnimationFrame.h.


Member Function Documentation

bool AnimationFrame::operator< ( const AnimationFrame frame  )  const

Queries whether this frame has a lesser frame number or time than this frame.

Parameters:
frame The animation frame to compare against this frame.
Returns:
If the time value of this frame and frame are both valid, returns 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.

Parameters:
frame The animation frame to compare against this frame.
Returns:
If the time value of this frame and frame are both valid, returns 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.

Parameters:
frame The animation frame to compare against this frame.
Returns:
Returns 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.

Parameters:
frame The animation frame to compare against this frame.
Returns:
Returns 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.


Member Data Documentation

std::string AnimationFrame::mName

The frame name.

Definition at line 161 of file AnimationFrame.h.

The frame number.

The frame number is zero-based and each frame in an animation should have a unique number.

See also:
Animation

Definition at line 171 of file AnimationFrame.h.

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.


Software Development Kit - Opticks 4.9.0 Build 16218