Go to the documentation of this file.
14 #ifndef ANIMINTERFACE_H
15 #define ANIMINTERFACE_H
43 INLINE
void play(
double from,
double to);
44 INLINE
void loop(
bool restart);
45 INLINE
void loop(
bool restart,
double from,
double to);
46 INLINE
void pingpong(
bool restart);
47 INLINE
void pingpong(
bool restart,
double from,
double to);
49 INLINE
void pose(
double frame);
51 INLINE
void set_play_rate(
double play_rate);
52 INLINE
double get_play_rate()
const;
53 INLINE
double get_frame_rate()
const;
54 virtual int get_num_frames()
const;
56 INLINE
int get_frame()
const;
57 INLINE
int get_next_frame()
const;
58 INLINE
double get_frac()
const;
59 INLINE
int get_full_frame()
const;
60 INLINE
double get_full_fframe()
const;
61 INLINE
bool is_playing()
const;
63 virtual void output(std::ostream &out)
const;
66 MAKE_PROPERTY(play_rate, get_play_rate, set_play_rate);
67 MAKE_PROPERTY(frame_rate, get_frame_rate);
68 MAKE_PROPERTY(num_frames, get_num_frames);
70 MAKE_PROPERTY(frame, get_frame);
71 MAKE_PROPERTY(next_frame, get_next_frame);
72 MAKE_PROPERTY(frac, get_frac);
73 MAKE_PROPERTY(full_frame, get_full_frame);
74 MAKE_PROPERTY(full_fframe, get_full_fframe);
75 MAKE_PROPERTY(playing, is_playing);
78 INLINE
void set_frame_rate(
double frame_rate);
79 INLINE
void set_num_frames(
int num_frames);
80 virtual void animation_activated();
95 class EXPCL_PANDA_PUTIL CData :
public CycleData {
98 CData(
const CData ©);
103 return AnimInterface::get_class_type();
106 void play(
double from,
double to);
107 void loop(
bool restart,
double from,
double to);
108 void pingpong(
bool restart,
double from,
double to);
109 void pose(
double frame);
111 INLINE
double get_frac()
const;
112 int get_full_frame(
int increment)
const;
113 double get_full_fframe()
const;
114 bool is_playing()
const;
116 virtual void output(std::ostream &out)
const;
118 void internal_set_rate(
double frame_rate,
double play_rate);
119 double get_f()
const;
131 double _effective_frame_rate;
148 static void init_type() {
156 INLINE std::ostream &operator << (std::ostream &out,
const AnimInterface &ai);
A single page of data maintained by a PipelineCycler.
virtual TypeHandle get_parent_type() const
Returns the type of the container that owns the CycleData.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A class to retrieve the individual data elements previously stored in a Datagram.
virtual void output(std::ostream &out) const
Formats the contents of the CycleData in some meaningful way for humans.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
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.
This template class calls PipelineCycler::write() in the constructor and PipelineCycler::release_writ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This template class calls PipelineCycler::read_unlocked(), and then provides a transparent read-only ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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...
This is the fundamental interface for things that have a play/loop/stop type interface for frame-base...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.