Panda3D
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends

FltTexture Class Reference

Represents a single texture in the texture palette. More...

#include "fltTexture.h"

Inheritance diagram for FltTexture:
FltRecord TypedReferenceCount TypedObject ReferenceCount MemoryBase MemoryBase

List of all members.

Classes

struct  GeospecificControlPoint
struct  LODScale
struct  SubtextureDef

Public Types

enum  EarthModel {
  EM_wgs84 = 0, EM_wgs72 = 1, EM_bessel = 2, EM_clarke_1866 = 3,
  EM_nad27 = 4
}
enum  EnvironmentType { ET_modulate = 0, ET_blend = 1, ET_decal = 2, ET_color = 3 }
enum  ExternalFormat { EF_default = 0, EF_pack_8 = 1, EF_pack_16 = 2 }
enum  FileFormat {
  FF_none = -1, FF_att_8_pattern = 0, FF_att_8_template = 1, FF_sgi_i = 2,
  FF_sgi_ia = 3, FF_sgi_rgb = 4, FF_sgi_rgba = 5
}
typedef pvector
< GeospecificControlPoint
GeospecificControlPoints
enum  Hemisphere { H_southern = 0, H_northern = 1 }
enum  ImageOrigin { IO_lower_left = 0, IO_upper_left = 1 }
enum  InternalFormat {
  IF_default = 0, IF_i_12a_4 = 1, IF_ia_8 = 2, IF_rgb_5 = 3,
  IF_rgba_4 = 4, IF_ia_12 = 5, IF_rgba_8 = 6, IF_rgba_12 = 7,
  IF_i_16 = 8, IF_rgb_12 = 9
}
enum  Magnification {
  MG_point = 0, MG_bilinear = 1, MG_bicubic = 3, MG_sharpen = 4,
  MG_add_detail = 5, MG_modulate_detail = 6, MG_bilinear_gequal = 7, MG_bilinear_lequal = 8,
  MG_bicubic_gequal = 9, MG_bicubic_lequal = 10
}
enum  Minification {
  MN_point = 0, MN_bilinear = 1, MN_OB_mipmap = 2, MN_mipmap_point = 3,
  MN_mipmap_linear = 4, MN_mipmap_bilinear = 5, MN_mipmap_trilinear = 6, MN_bicubic = 8,
  MN_bilinear_gequal = 9, MN_bilinear_lequal = 10, MN_bicubic_gequal = 11, MN_bicubic_lequal = 12
}
enum  PointsUnits { PU_degrees = 0, PU_meters = 1, PU_pixels = 2 }
enum  ProjectionType { PT_flat_earth = 0, PT_lambert = 3, PT_utm = 4, PT_undefined = 7 }
enum  RepeatType { RT_repeat = 0, RT_clamp = 1 }
typedef pvector< SubtextureDefSubtextureDefs

Public Member Functions

 FltTexture (FltHeader *header)
void add_ancillary (FltRecord *ancillary)
 Adds a new unsupported ancillary record to the end of the list of ancillary records for this record.
void add_child (FltRecord *child)
 Adds a new child to the end of the list of children for this record.
void add_extension (FltRecord *extension)
 Adds a new extension to the end of the list of extensions for this record.
void add_subface (FltRecord *subface)
 Adds a new subface to the end of the list of subfaces for this record.
virtual void apply_converted_filenames ()
 Walks the hierarchy at this record and below and copies the _converted_filename record into the _orig_filename record, so the flt file will be written out with the converted filename instead of what was originally read in.
TypedObjectas_typed_object ()
 Returns the object, upcast (if necessary) to a TypedObject pointer.
const TypedObjectas_typed_object () const
 Returns the object, upcast (if necessary) to a TypedObject pointer.
void check_remaining_size (const DatagramIterator &di, const string &name=string()) const
 Checks that the iterator has no bytes left, as it should at the end of a successfully read record.
void clear_ancillary ()
 Removes all unsupported ancillary records from this record.
void clear_children ()
 Removes all children from this record.
