33class EXPCL_PANDA_GRUTIL MovieTexture :
public Texture {
35 explicit MovieTexture(
const std::string &name);
37 MovieTexture(
const MovieTexture ©) =
delete;
38 virtual ~MovieTexture();
40 INLINE
double get_video_length()
const;
41 INLINE
int get_video_width()
const;
42 INLINE
int get_video_height()
const;
50 void set_time(
double t);
51 double get_time()
const;
52 void set_loop(
bool enable);
53 bool get_loop()
const;
54 void set_loop_count(
int count);
55 int get_loop_count()
const;
56 void set_play_rate(
double play_rate);
57 double get_play_rate()
const;
58 bool is_playing()
const;
63 MAKE_PROPERTY(video_length, get_video_length);
64 MAKE_PROPERTY(video_width, get_video_width);
65 MAKE_PROPERTY(video_height, get_video_height);
67 MAKE_PROPERTY(time, get_time, set_time);
68 MAKE_PROPERTY(loop, get_loop, set_loop);
69 MAKE_PROPERTY(loop_count, get_loop_count, set_loop_count);
70 MAKE_PROPERTY(play_rate, get_play_rate, set_play_rate);
71 MAKE_PROPERTY(playing, is_playing);
76 static PT(
Texture) make_texture();
83 virtual PT(
Texture) make_copy_impl()
const;
84 void do_assign(CData *cdata, Texture::CData *cdata_tex,
const MovieTexture *copy,
85 const CData *cdata_copy,
const Texture::CData *cdata_copy_tex);
87 virtual void do_reload_ram_image(Texture::CData *cdata,
bool allow_compression);
89 virtual bool do_has_bam_rawdata(
const Texture::CData *cdata)
const;
90 virtual void do_get_bam_rawdata(Texture::CData *cdata);
91 virtual bool do_can_reload(
const Texture::CData *cdata)
const;
93 virtual bool do_adjust_this_size(
const Texture::CData *cdata,
94 int &x_size,
int &y_size,
const std::string &name,
95 bool for_padding)
const;
97 virtual bool do_read_one(Texture::CData *cdata,
99 int z,
int n,
int primary_file_num_channels,
int alpha_file_channel,
102 virtual bool do_load_one(Texture::CData *cdata,
103 const PNMImage &pnmimage,
const std::string &name,
105 virtual bool do_load_one(Texture::CData *cdata,
106 const PfmFile &pfm,
const std::string &name,
108 bool do_load_one(Texture::CData *cdata,
111 virtual void do_allocate_pages(Texture::CData *cdata);
125 class EXPCL_PANDA_GRUTIL CData :
public CycleData {
128 CData(
const CData ©);
131 return MovieTexture::get_class_type();
137 double _video_length;
149 int _true_loop_count;
156 void do_recalculate_image_properties(CData *cdata, Texture::CData *cdata_tex,
160 bool do_update_frames(
const CData *cdata)
const;
167 virtual void do_write_datagram_rawdata(Texture::CData *cdata,
BamWriter *manager,
Datagram &me);
176 static void init_type() {
177 Texture::init_type();
179 Texture::get_class_type());
182 return get_class_type();
184 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
An instance of this class is written to the front of a Bam or Txo file to make the file a cached inst...
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 ...
This collects together the pieces of data that are accumulated for each node while walking the scene ...
This object performs a depth-first traversal of the scene graph, with optional view-frustum culling,...
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...
A single page of data maintained by a PipelineCycler.
A class to retrieve the individual data elements previously stored in a Datagram.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
An instance of this class is passed to the Factory when requesting it to do its business and construc...
The name of a file, such as a texture file or an Egg file.
Specifies parameters that may be passed to the loader.
A MovieVideo is actually any source that provides a sequence of video frames.
A MovieVideo is actually any source that provides a sequence of video frames.
The name of this class derives from the fact that we originally implemented it as a layer on top of t...
Defines a pfm file, a 2-d table of floating-point numbers, either 3-component or 1-component,...
Represents a texture object, which is typically a single 2-d image but may also represent a 1-d or 3-...
virtual void ensure_loader_type(const Filename &filename)
May be called prior to calling read_txo() or any bam-related Texture- creating callback,...
get_keep_ram_image
Returns the flag that indicates whether this Texture is eligible to have its main RAM copy of the tex...
static void register_with_read_factory()
Factory method to generate a Texture object.
virtual void finalize(BamReader *manager)
Called by the BamReader to perform any final actions needed for setting up the object after all objec...
virtual bool has_cull_callback() const
Should be overridden by derived classes to return true if cull_callback() has been defined.
virtual bool cull_callback(CullTraverser *trav, const CullTraverserData &data) const
If has_cull_callback() returns true, this function will be called during the cull traversal to perfor...
TypeHandle is the identifier used to differentiate C++ class types.
Base class for objects that can be written to and read from Bam files.
virtual int complete_pointers(TypedWritable **p_list, BamReader *manager)
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
This is our own Panda specialization on the default STL list.
This is our own Panda specialization on the default STL vector.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
This class maintains different copies of a page of data between stages of the graphics pipeline (or a...