Panda3D
Public Member Functions | List of all members
TimedCycle Class Reference

A class for anything that needs to cycle over some finite list of elements in increments based on time. More...

#include "timedCycle.h"

Public Member Functions

 TimedCycle (PN_stdfloat cycle_time, int element_count)
 
void fillin (DatagramIterator &scan)
 This internal function is called by make_TimedCycle to read in all of the relevant data from the BamFile for the new TimedCycle. More...
 
int next_element ()
 Set the number of elements being cycled through. More...
 
void set_cycle_time (PN_stdfloat cycle_time)
 Set the number of elements being cycled through. More...
 
void set_element_count (int element_count)
 Set the number of elements being cycled through. More...
 
void write_datagram (Datagram &me)
 Writes the contents of this object to the datagram for shipping out to a Bam file. More...
 

Detailed Description

A class for anything that needs to cycle over some finite list of elements in increments based on time.

All time variables are assumed to be set in seconds.

Definition at line 30 of file timedCycle.h.

Member Function Documentation

◆ fillin()

void TimedCycle::fillin ( DatagramIterator scan)

This internal function is called by make_TimedCycle to read in all of the relevant data from the BamFile for the new TimedCycle.

Definition at line 34 of file timedCycle.cxx.

References ClockObject::get_global_clock(), ClockObject::get_real_time, DatagramIterator::get_stdfloat(), and DatagramIterator::get_uint16().

◆ next_element()

int TimedCycle::next_element ( )
inline

Set the number of elements being cycled through.

Definition at line 76 of file timedCycle.I.

References ClockObject::get_frame_time.

◆ set_cycle_time()

void TimedCycle::set_cycle_time ( PN_stdfloat  cycle_time)
inline

Set the number of elements being cycled through.

Definition at line 56 of file timedCycle.I.

◆ set_element_count()

void TimedCycle::set_element_count ( int  element_count)
inline

Set the number of elements being cycled through.

Definition at line 47 of file timedCycle.I.

◆ write_datagram()

void TimedCycle::write_datagram ( Datagram me)

Writes the contents of this object to the datagram for shipping out to a Bam file.

Definition at line 24 of file timedCycle.cxx.

References Datagram::add_stdfloat(), and Datagram::add_uint16().


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