14 #ifndef OPENCVTEXTURE_H 15 #define OPENCVTEXTURE_H 31 OpenCVTexture(
const std::string &name = std::string());
32 OpenCVTexture(
const OpenCVTexture ©) =
delete;
33 virtual ~OpenCVTexture();
35 bool from_camera(
int camera_index = -1,
int z = 0,
36 int alpha_file_channel = 0,
40 static PT(
Texture) make_texture();
43 virtual void consider_update();
44 virtual PT(
Texture) make_copy_impl()
const;
45 void do_assign(Texture::CData *cdata_tex,
const OpenCVTexture *copy,
46 const Texture::CData *cdata_copy_tex);
48 virtual void do_update_frame(Texture::CData *cdata_tex,
int frame);
49 virtual void do_update_frame(Texture::CData *cdata_tex,
int frame,
int z);
51 virtual bool do_read_one(Texture::CData *cdata,
53 int z,
int n,
int primary_file_num_channels,
int alpha_file_channel,
56 virtual bool do_load_one(Texture::CData *cdata,
57 const PNMImage &pnmimage,
const std::string &name,
64 VideoPage &do_modify_page(
const Texture::CData *cdata,
int z);
65 bool do_reconsider_video_properties(Texture::CData *cdata,
66 const VideoStream &stream,
67 int num_components,
int z,
74 VideoStream(
const VideoStream ©);
78 bool from_camera(
int camera_index);
80 INLINE
bool is_valid()
const;
81 INLINE
bool is_from_file()
const;
82 bool get_frame_data(
int frame,
83 const unsigned char *&r,
84 const unsigned char *&g,
85 const unsigned char *&b,
86 int &x_pitch,
int &y_pitch);
97 INLINE VideoPage(
const VideoPage ©);
100 VideoStream _color, _alpha;
113 static void init_type() {
114 VideoTexture::init_type();
116 VideoTexture::get_class_type());
119 return get_class_type();
121 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
129 #endif // HAVE_OPENCV The name of this class derives from the fact that we originally implemented it as a layer on top of t...
Specifies parameters that may be passed to the loader.
static void register_with_read_factory()
Factory method to generate a Texture object.
Represents a texture object, which is typically a single 2-d image but may also represent a 1-d or 3-...
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
The base class for a family of animated Textures that take their input from a video source,...
This is our own Panda specialization on the default STL vector.
The name of a file, such as a texture file or an Egg file.
An instance of this class is written to the front of a Bam or Txo file to make the file a cached inst...
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.