void clear_comment ()
 Removes the comment for this record.
void clear_extensions ()
 Removes all extensions from this record.
void clear_subfaces ()
 Removes all subfaces from this record.
virtual TypeHandle force_init_type ()
FltRecordget_ancillary (int n) const
 Returns the nth unsupported ancillary record of this record.
Filename get_attr_filename () const
 Returns the name of the texture's associated .attr file.
int get_best_parent_from_Set (const std::set< int > &) const
FltRecordget_child (int n) const
 Returns the nth child of this record.
const string & get_comment () const
 Retrieves the comment for this record, or empty string if the record has no comment.
FltRecordget_extension (int n) const
 Returns the nth extension of this record.
int get_num_ancillary () const
 Returns the number of unsupported ancillary records of this record.
int get_num_children () const
 Returns the number of child records of this record.
int get_num_extensions () const
 Returns the number of extension attribute records for this object.
int get_num_subfaces () const
 Returns the number of subface records of this record.
int get_ref_count () const
 Returns the current reference count.
FltRecordget_subface (int n) const
 Returns the nth subface of this record.
Filename get_texture_filename () const
 Returns the name of the texture image file.
virtual TypeHandle get_type () const
int get_type_index () const
 Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.
WeakReferenceListget_weak_list () const
 Returns the WeakReferenceList associated with this ReferenceCount object.
bool has_comment () const
 Returns true if this record has a nonempty comment, false otherwise.
bool has_weak_list () const
 Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise.
bool is_exact_type (TypeHandle handle) const
 Returns true if the current object is the indicated type exactly.
bool is_of_type (TypeHandle handle) const
 Returns true if the current object is or derives from the indicated type.
void local_object ()
 This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack.
void operator delete (void *ptr)
void operator delete (void *ptr, void *)
void operator delete (void *ptr)
void operator delete (void *ptr, void *)
void operator delete[] (void *ptr)
void operator delete[] (void *, void *)
void operator delete[] (void *, void *)
void operator delete[] (void *ptr)
void * operator new (size_t size, void *ptr)
void * operator new (size_t size)
void * operator new (size_t size)
void * operator new (size_t size, void *ptr)
void * operator new[] (size_t size)
void * operator new[] (size_t size, void *ptr)
void * operator new[] (size_t size, void *ptr)
void * operator new[] (size_t size)
virtual void output (ostream &out) const
 Writes a quick one-line description of the record, but not its children.
FltError read_attr_data ()
 Opens up the texture's .attr file and reads its data into the extra FltTexture fields.
void ref () const
 Explicitly increments the reference count.
void set_comment (const string &comment)
 Changes the comment for this record.
void set_texture_filename (const Filename &filename)
 Changes the name of the texture image file.
bool test_ref_count_integrity () const
 Does some easy checks to make sure that the reference count isn't completely bogus.
bool test_ref_count_nonzero () const
 Does some easy checks to make sure that the reference count isn't zero, or completely bogus.
virtual bool unref () const
 Explicitly decrements the reference count.
void weak_ref (WeakPointerToVoid *ptv)
 Adds the indicated PointerToVoid as a weak reference to this object.
void weak_unref (WeakPointerToVoid *ptv)
 Removes the indicated PointerToVoid as a weak reference to this object.
virtual void write (ostream &out, int indent_level=0) const
 Writes a multiple-line description of the record and all of its children.
FltError write_attr_data (Filename attr_filename) const
 Writes the texture's .attr file to the named file.
FltError write_attr_data () const
 Writes the texture's .attr file.

Static Public Member Functions

static TypeHandle get_class_type ()
static void init_type ()
 This function is declared non-inline to work around a compiler bug in g++ 2.96.

Public Attributes

