osg::Sequence Class Reference

Inheritance diagram for osg::Sequence:

osg::Group osg::Node osg::Object osg::Referenced List of all members.

Public Types

enum  LoopMode { LOOP, SWING }
enum  SequenceMode { START, STOP, PAUSE, RESUME }

Public Member Functions

 Sequence ()
 Sequence (const Sequence &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 META_Node (osg, Sequence)
virtual void traverse (NodeVisitor &nv)
void setValue (int value)
int getValue () const
void setTime (int frame, float t)
float getTime (int frame) const
unsigned int getNumFrames () const
void setInterval (LoopMode mode, int begin, int end)
void getInterval (LoopMode &mode, int &begin, int &end) const
void setDuration (float speed, int nreps=-1)
void getDuration (float &speed, int &nreps) const
void setMode (SequenceMode mode)
SequenceMode getMode () const

Protected Member Functions

virtual ~Sequence ()

Protected Attributes

int _value
float _last
std::vector< float > _frameTime
int _step
LoopMode _loopMode
int _begin
int _end
float _speed
int _nreps
int _nrepsremain
SequenceMode _mode

Detailed Description

Sequence is a Group node which allows automatic, time based switching between children.


Member Enumeration Documentation

enum osg::Sequence::LoopMode

Interval modes. 'Loop' repeats frames 1-N; 'swing' repeats 1->N, (N-1)->1.

Enumerator:
LOOP 
SWING 

enum osg::Sequence::SequenceMode

Sequence modes.

Enumerator:
START 
STOP 
PAUSE 
RESUME 


Constructor & Destructor Documentation

osg::Sequence::Sequence (  ) 

osg::Sequence::Sequence ( const Sequence ,
const CopyOp copyop = CopyOp::SHALLOW_COPY 
)

Copy constructor using CopyOp to manage deep vs shallow copy.

virtual osg::Sequence::~Sequence (  )  [inline, protected, virtual]


Member Function Documentation

osg::Sequence::META_Node ( osg  ,
Sequence   
)

virtual void osg::Sequence::traverse ( NodeVisitor  )  [virtual]

Traverse downwards : calls children's accept method with NodeVisitor.

Reimplemented from osg::Group.

void osg::Sequence::setValue ( int  value  )  [inline]

int osg::Sequence::getValue (  )  const [inline]

void osg::Sequence::setTime ( int  frame,
float  t 
)

Set time in seconds for child.

float osg::Sequence::getTime ( int  frame  )  const

Get time for child.

unsigned int osg::Sequence::getNumFrames (  )  const [inline]

Get number of frames

void osg::Sequence::setInterval ( LoopMode  mode,
int  begin,
int  end 
)

Set sequence mode & interval (range of children to be displayed).

void osg::Sequence::getInterval ( LoopMode mode,
int &  begin,
int &  end 
) const [inline]

Get sequence mode & interval.

void osg::Sequence::setDuration ( float  speed,
int  nreps = -1 
)

Set duration: speed-up & number of repeats

void osg::Sequence::getDuration ( float &  speed,
int &  nreps 
) const [inline]

Get duration & number of repeats.

void osg::Sequence::setMode ( SequenceMode  mode  ) 

Set sequence mode. Start/stop & pause/resume.

SequenceMode osg::Sequence::getMode (  )  const [inline]

Get sequence mode.


Member Data Documentation

int osg::Sequence::_value [protected]

float osg::Sequence::_last [protected]

std::vector<float> osg::Sequence::_frameTime [protected]

int osg::Sequence::_step [protected]

LoopMode osg::Sequence::_loopMode [protected]

int osg::Sequence::_begin [protected]

int osg::Sequence::_end [protected]

float osg::Sequence::_speed [protected]

int osg::Sequence::_nreps [protected]

int osg::Sequence::_nrepsremain [protected]

SequenceMode osg::Sequence::_mode [protected]


The documentation for this class was generated from the following file:
Generated on Thu Sep 27 06:07:16 2007 for OpenSceneGraph by  doxygen 1.5.2