#include <imageBuffer.h>
Inheritance diagram for ImageBuffer:
Public Member Functions | |
ImageBuffer () | |
virtual | ~ImageBuffer () |
virtual void | config (void) |
virtual void | copy (GraphicsStateGuardianBase *, const DisplayRegion *)=0 |
virtual void | copy (GraphicsStateGuardianBase *, const DisplayRegion *, const RenderBuffer &rb)=0 |
bool | has_filename () const |
Returns true if the filename has been set and is available. | |
const Filename & | get_filename () const |
Returns the filename that has been set. | |
bool | has_alpha_filename () const |
Returns true if the alpha_filename has been set and is available. | |
const Filename & | get_alpha_filename () const |
Returns the alpha_filename that has been set. | |
bool | has_fullpath () const |
Returns true if the fullpath has been set and is available. | |
const Filename & | get_fullpath () const |
Returns the fullpath that has been set. | |
bool | has_alpha_fullpath () const |
Returns true if the alpha_fullpath has been set and is available. | |
const Filename & | get_alpha_fullpath () const |
Returns the alpha_fullpath that has been set. | |
void | set_filename (const Filename &filename) |
Sets the name of the file that contains the image's contents. | |
void | clear_filename () |
Removes the alpha filename, if it was previously set. | |
void | set_alpha_filename (const Filename &alpha_filename) |
Sets the name of the file that contains the image's alpha channel contents. | |
void | clear_alpha_filename () |
Removes the alpha filename, if it was previously set. | |
void | set_fullpath (const Filename &fullpath) |
Sets the full pathname to the file that contains the image's contents, as found along the search path. | |
void | clear_fullpath () |
Removes the alpha fullpath, if it was previously set. | |
void | set_alpha_fullpath (const Filename &alpha_fullpath) |
Sets the full pathname to the file that contains the image's alpha channel contents, as found along the search path. | |
void | clear_alpha_fullpath () |
Removes the alpha fullpath, if it was previously set. | |
virtual void | write_datagram (BamWriter *manager, Datagram &me) |
Function to write the important information in the particular object to a Datagram. | |
virtual TypeHandle | get_type () const |
virtual TypeHandle | force_init_type () |
int | get_ref_count () const |
Returns the current reference count. | |
int | ref () const |
Explicitly increments the reference count. | |
int | unref () const |
Explicitly decrements the reference count. | |
void | test_ref_count_integrity () const |
Does some easy checks to make sure that the reference count isn't completely bogus. | |
void | check_config () const |
bool | is_dirty (void) const |
void | make_dirty (void) |
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(). | |
virtual void | finalize () |
Called by the BamReader to perform any final actions needed for setting up the object after all objects have been read and all pointers have been completed. | |
int | get_type_index () const |
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. | |
bool | is_of_type (TypeHandle handle) const |
Returns true if the current object is or derives from the indicated type. | |
bool | is_exact_type (TypeHandle handle) const |
Returns true if the current object is the indicated type exactly. | |
void | set_name (const string &name) |
void | clear_name () |
Resets the Namable's name to empty. | |
bool | has_name () const |
Returns true if the Namable has a nonempty name set, false if the name is empty. | |
const string & | get_name () const |
void | output (ostream &out) const |
Outputs the Namable. | |
Static Public Member Functions | |
TypeHandle | get_class_type () |
void | init_type () |
Static Public Attributes | |
TypedWritable *const | Null = (TypedWritable*)0L |
Protected Member Functions | |
void | fillin (DatagramIterator &scan, BamReader *manager) |
Function that reads out of the datagram (or asks manager to read) all of the data that is needed to re-create this object and stores it in the appropiate place. | |
Protected Attributes | |
int | _primary_file_num_channels |
int | _alpha_file_channel |
Private Attributes | |
Filename | _filename |
Filename | _alpha_filename |
Filename | _fullpath |
Filename | _alpha_fullpath |
Static Private Attributes | |
TypeHandle | _type_handle |
|
Definition at line 43 of file imageBuffer.cxx. |
|
Definition at line 57 of file imageBuffer.cxx. References BTM_fullpath, BTM_unchanged, get_alpha_filename(), get_alpha_fullpath(), get_filename(), and get_fullpath(). |
|
Definition at line 70 of file writableConfigurable.h. References PUBLISHED. Referenced by Geom::set_lengths(). |
|
Removes the alpha filename, if it was previously set. See set_alpha_filename(). Definition at line 247 of file imageBuffer.I. Referenced by Texture::~Texture(). |
|
Removes the alpha fullpath, if it was previously set. See set_alpha_fullpath(). Definition at line 317 of file imageBuffer.I. |
|
Removes the alpha filename, if it was previously set. See set_filename(). Definition at line 196 of file imageBuffer.I. |
|
Removes the alpha fullpath, if it was previously set. See set_fullpath(). Definition at line 281 of file imageBuffer.I. |
|
Resets the Namable's name to empty.
Definition at line 82 of file namable.I. References Namable::_name, and INLINE. |
|
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin(). Returns the number of pointers processed. This is the callback function that is made by the BamReader at some later point, after all of the required pointers have been filled in. It is necessary because there might be forward references in a bam file; when we call read_pointer() in fillin(), the object may not have been read from the file yet, so we do not have a pointer available at that time. Thus, instead of returning a pointer, read_pointer() simply reserves a later callback. This function provides that callback. The calling object is responsible for keeping track of the number of times it called read_pointer() and extracting the same number of pointers out of the supplied vector, and storing them appropriately within the object. Reimplemented in AnimBundleNode, AnimGroup, PartBundleNode, PartGroup, Character, CharacterJoint, CollisionNode, GeomSprite, PiecewiseCurve, ClipPlaneAttrib, FogAttrib, LensNode, LightAttrib, MaterialAttrib, RenderEffects, RenderState, TextureAttrib, Person, and Child. Definition at line 94 of file typedWritable.cxx. Referenced by RenderState::do_invert_compose(). |
|
Reimplemented from WritableConfigurable. Reimplemented in PixelBuffer. Definition at line 49 of file imageBuffer.h. References INLINE, and PUBLISHED. Referenced by PixelBuffer::operator=(). |
|
Implemented in PixelBuffer, and Texture. |
|
Implemented in PixelBuffer, and Texture. |
|
Function that reads out of the datagram (or asks manager to read) all of the data that is needed to re-create this object and stores it in the appropiate place.
Reimplemented from TypedWritable. Reimplemented in Texture. Definition at line 134 of file imageBuffer.cxx. |
|
Called by the BamReader to perform any final actions needed for setting up the object after all objects have been read and all pointers have been completed.
Reimplemented in PartBundle, RenderAttrib, RenderEffect, RenderEffects, RenderState, and TransformState. Definition at line 112 of file typedWritable.cxx. Referenced by BamReader::skip_pointer(). |
|
Reimplemented from WritableConfigurable. Reimplemented in PixelBuffer, and Texture. Definition at line 119 of file imageBuffer.h. |
|
Returns the alpha_filename that has been set. If this is set, it represents the name of the alpha component, which is stored in a separate file. See also get_filename(), and get_alpha_fullpath(). Definition at line 85 of file imageBuffer.I. References _fullpath, and INLINE. Referenced by EggGroupNode::remove_child(), and ~ImageBuffer(). |
|
Returns the alpha_fullpath that has been set. This is the full path to the alpha part of the image file as it was found along the texture search path. Definition at line 151 of file imageBuffer.I. References _alpha_filename, and INLINE. Referenced by Texture::unprepare(), and ~ImageBuffer(). |
|
Reimplemented from Namable. Reimplemented in PixelBuffer, and Texture. Definition at line 104 of file imageBuffer.h. Referenced by PixelBuffer::get_class_type(). |
|
Returns the filename that has been set. This is the name of the file as it was requested. Also see get_fullpath(). Definition at line 51 of file imageBuffer.I. References _alpha_filename. Referenced by TexturePool::ns_add_texture(), PixelBuffer::read(), EggGroupNode::remove_child(), and ~ImageBuffer(). |
|
Returns the fullpath that has been set. This is the full path to the file as it was found along the texture search path. Definition at line 117 of file imageBuffer.I. References _filename, and INLINE. Referenced by Texture::unprepare(), and ~ImageBuffer(). |
|
|
Returns the current reference count.
Definition at line 183 of file referenceCount.I. Referenced by RenderState::determine_bin_index(), RenderEffects::determine_show_bounds(), FontPool::ns_garbage_collect(), TexturePool::ns_garbage_collect(), MaterialPool::ns_get_material(), and TexturePool::ns_release_texture(). |
|
Reimplemented from WritableConfigurable. Reimplemented in PixelBuffer, and Texture. Definition at line 116 of file imageBuffer.h. |
|
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. This is equivalent to get_type().get_index(). Definition at line 71 of file typedObject.I. References TypeHandle::get_name(), TypedObject::get_type(), and INLINE. |
|
Returns true if the alpha_filename has been set and is available. See set_alpha_filename(). Definition at line 66 of file imageBuffer.I. References _fullpath, Filename::empty(), and INLINE. Referenced by EggGroupNode::remove_child(). |
|
Returns true if the alpha_fullpath has been set and is available. See set_alpha_fullpath(). Definition at line 132 of file imageBuffer.I. References _filename, and INLINE. Referenced by Texture::unprepare(). |
|
Returns true if the filename has been set and is available. See set_filename(). Definition at line 34 of file imageBuffer.I. References _filename, and INLINE. Referenced by Texture::read(), and Texture::unprepare(). |
|
Returns true if the fullpath has been set and is available. See set_fullpath(). Definition at line 100 of file imageBuffer.I. References _alpha_fullpath, and INLINE. |
|
Returns true if the Namable has a nonempty name set, false if the name is empty.
Definition at line 97 of file namable.I. References Namable::get_name(), and INLINE. Referenced by EggGroupUniquifier::EggGroupUniquifier(), Texture::read(), and Texture::Texture(). |
|
Reimplemented from Namable. Reimplemented in PixelBuffer, and Texture. Definition at line 107 of file imageBuffer.h. Referenced by PixelBuffer::get_class_type(). |
|
Definition at line 82 of file writableConfigurable.h. Referenced by Geom::get_texcoords(), and dDrawable::~dDrawable(). |
|
Returns true if the current object is the indicated type exactly.
Definition at line 101 of file typedObject.I. Referenced by PT(), and CollisionNode::xform(). |
|
|
Definition at line 83 of file writableConfigurable.h. Referenced by GeomSphere::draw_immediate(), Geom::get_coords_index(), GeomTri::get_tris(), PixelBuffer::set_size(), PixelBuffer::set_xorg(), PixelBuffer::set_ysize(), PixelBuffer::stencil_buffer(), Geom::transform_vertices(), and GeomLine::write_datagram(). |
|
Outputs the Namable. This function simply writes the name to the output stream; most Namable derivatives will probably redefine this. Reimplemented in BuilderBucket, AnimBundle, AnimChannelBase, AnimChannelFixed< SwitchType >, AnimGroup, PartBundle, CollisionNode, ButtonNode, HermiteCurve, RopeNode, Fog, GeomNode, LensNode, LightLensNode, LightNode, LODNode, PandaNode, PlaneNode, MouseWatcher, and MouseWatcherRegion. |
|
Explicitly increments the reference count. User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it. The return value is the new reference count. Definition at line 225 of file referenceCount.I. Referenced by ClientDevice::ClientDevice(), EggGroupNode::find_textures(), EggGroupNode::r_apply_texmats(), EggGroupNode::r_flatten_transforms(), and EggGroupNode::reverse_vertex_ordering(). |
|
Sets the name of the file that contains the image's alpha channel contents. Normally, this is set automatically when the image is loaded, for instance via Texture::read(). The ImageBuffer's get_filename() function returns the name of the image file that was loaded into the buffer. In the case where a texture specified two separate files to load, a 1- or 3-channel color image and a 1-channel alpha image, this Filename is update to contain the name of the image file that was loaded into the buffer's alpha channel. Definition at line 232 of file imageBuffer.I. Referenced by Texture::read(), and EggGroupNode::remove_child(). |
|
Sets the full pathname to the file that contains the image's alpha channel contents, as found along the search path. Normally, this is set automatically when the image is loaded, for instance via Texture::read(). Definition at line 302 of file imageBuffer.I. Referenced by Texture::read(). |
|
Sets the name of the file that contains the image's contents. Normally, this is set automatically when the image is loaded, for instance via Texture::read(). The ImageBuffer's get_name() function used to return the filename, but now returns just the basename (without the extension), which is a more useful name for identifying an image in show code. Definition at line 181 of file imageBuffer.I. References _fullpath, and INLINE. Referenced by Texture::read(), EggGroupNode::remove_child(), and Texture::~Texture(). |
|
Sets the full pathname to the file that contains the image's contents, as found along the search path. Normally, this is set automatically when the image is loaded, for instance via Texture::read(). Definition at line 266 of file imageBuffer.I. Referenced by Texture::read(). |
|
Definition at line 69 of file namable.I. References Namable::_name. Referenced by BuilderBucket::BuilderBucket(), SceneGraphReducer::do_flatten_siblings(), Texture::read(), PandaNode::reparent(), and Texture::Texture(). |
|
Does some easy checks to make sure that the reference count isn't completely bogus.
Definition at line 328 of file referenceCount.I. References INLINE. Referenced by EggNode::determine_bin(), and ReferenceCount::~ReferenceCount(). |
|
Explicitly decrements the reference count. Note that the object will not be implicitly deleted by unref() simply because the reference count drops to zero. (Having a member function delete itself is problematic; plus, we don't have a virtual destructor anyway.) However, see the helper function unref_delete(). User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it. The return value is the new reference count. Definition at line 293 of file referenceCount.I. References INLINE. Referenced by RenderState::determine_bin_index(), and RenderEffects::determine_show_bounds(). |
|
Function to write the important information in the particular object to a Datagram.
Implements WritableConfigurable. Reimplemented in Texture. Definition at line 71 of file imageBuffer.cxx. References BTM_relative. |
|
Definition at line 93 of file imageBuffer.h. |
|
Definition at line 79 of file imageBuffer.h. Referenced by get_alpha_fullpath(), and get_filename(). |
|
Definition at line 81 of file imageBuffer.h. Referenced by has_fullpath(). |
|
Definition at line 78 of file imageBuffer.h. Referenced by get_fullpath(), has_alpha_fullpath(), and has_filename(). |
|
Definition at line 80 of file imageBuffer.h. Referenced by clear_filename(), get_alpha_filename(), has_alpha_filename(), and set_filename(). |
|
Definition at line 87 of file imageBuffer.h. |
|
Reimplemented from Namable. Reimplemented in PixelBuffer, and Texture. Definition at line 32 of file imageBuffer.cxx. |
|
Definition at line 25 of file typedWritable.cxx. Referenced by Child::complete_pointers(), Parent::complete_pointers(), Person::complete_pointers(), LoaderFileTypeBam::get_extension(), PartGroup::pick_channel_index(), BamReader::read_pointer(), and AnimGroup::write_datagram(). |