float _clamp
string _comment
Filename _converted_filename
int _detail_j
int _detail_k
int _detail_m
int _detail_n
int _detail_scramble
EarthModel _earth_model
EnvironmentType _env_type
ExternalFormat _external_format
FileFormat _file_format
int _file_version
double _float_real_world_size_u
double _float_real_world_size_v
GeospecificControlPoints _geospecific_control_points
Hemisphere _geospecific_hemisphere
PointsUnits _geospecific_points_units
ImageOrigin _image_origin
int _imported_origin_code
bool _intensity_is_alpha
InternalFormat _internal_format
int _kernel_version
double _lambert_conic_central_meridian
double _lambert_conic_lower_latitude
double _lambert_conic_upper_latitude
LODScale _lod_scale [8]
Magnification _mag_filter
Magnification _mag_filter_alpha
Magnification _mag_filter_color
Minification _min_filter
float _mipmap_kernel [8]
int _modify_flag
int _num_texels_u
int _num_texels_v
string _orig_filename
int _pattern_index
ProjectionType _projection
int _real_world_size_u
int _real_world_size_v
RepeatType _repeat
RepeatType _repeat_u
RepeatType _repeat_v
SubtextureDefs _subtexture_defs
float _tile_lower_left_u
float _tile_lower_left_v
float _tile_upper_right_u
float _tile_upper_right_v
int _up_vector_x
int _up_vector_y
bool _use_detail
bool _use_lod_scale
bool _use_mipmap_kernel
bool _use_tile
int _utm_zone
int _x_location
int _x_pivot_point
int _y_location
int _y_pivot_point

Protected Member Functions

virtual bool build_record (FltRecordWriter &writer) const
 Fills up the current record on the FltRecordWriter with data for this record, but does not advance the writer.
FltRecordcreate_new_record (FltOpcode opcode) const
 Creates a new FltRecord corresponding to the opcode.
bool do_test_ref_count_integrity () const
 Does some easy checks to make sure that the reference count isn't completely bogus.
bool do_test_ref_count_nonzero () const
 Returns true if the reference count is nonzero, false otherwise.
virtual bool extract_ancillary (FltRecordReader &reader)
 Checks whether the given record, which follows this record sequentially in the file, is an ancillary record of this record.
virtual bool extract_record (FltRecordReader &reader)
 Fills in the information in this record based on the information given in the indicated datagram, whose opcode has already been read.
FltError read_record_and_children (FltRecordReader &reader)
 Extracts this record information from the current record presented in the reader, then advances the reader and continues to read any children, if present.
virtual FltError write_ancillary (FltRecordWriter &writer) const
 Writes whatever ancillary records are required for this record.
void write_children (ostream &out, int indent_level) const
 Assuming the current write position has been left at the end of the last line of the record description, writes out the list of children.
virtual FltError write_record_and_children (FltRecordWriter &writer) const
 Writes this record out to the flt file, along with all of its ancillary records and children records.

Static Protected Member Functions

static bool is_ancillary (FltOpcode opcode)
 Returns true if the indicated opcode corresponds to an ancillary record type, false otherwise.

Protected Attributes

FltHeader_header

Friends

class FltHeader

Detailed Description

Represents a single texture in the texture palette.

Definition at line 29 of file fltTexture.h.


Member Function Documentation

void FltRecord::add_ancillary ( FltRecord ancillary) [inherited]

Adds a new unsupported ancillary record to the end of the list of ancillary records for this record.

This record will be written to the flt file following this record, without attempting to understand what is in it.

Normally, there is no reason to use this function; if the data stored in the FltRecord requires one or more ancillary record, the appropriate records will automatically be generated when the record is written. This function is only required to output a record whose type is not supported by the flt loader. But it would be better to extend the flt loader to know about this new kind of data record.

Definition at line 253 of file fltRecord.cxx.

void FltRecord::add_child ( FltRecord child) [inherited]

Adds a new child to the end of the list of children for this record.

Definition at line 102 of file fltRecord.cxx.

Referenced by FltRecord::read_record_and_children().

void FltRecord::add_extension ( FltRecord extension) [inherited]

Adds a new extension to the end of the list of extensions for this record.

This should be a record of type FO_extension.

Definition at line 193 of file fltRecord.cxx.

