Panda3D
|
A combination rotation and scale. More...
#include "fltTransformRotateScale.h"
Public Member Functions | |
FltTransformRotateScale (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. | |
TypedObject * | as_typed_object () |
Returns the object, upcast (if necessary) to a TypedObject pointer. | |
const TypedObject * | as_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 () |
FltRecord * | get_ancillary (int n) const |
Returns the nth unsupported ancillary record of this record. | |
float | get_angle () const |
Returns the angle of rotation in degrees. | |
float | get_axis_scale () const |
Returns the scale factor in the direction of the axis. | |
int | get_best_parent_from_Set (const std::set< int > &) const |
const LPoint3d & | get_center () const |
FltRecord * | get_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. | |
FltRecord * | get_extension (int n) const |
Returns the nth extension of this record. | |
const LMatrix4d & | get_matrix () const |
Returns the transform matrix represented by this particular component of the transform. | |
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. | |
float | get_overall_scale () const |
Returns the overall scale factor. | |
int | get_ref_count () const |
Returns the current reference count. | |
const LPoint3d & | get_reference_point () const |
FltRecord * | get_subface (int n) const |
Returns the nth subface of this record. | |
const LPoint3d & | get_to_point () const |
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. | |
WeakReferenceList * | get_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 *) |
void | operator delete (void *ptr) |
void | operator delete[] (void *, void *) |
void | operator delete[] (void *, void *) |
void | operator delete[] (void *ptr) |
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. | |
void | ref () const |
Explicitly increments the reference count. | |
void | set (const LPoint3d ¢er, const LPoint3d &reference_point, const LPoint3d &to_point, bool axis_scale) |
Defines the transform explicitly. | |
void | set_comment (const string &comment) |
Changes the comment for this record. | |
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. | |
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. | |
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. | |
FltRecord * | create_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 |
LMatrix4d | _matrix |
A combination rotation and scale.
This is sometimes called "Rotate To Point" within MultiGen.
Definition at line 27 of file fltTransformRotateScale.h.
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 FltRecord::apply_converted_filenames | ( | ) | [virtual, inherited] |
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 in FltExternalReference, FltHeader, and FltTexture.
Definition at line 340 of file fltRecord.cxx.
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 FltTransformRotateScale::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 212 of file fltTransformRotateScale.cxx.
References Datagram::add_be_float32(), Datagram::add_be_float64(), FltRecord::build_record(), Datagram::pad_bytes(), FltRecordWriter::set_opcode(), and FltRecordWriter::update_datagram().
void FltRecord::check_remaining_size | ( | const DatagramIterator & | di, |
const string & | name = string() |
||
) | const [inherited] |
Checks that the iterator has no bytes left, as it should at the end of a successfully read record.
If there *are* remaining bytes, print a warning message but otherwise don't worry about it.
If we are attempting to read a flt file whose version is newer than the newest this program understands, don't even print a warning message, since this is exactly the sort of thing we expect.
Definition at line 313 of file fltRecord.cxx.
References FltHeader::get_flt_version(), DatagramIterator::get_remaining_size(), and FltHeader::max_flt_version().
Referenced by FltVertexList::extract_record(), FltVertex::extract_record(), FltVectorRecord::extract_record(), FltTransformTranslate::extract_record(), FltTransformScale::extract_record(), extract_record(), FltTransformRotateAboutPoint::extract_record(), FltTransformRotateAboutEdge::extract_record(), FltTransformPut::extract_record(), FltTransformGeneralMatrix::extract_record(), FltTexture::extract_record(), FltObject::extract_record(), FltMeshPrimitive::extract_record(), FltMesh::extract_record(), FltMaterial::extract_record(), FltLOD::extract_record(), FltLocalVertexPool::extract_record(), FltLightSourceDefinition::extract_record(), FltInstanceRef::extract_record(), FltInstanceDefinition::extract_record(), FltHeader::extract_record(), FltGroup::extract_record(), FltFace::extract_record(), FltExternalReference::extract_record(), and FltCurve::extract_record().
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 FltTransformRotateScale::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 172 of file fltTransformRotateScale.cxx.
References FltRecord::check_remaining_size(), FltRecord::extract_record(), FltRecordReader::get_iterator(), FltRecordReader::get_opcode(), and DatagramIterator::skip_bytes().
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.
float FltTransformRotateScale::get_angle | ( | ) | const |
Returns the angle of rotation in degrees.
Definition at line 132 of file fltTransformRotateScale.cxx.
float FltTransformRotateScale::get_axis_scale | ( | ) | const |
Returns the scale factor in the direction of the axis.
Definition at line 122 of file fltTransformRotateScale.cxx.
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.
const LMatrix4d & FltTransformRecord::get_matrix | ( | ) | const [inherited] |
Returns the transform matrix represented by this particular component of the transform.
Definition at line 36 of file fltTransformRecord.cxx.
Referenced by FltBead::add_transform_step().
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.
float FltTransformRotateScale::get_overall_scale | ( | ) | const |
Returns the overall scale factor.
Definition at line 111 of file fltTransformRotateScale.cxx.
int ReferenceCount::get_ref_count | ( | ) | const [inline, inherited] |
Returns the current reference count.
Definition at line 155 of file referenceCount.I.
References ReferenceCount::test_ref_count_integrity().
Referenced by TransformState::clear_cache(), RenderState::clear_cache(), RenderState::finalize(), RenderEffects::finalize(), RenderEffect::finalize(), RenderAttrib::finalize(), InternalName::finalize(), TransformState::get_num_unused_states(), RenderState::get_num_unused_states(), TransformState::list_cycles(), RenderState::list_cycles(), GeomVertexFormat::remove_column(), TransformState::unref(), RenderState::unref(), RenderState::~RenderState(), and TransformState::~TransformState().
FltRecord * FltRecord::get_subface | ( | int | n | ) | const [inherited] |
Returns the nth subface of this record.
Definition at line 125 of file fltRecord.cxx.
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 FltTransformRotateScale::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 FltTransformRecord.
Definition at line 63 of file fltTransformRotateScale.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] |
Returns true if the current object is the indicated type exactly.
Definition at line 74 of file typedObject.I.
References TypeHandle::get_name().
Referenced by GraphicsStateGuardian::async_reload_texture(), PortalNode::combine_with(), PandaNode::combine_with(), GeomNode::combine_with(), CollisionNode::combine_with(), Character::combine_with(), PGItem::cull_callback(), FactoryParams::get_param_of_type(), CollisionHandlerPusher::handle_entries(), SceneGraphReducer::r_flatten(), ConnectionWriter::send(), FltToEggLevelState::set_transform(), and VirtualFileSystem::unmount().
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 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 FltTransformRotateScale::set | ( | const LPoint3d & | center, |
const LPoint3d & | reference_point, | ||
const LPoint3d & | to_point, | ||
bool | axis_scale | ||
) |
Defines the transform explicitly.
The angle of rotation is determined by the angle between the reference point and the to point (relative to the center), and the scale factor is determined by the distance between the reference point and the center point. If axis_scale is true, the scale is along reference point axis only; otherwise, it is a uniform scale.
Definition at line 52 of file fltTransformRotateScale.cxx.
void FltRecord::set_comment | ( | const string & | comment | ) | [inherited] |
Changes the comment for this record.
Definition at line 295 of file fltRecord.cxx.
bool ReferenceCount::test_ref_count_integrity | ( | ) | const [inline, 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 236 of file referenceCount.I.
References ReferenceCount::do_test_ref_count_integrity().
Referenced by EggGroupNode::add_child(), InternalName::find_ancestor(), InternalName::get_ancestor(), ReferenceCount::get_ref_count(), InternalName::get_top(), ReferenceCount::ref(), EggVertex::test_gref_integrity(), EggVertex::test_pref_integrity(), EggNode::test_under_integrity(), EggPrimitive::test_vref_integrity(), EggGroup::test_vref_integrity(), MouseWatcher::throw_event_pattern(), ReferenceCount::unref(), and EggNode::update_under().
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().
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().