15 #ifndef ANIMINTERFACE_H
16 #define ANIMINTERFACE_H
18 #include "pandabase.h"
19 #include "typeHandle.h"
20 #include "register_type.h"
21 #include "cycleData.h"
22 #include "cycleDataReader.h"
23 #include "cycleDataWriter.h"
24 #include "pipelineCycler.h"
47 INLINE
void play(
double from,
double to);
48 INLINE
void loop(
bool restart);
49 INLINE
void loop(
bool restart,
double from,
double to);
50 INLINE
void pingpong(
bool restart);
51 INLINE
void pingpong(
bool restart,
double from,
double to);
53 INLINE
void pose(
double frame);
55 INLINE
void set_play_rate(
double play_rate);
56 INLINE
double get_play_rate()
const;
57 INLINE
double get_frame_rate()
const;
58 virtual int get_num_frames()
const;
60 INLINE
int get_frame()
const;
61 INLINE
int get_next_frame()
const;
62 INLINE
double get_frac()
const;
63 INLINE
int get_full_frame()
const;
64 INLINE
double get_full_fframe()
const;
65 INLINE
bool is_playing()
const;
67 virtual void output(ostream &out)
const;
70 INLINE
void set_frame_rate(
double frame_rate);
71 INLINE
void set_num_frames(
int num_frames);
72 virtual void animation_activated();
88 class EXPCL_PANDA_PUTIL CData :
public CycleData {
91 CData(
const CData ©);
96 return AnimInterface::get_class_type();
99 void play(
double from,
double to);
100 void loop(
bool restart,
double from,
double to);
101 void pingpong(
bool restart,
double from,
double to);
102 void pose(
double frame);
104 INLINE
double get_frac()
const;
105 int get_full_frame(
int increment)
const;
106 double get_full_fframe()
const;
107 bool is_playing()
const;
109 virtual void output(ostream &out)
const;
111 void internal_set_rate(
double frame_rate,
double play_rate);
112 double get_f()
const;
124 double _effective_frame_rate;
141 static void init_type() {
142 register_type(_type_handle,
"AnimInterface");
149 INLINE ostream &operator << (ostream &out,
const AnimInterface &ai);
151 #include "animInterface.I"
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
A single page of data maintained by a PipelineCycler.
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
This is the fundamental interface for things that have a play/loop/stop type interface for frame-base...
This template class calls PipelineCycler::read_unlocked(), and then provides a transparent read-only ...
This template class calls PipelineCycler::write() in the constructor and PipelineCycler::release_writ...
virtual void fillin(DatagramIterator &scan, BamReader *manager)
This internal function is intended to be called by each class's make_from_bam() method to read in all...
A class to retrieve the individual data elements previously stored in a Datagram. ...
virtual void write_datagram(BamWriter *, Datagram &) const
Writes the contents of this object to the datagram for shipping out to a Bam file.
TypeHandle is the identifier used to differentiate C++ class types.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...