Referenced by FltRecord::read_record_and_children().

void FltRecord::add_subface ( FltRecord subface) [inherited]

Adds a new subface to the end of the list of subfaces for this record.

Definition at line 147 of file fltRecord.cxx.

Referenced by FltRecord::read_record_and_children().

void FltTexture::apply_converted_filenames ( ) [virtual]

Walks the hierarchy at this record and below and copies the _converted_filename record into the _orig_filename record, so the flt file will be written out with the converted filename instead of what was originally read in.

Reimplemented from FltRecord.

Definition at line 98 of file fltTexture.cxx.

Referenced by FltHeader::apply_converted_filenames().

TypedObject * TypedObject::as_typed_object ( ) [inline, inherited]

Returns the object, upcast (if necessary) to a TypedObject pointer.

Definition at line 99 of file typedObject.I.

const TypedObject * TypedObject::as_typed_object ( ) const [inline, inherited]

Returns the object, upcast (if necessary) to a TypedObject pointer.

Definition at line 110 of file typedObject.I.

bool FltTexture::build_record ( FltRecordWriter writer) const [protected, virtual]

Fills up the current record on the FltRecordWriter with data for this record, but does not advance the writer.

Returns true on success, false if there is some error.

Reimplemented from FltRecord.

Definition at line 267 of file fltTexture.cxx.

References Datagram::add_be_int32(), Datagram::add_fixed_string(), FltRecord::build_record(), get_attr_filename(), FltHeader::get_auto_attr_update(), FltRecordWriter::set_opcode(), FltRecordWriter::update_datagram(), and write_attr_data().

void FltRecord::check_remaining_size ( const DatagramIterator di,
const string &  name = string() 
) const [inherited]
void FltRecord::clear_ancillary ( ) [inherited]

Removes all unsupported ancillary records from this record.

See get_num_ancillary().

Definition at line 231 of file fltRecord.cxx.

void FltRecord::clear_children ( ) [inherited]

Removes all children from this record.

Definition at line 91 of file fltRecord.cxx.

void FltRecord::clear_comment ( ) [inherited]

Removes the comment for this record.

Definition at line 285 of file fltRecord.cxx.

void FltRecord::clear_extensions ( ) [inherited]

Removes all extensions from this record.

Definition at line 181 of file fltRecord.cxx.

void FltRecord::clear_subfaces ( ) [inherited]

Removes all subfaces from this record.

Definition at line 136 of file fltRecord.cxx.

FltRecord * FltRecord::create_new_record ( FltOpcode  opcode) const [protected, inherited]

Creates a new FltRecord corresponding to the opcode.

If the opcode is unknown, creates a FltUnsupportedRecord.

Definition at line 521 of file fltRecord.cxx.

Referenced by FltRecord::read_record_and_children().

bool ReferenceCount::do_test_ref_count_integrity ( ) const [protected, inherited]

Does some easy checks to make sure that the reference count isn't completely bogus.

Returns true if ok, false otherwise.

Reimplemented in NodeReferenceCount, CachedTypedWritableReferenceCount, and NodeCachedReferenceCount.

Definition at line 29 of file referenceCount.cxx.

Referenced by ReferenceCount::do_test_ref_count_nonzero(), and ReferenceCount::test_ref_count_integrity().

bool ReferenceCount::do_test_ref_count_nonzero ( ) const [protected, inherited]

Returns true if the reference count is nonzero, false otherwise.

Definition at line 56 of file referenceCount.cxx.

References ReferenceCount::do_test_ref_count_integrity().

Referenced by ReferenceCount::test_ref_count_nonzero().

bool FltRecord::extract_ancillary ( FltRecordReader reader) [protected, virtual, inherited]

Checks whether the given record, which follows this record sequentially in the file, is an ancillary record of this record.

If it is, extracts the relevant information and returns true; otherwise, leaves it alone and returns false.

Reimplemented in FltBead, FltBeadID, FltHeader, and FltMesh.

Definition at line 709 of file fltRecord.cxx.

