#include <computedVertices.h>
Inheritance diagram for ComputedVertices:
Public Member Functions | |
ComputedVertices () | |
void | update (Character *character) |
Recomputes all of the _coords, _norms, etc. | |
void | make_orig (Character *character) |
Copies all the values loaded in the _coords, _norms, etc. | |
void | write (ostream &out, Character *character) const |
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 () |
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. | |
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. | |
Static Public Member Functions | |
void | register_with_read_factory (void) |
Factory method to generate a ComputedVertices object. | |
TypedWritable * | make_ComputedVertices (const FactoryParams ¶ms) |
Factory method to generate a ComputedVertices object. | |
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. | |
Private Types | |
typedef vector_ushort | Vertices |
typedef pvector< VertexTransform > | VertexTransforms |
typedef pvector< ComputedVerticesMorphVertex > | VertexMorphs |
typedef pvector< ComputedVerticesMorphNormal > | NormalMorphs |
typedef pvector< ComputedVerticesMorphTexCoord > | TexCoordMorphs |
typedef pvector< ComputedVerticesMorphColor > | ColorMorphs |
Private Attributes | |
VertexTransforms | _transforms |
VertexMorphs | _vertex_morphs |
NormalMorphs | _normal_morphs |
TexCoordMorphs | _texcoord_morphs |
ColorMorphs | _color_morphs |
PTA_Vertexf | _orig_coords |
PTA_Normalf | _orig_norms |
PTA_Colorf | _orig_colors |
PTA_TexCoordf | _orig_texcoords |
Static Private Attributes | |
TypeHandle | _type_handle |
Friends | |
class | ComputedVerticesMaker |
This includes vertices animated into one or more joints, as well as morph vertices.
Definition at line 49 of file computedVertices.h.
|
Definition at line 83 of file computedVertices.h. |
|
Definition at line 81 of file computedVertices.h. |
|
Definition at line 82 of file computedVertices.h. |
|
Definition at line 80 of file computedVertices.h. |
|
Definition at line 76 of file computedVertices.h. |
|
Definition at line 59 of file computedVertices.h. |
|
Definition at line 43 of file computedVertices.I. References ComputedVertices::VertexTransform::_effect, ComputedVertices::VertexTransform::_joint_index, 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(). |
|
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. Definition at line 409 of file computedVertices.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 TypedWritableReferenceCount. Definition at line 107 of file computedVertices.h. |
|
Reimplemented from TypedWritableReferenceCount. Definition at line 108 of file computedVertices.h. |
|
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 TypedWritableReferenceCount. Definition at line 104 of file computedVertices.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. |
|
Reimplemented from TypedWritableReferenceCount. Definition at line 111 of file computedVertices.h. |
|
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(). |
|
|
Factory method to generate a ComputedVertices object.
Definition at line 464 of file computedVertices.cxx. |
|
Copies all the values loaded in the _coords, _norms, etc. arrays into the corresponding _orig_coords, etc. arrays. Definition at line 268 of file computedVertices.cxx. References _orig_texcoords. |
|
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(). |
|
Factory method to generate a ComputedVertices object.
Definition at line 484 of file computedVertices.cxx. |
|
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(). |
|
Recomputes all of the _coords, _norms, etc. values based on the values in _orig_coords, _orig_norms, etc., and the current positions of all of the joints. Definition at line 161 of file computedVertices.cxx. References compute_morphs(), and Normalf. |
|
Definition at line 308 of file computedVertices.cxx. References _texcoord_morphs. |
|
Function to write the important information in the particular object to a Datagram.
Implements TypedWritableReferenceCount. Definition at line 358 of file computedVertices.cxx. |
|
Definition at line 119 of file computedVertices.h. |
|
Definition at line 87 of file computedVertices.h. |
|
Definition at line 85 of file computedVertices.h. |
|
Definition at line 91 of file computedVertices.h. |
|
Definition at line 89 of file computedVertices.h. |
|
Definition at line 90 of file computedVertices.h. |
|
Definition at line 92 of file computedVertices.h. Referenced by make_orig(). |
|
Definition at line 86 of file computedVertices.h. Referenced by write(). |
|
Definition at line 78 of file computedVertices.h. |
|
Reimplemented from TypedWritableReferenceCount. Definition at line 36 of file computedVertices.cxx. |
|
Definition at line 84 of file computedVertices.h. |
|
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(). |