References FltRecordReader::get_iterator(), FltRecordReader::get_opcode(), and DatagramIterator::get_remaining_bytes().

Referenced by FltRecord::read_record_and_children().

bool FltTexture::extract_record ( FltRecordReader reader) [protected, virtual]

Fills in the information in this record based on the information given in the indicated datagram, whose opcode has already been read.

Returns true on success, false if the datagram is invalid.

Reimplemented from FltRecord.

Definition at line 232 of file fltTexture.cxx.

References FltRecord::check_remaining_size(), FltHeader::convert_path(), FltRecord::extract_record(), Filename::from_os_specific(), get_attr_filename(), FltHeader::get_flt_version(), FltRecordReader::get_iterator(), FltRecordReader::get_opcode(), and read_attr_data().

FltRecord * FltRecord::get_ancillary ( int  n) const [inherited]

Returns the nth unsupported ancillary record of this record.

See get_num_ancillary().

Definition at line 219 of file fltRecord.cxx.

Filename FltTexture::get_attr_filename ( ) const

Returns the name of the texture's associated .attr file.

This contains some additional MultiGen information about the texture parameters. This is, of course, just the name of the texture with .attr appended.

Normally, it won't be necessary to access this file directly; you can call read_attr_data() or write_attr_data() to get at the data stored in this file. (And read_attr_data() is called automatically when the Flt file is read in.)

Definition at line 140 of file fltTexture.cxx.

References get_texture_filename().

Referenced by build_record(), extract_record(), read_attr_data(), and write_attr_data().

FltRecord * FltRecord::get_child ( int  n) const [inherited]

Returns the nth child of this record.

Definition at line 80 of file fltRecord.cxx.

const string & FltRecord::get_comment ( ) const [inherited]

Retrieves the comment for this record, or empty string if the record has no comment.

Definition at line 275 of file fltRecord.cxx.

FltRecord * FltRecord::get_extension ( int  n) const [inherited]

Returns the nth extension of this record.

Definition at line 170 of file fltRecord.cxx.

int FltRecord::get_num_ancillary ( ) const [inherited]

Returns the number of unsupported ancillary records of this record.

These are ancillary records that appeared following this record in the flt file but that aren't directly understood by the flt loader--normally, an ancillary record is examined and decoded on the spot, and no pointer to it is kept.

Definition at line 208 of file fltRecord.cxx.

int FltRecord::get_num_children ( ) const [inherited]

Returns the number of child records of this record.

This reflects the normal scene graph hierarchy.

Definition at line 70 of file fltRecord.cxx.

int FltRecord::get_num_extensions ( ) const [inherited]

Returns the number of extension attribute records for this object.

These are auxiliary nodes, presumably of type FO_extension, that have some local meaning to the object.

Definition at line 160 of file fltRecord.cxx.

int FltRecord::get_num_subfaces ( ) const [inherited]

Returns the number of subface records of this record.

Normally, subfaces will only be present on object records, although it is logically possible for them to appear anywhere.

Definition at line 115 of file fltRecord.cxx.

int ReferenceCount::get_ref_count ( ) const [inline, inherited]
FltRecord * FltRecord::get_subface ( int  n) const [inherited]

Returns the nth subface of this record.

Definition at line 125 of file fltRecord.cxx.

Filename FltTexture::get_texture_filename ( ) const

Returns the name of the texture image file.

Definition at line 109 of file fltTexture.cxx.

Referenced by get_attr_filename().

int TypedObject::get_type_index ( ) const [inline, inherited]

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 52 of file typedObject.I.

References TypeHandle::get_index().

WeakReferenceList * ReferenceCount::get_weak_list ( ) const [inline, inherited]

Returns the WeakReferenceList associated with this ReferenceCount object.

If there has never been a WeakReferenceList associated with this object, creates one now.

Definition at line 307 of file referenceCount.I.

Referenced by ReferenceCount::weak_ref().

bool FltRecord::has_comment ( ) const [inherited]

Returns true if this record has a nonempty comment, false otherwise.

Definition at line 264 of file fltRecord.cxx.

bool ReferenceCount::has_weak_list ( ) const [inline, inherited]

Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise.

In general, this will be true if there was ever a WeakPointerTo created for this object (even if there is not any for it now).

Definition at line 294 of file referenceCount.I.

Referenced by ReferenceCount::weak_unref().

static void FltTexture::init_type ( ) [inline, static]

This function is declared non-inline to work around a compiler bug in g++ 2.96.

Making it inline seems to cause problems in the optimizer.

Reimplemented from FltRecord.

Definition at line 242 of file fltTexture.h.

bool FltRecord::is_ancillary ( FltOpcode  opcode) [static, protected, inherited]

Returns true if the indicated opcode corresponds to an ancillary record type, false otherwise.

In general, this function is used to identify ancillary records that are not presently supported by the FltReader; these will be ignored. Normally, ancillary records will be detected and processed by extract_ancillary().

Definition at line 429 of file fltRecord.cxx.

Referenced by FltRecord::read_record_and_children().

bool TypedObject::is_exact_type ( TypeHandle  handle) const [inline, inherited]
bool TypedObject::is_of_type ( TypeHandle  handle) const [inline, inherited]

Returns true if the current object is or derives from the indicated type.

Definition at line 63 of file typedObject.I.

References TypeHandle::is_derived_from().

Referenced by EggSliderData::add_back_pointer(), EggJointData::add_back_pointer(), CIntervalManager::add_c_interval(), XFileNode::add_child(), CollisionTraverser::add_collider(), CollisionHandlerPhysical::add_collider(), EggXfmSAnim::add_data(), CharacterJointBundle::add_node(), NonlinearImager::add_screen(), EggGroupNode::apply_first_attribute(), EggGroupNode::apply_last_attribute(), DeferredNodeProperty::apply_to_node(), RecorderController::begin_playback(), NodePath::clear_clip_plane(), EggGroupNode::clear_connected_shading(), NodePath::clear_light(), EggBase::convert_paths(), NodePath::decode_from_bam_stream(), VrpnClient::disconnect_device(), PhysicsManager::do_physics(), GraphicsStateGuardian::fetch_specified_part(), EggRenderState::fill_state(), AnimBundleNode::find_anim_bundle(), EggGroupNode::find_coordsys_entry(), XFile::find_data_object(), Character::find_joint(), EggGroupNode::find_materials(), Character::find_slider(), XFile::find_template(), EggGroupNode::find_textures(), EggMaterialCollection::find_used_materials(), EggTextureCollection::find_used_textures(), EggGroupNode::force_filenames(), EggJointData::force_initial_rest_frame(), WindowFramework::get_aspect_2d(), EggPoolUniquifier::get_category(), EggGroupUniquifier::get_category(), EggGroupNode::get_connected_shading(), PandaFramework::get_mouse(), FactoryParams::get_param_of_type(), EggGroupNode::has_absolute_pathnames(), NodePath::has_clip_plane(), NodePath::has_clip_plane_off(), NodePath::has_light(), PandaFramework::hide_collision_solids(), x11GraphicsWindow::open_window(), eglGraphicsWindow::open_window(), EggNode::parse_egg(), CharacterMaker::part_to_node(), EggGroupNode::post_apply_flat_attribute(), EggBinner::prepare_node(), PortalClipper::prepare_portal(), NodePath::project_texture(), EggMatrixTablePointer::quantize_channels(), ParametricCurveCollection::r_add_curves(), SceneGraphReducer::r_collect_vertex_data(), EggGroupNode::r_load_externals(), EggGroupNode::rebuild_vertex_pools(), EggGroupNode::recompute_polygon_normals(), EggGroupNode::remove_invalid_primitives(), EggGroupNode::remove_unused_vertices(), EggLoader::reparent_decals(), EggMaterialCollection::replace_materials(), EggTextureCollection::replace_textures(), EggGroupNode::resolve_filenames(), EggGroupNode::reverse_vertex_ordering(), NodePath::set_clip_plane(), NodePath::set_clip_plane_off(), NodePath::set_light(), ProjectionScreen::set_projector(), NonlinearImager::set_source_camera(), EggXfmSAnim::set_value(), NonlinearImager::set_viewer_camera(), PandaFramework::show_collision_solids(), BamCache::store(), XFileToEggConverter::strip_nodes(), EggGroupNode::strip_normals(), DataGraphTraverser::traverse(), DataGraphTraverser::traverse_below(), EggGroupNode::triangulate_polygons(), EggGroupNode::unify_attributes(), EggNameUniquifier::uniquify(), NodeCullCallbackData::upcall(), PhysicsCollisionHandler::validate_target(), EggXfmSAnim::write(), EggGroup::write(), EggToDXFLayer::write_3d_face(), and EggToDXFLayer::write_entities().

void ReferenceCount::local_object ( ) [inline, inherited]

This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack.

This allows the object to be passed to functions that will increment and decrement the object's reference count temporarily, and it will prevent the object from being deleted (inappropriately), when the reference count returns to zero. It actually achieves this by setting a large positive value in the reference count field.

Definition at line 276 of file referenceCount.I.

Referenced by PGTop::cull_callback(), BoundingSphere::extend_by_hexahedron(), AsyncTaskManager::find_task(), AsyncTaskManager::find_tasks(), and AsyncTaskManager::find_tasks_matching().

void FltRecord::output ( ostream &  out) const [virtual, inherited]

Writes a quick one-line description of the record, but not its children.

This is a human-readable description, primarily for debugging; to write a flt file, use FltHeader::write_flt().

Reimplemented in FltBeadID, FltExternalReference, FltUnsupportedRecord, and FltVertexList.

Definition at line 359 of file fltRecord.cxx.

FltError FltTexture::read_attr_data ( )

Opens up the texture's .attr file and reads its data into the extra FltTexture fields.

This is normally performed automatically when the Flt file is read from disk.

Definition at line 154 of file fltTexture.cxx.

References get_attr_filename(), and Filename::open_read().

Referenced by extract_record().

FltError FltRecord::read_record_and_children ( FltRecordReader reader) [protected, inherited]

Extracts this record information from the current record presented in the reader, then advances the reader and continues to read any children, if present.

On return, the reader is position on the next sibling record to this record.

Returns FE_ok if successful, otherwise on error.

Definition at line 580 of file fltRecord.cxx.

References FltRecord::add_child(), FltRecord::add_extension(), FltHeader::add_instance(), FltRecord::add_subface(), FltRecordReader::advance(), FltRecord::create_new_record(), FltRecordReader::eof(), FltRecordReader::error(), FltRecord::extract_ancillary(), FltRecord::extract_record(), FltRecordReader::get_opcode(), FltRecord::is_ancillary(), and FltRecord::read_record_and_children().

Referenced by FltHeader::read_flt(), and FltRecord::read_record_and_children().

void ReferenceCount::ref ( ) const [inline, inherited]

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.

Definition at line 179 of file referenceCount.I.

References ReferenceCount::test_ref_count_integrity().

Referenced by CachedTypedWritableReferenceCount::cache_ref(), TypedWritable::decode_raw_from_bam_stream(), NodeCachedReferenceCount::node_ref(), NodeReferenceCount::node_ref(), BamCacheRecord::set_data(), CullableObject::set_draw_callback(), and ModelRoot::set_reference().

void FltRecord::set_comment ( const string &  comment) [inherited]

Changes the comment for this record.

Definition at line 295 of file fltRecord.cxx.

void FltTexture::set_texture_filename ( const Filename filename)

Changes the name of the texture image file.

Definition at line 119 of file fltTexture.cxx.

bool ReferenceCount::test_ref_count_integrity ( ) const [inline, inherited]
bool ReferenceCount::test_ref_count_nonzero ( ) const [inline, inherited]

Does some easy checks to make sure that the reference count isn't zero, or completely bogus.

Returns true if ok, false otherwise.

Definition at line 252 of file referenceCount.I.

References ReferenceCount::do_test_ref_count_nonzero().

Referenced by CopyOnWritePointer::test_ref_count_nonzero().

bool ReferenceCount::unref ( ) const [inline, virtual, inherited]

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.) 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 true if the new reference count is nonzero, false if it is zero.

Reimplemented in GeomVertexArrayFormat, GeomVertexFormat, InternalName, RenderAttrib, RenderEffects, RenderState, and TransformState.

Definition at line 214 of file referenceCount.I.

References ReferenceCount::test_ref_count_integrity().

Referenced by CachedTypedWritableReferenceCount::cache_unref(), TypedWritable::decode_raw_from_bam_stream(), RenderEffect::finalize(), NodeCachedReferenceCount::node_unref(), NodeReferenceCount::node_unref(), TransformState::unref(), RenderState::unref(), RenderEffects::unref(), RenderAttrib::unref(), InternalName::unref(), GeomVertexFormat::unref(), and GeomVertexArrayFormat::unref().

void ReferenceCount::weak_ref ( WeakPointerToVoid ptv) [inline, inherited]

Adds the indicated PointerToVoid as a weak reference to this object.

Definition at line 321 of file referenceCount.I.

References WeakReferenceList::add_reference(), and ReferenceCount::get_weak_list().

void ReferenceCount::weak_unref ( WeakPointerToVoid ptv) [inline, inherited]

Removes the indicated PointerToVoid as a weak reference to this object.

It must have previously been added via a call to weak_ref().

Definition at line 334 of file referenceCount.I.

References WeakReferenceList::clear_reference(), and ReferenceCount::has_weak_list().

void FltRecord::write ( ostream &  out,
int  indent_level = 0 
) const [virtual, inherited]

Writes a multiple-line description of the record and all of its children.

This is a human-readable description, primarily for debugging; to write a flt file, use FltHeader::write_flt().

Reimplemented in FltInstanceRef.

Definition at line 372 of file fltRecord.cxx.

References FltRecord::write_children().

Referenced by FltInfo::list_hierarchy().

FltError FltRecord::write_ancillary ( FltRecordWriter writer) const [protected, virtual, inherited]

Writes whatever ancillary records are required for this record.

Returns FE_ok on success, or something else if there is some error.

Reimplemented in FltBead, FltBeadID, FltHeader, and FltMesh.

Definition at line 831 of file fltRecord.cxx.

References FltRecordWriter::write_record().

Referenced by FltRecord::write_record_and_children().

FltError FltTexture::write_attr_data ( ) const

Writes the texture's .attr file.

This may or may not be performed automatically, according to the setting of FltHeader::set_auto_attr_update().

Definition at line 192 of file fltTexture.cxx.

References get_attr_filename().

Referenced by build_record().

FltError FltTexture::write_attr_data ( Filename  attr_filename) const

Writes the texture's .attr file to the named file.

Definition at line 203 of file fltTexture.cxx.

References Datagram::get_data(), Datagram::get_length(), Filename::open_write(), and Filename::set_binary().

void FltRecord::write_children ( ostream &  out,
int  indent_level 
) const [protected, inherited]

Assuming the current write position has been left at the end of the last line of the record description, writes out the list of children.

Definition at line 385 of file fltRecord.cxx.

Referenced by FltRecord::write(), and FltInstanceRef::write().

FltError FltRecord::write_record_and_children ( FltRecordWriter writer) const [protected, virtual, inherited]

Writes this record out to the flt file, along with all of its ancillary records and children records.

Returns FE_ok on success, or something else on error.

Reimplemented in FltInstanceRef.

Definition at line 726 of file fltRecord.cxx.

References FltRecordWriter::advance(), FltRecord::build_record(), FltRecord::write_ancillary(), and FltRecordWriter::write_record().

Referenced by FltHeader::write_flt(), and FltRecordWriter::write_instance_def().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations