#include <geomPoint.h>
Inheritance diagram for GeomPoint:
Public Types | |
typedef const Vertexf & | GetNextVertex (VertexIterator &) |
typedef const Normalf & | GetNextNormal (NormalIterator &) |
typedef const TexCoordf & | GetNextTexCoord (TexCoordIterator &) |
typedef const Colorf & | GetNextColor (ColorIterator &) |
enum | BoundingVolumeType { BVT_static, BVT_dynamic_sphere } |
Public Member Functions | |
GeomPoint () | |
virtual Geom * | make_copy () const |
Returns a newly-allocated Geom that is a shallow copy of this one. | |
virtual void | print_draw_immediate () const |
virtual void | draw_immediate (GraphicsStateGuardianBase *gsg, GeomContext *gc) |
virtual int | get_num_vertices_per_prim () const |
virtual int | get_num_more_vertices_than_components () const |
virtual bool | uses_components () const |
virtual int | get_length (int) const |
virtual Geom * | explode () const |
If the Geom is a composite type such as a tristrip, this allocates and returns a new Geom that represents the same geometry as a simple type, for instance a set of triangles. | |
void | set_size (float size) |
float | get_size (void) 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 () |
void | write (ostream &out, int indent_level=0) const |
virtual void | output (ostream &out) const |
void | write_verbose (ostream &out, int indent_level) const |
Writes to the indicated ostream a formatted picture of the contents of the Geom, in detail--but hopefully not too much detail. | |
virtual void | draw (GraphicsStateGuardianBase *gsg) |
Actually draws the Geom with the indicated GSG. | |
virtual void | config () |
Configure rendering based on current settings. | |
void | calc_tight_bounds (LPoint3f &min_point, LPoint3f &max_point, bool &found_any) const |
Expands min_point and max_point to include all of the vertices in the Geom, if any. | |
void | transform_vertices (const LMatrix4f &mat) |
Applies the indicated transform to all of the vertices in the Geom. | |
void | set_coords (const PTA_Vertexf &coords, const PTA_ushort &vindex=PTA_ushort()) |
void | set_coords (const PTA_Vertexf &coords, GeomBindType bind, const PTA_ushort &vindex=PTA_ushort()) |
void | set_normals (const PTA_Normalf &norms, GeomBindType bind, const PTA_ushort &nindex=PTA_ushort()) |
void | set_colors (const PTA_Colorf &colors, GeomBindType bind, const PTA_ushort &cindex=PTA_ushort()) |
void | set_texcoords (const PTA_TexCoordf &texcoords, GeomBindType bind, const PTA_ushort &tindex=PTA_ushort()) |
void | get_coords (PTA_Vertexf &coords, GeomBindType &bind, PTA_ushort &vindex) const |
void | get_coords (PTA_Vertexf &coords, PTA_ushort &vindex) const |
void | get_normals (PTA_Normalf &norms, GeomBindType &bind, PTA_ushort &nindex) const |
void | get_colors (PTA_Colorf &colors, GeomBindType &bind, PTA_ushort &cindex) const |
void | get_texcoords (PTA_TexCoordf &texcoords, GeomBindType &bind, PTA_ushort &tindex) const |
virtual bool | is_dynamic () const |
Returns true if the Geom has any dynamic properties that are expected to change from one frame to the next, or false if the Geom is largely static. | |
GeomBindType | get_binding (int attr) const |
Returns the GeomBindType which indicates the assignment of colors (or normals, etc.) to the primitives. | |
const PTA_Vertexf & | get_coords_array () const |
Returns the array of vertex coordinates associated with the Geom. | |
const PTA_Normalf & | get_normals_array () const |
Returns the array of normals associated with the Geom. | |
const PTA_Colorf & | get_colors_array () const |
Returns the array of colors associated with the Geom. | |
const PTA_TexCoordf & | get_texcoords_array () const |
Returns the array of texcoords associated with the Geom. | |
const PTA_ushort & | get_coords_index () const |
Returns the array of indices that, if nonempty, will be used to traverse the vertices in coords_array. | |
const PTA_ushort & | get_normals_index () const |
Returns the array of indices that, if nonempty, will be used to traverse the vertices in normals_array. | |
const PTA_ushort & | get_colors_index () const |
Returns the array of indices that, if nonempty, will be used to traverse the vertices in colors_array. | |
const PTA_ushort & | get_texcoords_index () const |
Returns the array of indices that, if nonempty, will be used to traverse the vertices in texcoords_array. | |
void | set_num_prims (int num) |
Sets the number of primitives in the Geom. | |
int | get_num_prims () const |
Returns the number of primitives in the Geom. | |
void | set_lengths (const PTA_int &lengths) |
Sets the array that indicates the length (number of vertices) of each primitive. | |
PTA_int | get_lengths () const |
Returns the array the indicates the length (number of vertices) of each primitive. | |
int | get_num_vertices () const |
Returns the number of vertices required by all all the prims in the Geom. | |
virtual PTA_ushort | get_tris () const |
This is similar in principle to explode(), except it returns only a list of triangle vertex indices, with no information about color or whatever. | |
VertexIterator | make_vertex_iterator () const |
const Vertexf & | get_next_vertex (VertexIterator &viterator) const |
NormalIterator | make_normal_iterator () const |
const Normalf & | get_next_normal (NormalIterator &niterator) const |
TexCoordIterator | make_texcoord_iterator () const |
const TexCoordf & | get_next_texcoord (TexCoordIterator &tciterator) const |
ColorIterator | make_color_iterator () const |
const Colorf & | get_next_color (ColorIterator &citerator) const |
GeomContext * | prepare (GraphicsStateGuardianBase *gsg) |
Creates a context for the Geom on the particular GSG, if it does not already exist. | |
void | unprepare () |
Frees the context allocated on all GSG's for which the geom has been declared. | |
void | unprepare (GraphicsStateGuardianBase *gsg) |
Frees the geom context only on the indicated GSG, if it exists there. | |
void | clear_gsg (GraphicsStateGuardianBase *gsg) |
Removes the indicated GSG from the Geom's known GSG's, without actually releasing the geom on that GSG. | |
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_bound (BoundingVolumeType type) |
Sets the type of the bounding volume that will be dynamically computed for this particular node. | |
void | set_bound (const BoundingVolume &volume) |
Explicitly sets a new bounding volume on this node. | |
const BoundingVolume & | get_bound () const |
Returns the current bounding volume on this node, possibly forcing a recompute. | |
bool | mark_bound_stale () |
Marks the current bounding volume as stale, so that it will be recomputed later. | |
void | force_bound_stale () |
Marks the current volume as stale and propagates the effect at least one level, even if it had already been marked stale. | |
bool | is_bound_stale () const |
Returns true if the bound is currently marked stale and will be recomputed the next time get_bound() is called. | |
void | set_final (bool flag) |
Sets the "final" flag on this BoundedObject. | |
bool | is_final () const |
Returns the current state of the "final" flag. | |
Static Public Member Functions | |
void | register_with_read_factory (void) |
Factory method to generate a GeomPoint object. | |
TypedWritable * | make_GeomPoint (const FactoryParams ¶ms) |
Factory method to generate a GeomPoint 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. | |
void | init () |
virtual BoundingVolume * | recompute_bound () |
Recomputes the dynamic bounding volume for this Geom. | |
virtual void | propagate_stale_bound () |
Called by BoundedObject::mark_bound_stale(), this should make sure that all bounding volumes that depend on this one are marked stale also. | |
const BoundingVolume * | get_bound_ptr () const |
Returns the state of the _bound pointer. | |
BoundingVolume * | set_bound_ptr (BoundingVolume *bound) |
Changes the _bound pointer. | |
Protected Attributes | |
float | _size |
PTA_Vertexf | _coords |
PTA_Normalf | _norms |
PTA_Colorf | _colors |
PTA_TexCoordf | _texcoords |
PTA_ushort | _vindex |
PTA_ushort | _nindex |
PTA_ushort | _cindex |
PTA_ushort | _tindex |
int | _numprims |
int | _num_vertices |
PTA_int | _primlengths |
enum GeomBindType | _bind [num_GeomAttrTypes] |
GetNextVertex * | _get_vertex |
GetNextNormal * | _get_normal |
GetNextTexCoord * | _get_texcoord |
GetNextColor * | _get_color |
GraphicsStateGuardianBase * | _prepared_gsg |
GeomContext * | _prepared_context |
Static Private Attributes | |
TypeHandle | _type_handle |
Definition at line 34 of file geomPoint.h.
|
|
|
|
|
|
|
|
|
Definition at line 58 of file boundedObject.h. |
|
Definition at line 36 of file geomPoint.h. |
|
Expands min_point and max_point to include all of the vertices in the Geom, if any. found_any is set true if any points are found. It is the caller's responsibility to initialize min_point, max_point, and found_any before calling this function. Definition at line 244 of file geom.cxx. References PointerToArray< Vertexf >::begin(), PointerToArray< Vertexf >::end(), Geom::get_coords(), nassertv, PointerToArray< Vertexf >::push_back(), PointerToArray< Vertexf >::reserve(), Geom::set_coords(), and PointerToArray< Vertexf >::size(). |
|
Definition at line 70 of file writableConfigurable.h. References PUBLISHED. Referenced by Geom::set_lengths(). |
|
Removes the indicated GSG from the Geom's known GSG's, without actually releasing the geom on that GSG. This is intended to be called only from GSG::release_geom(); it should never be called by user code. Definition at line 746 of file geom.cxx. References Geom::_num_vertices, and Geom::_numprims. |
|
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(). |
|
Configure rendering based on current settings.
Reimplemented from WritableConfigurable. Definition at line 579 of file geom.cxx. References Geom::_prepared_context, Geom::_prepared_gsg, NULL, and GraphicsStateGuardianBase::release_geom(). Referenced by GeomSphere::draw_immediate(), Geom::get_texcoords(), GeomTri::get_tris(), and GeomLine::write_datagram(). |
|
Actually draws the Geom with the indicated GSG.
Reimplemented from dDrawable. Definition at line 559 of file geom.cxx. References Geom::_prepared_context, Geom::_prepared_gsg, NULL, GraphicsStateGuardianBase::prepare_geom(), and Geom::unprepare(). Referenced by GLGraphicsStateGuardian::prepare_geom_node(). |
|
Implements Geom. Definition at line 73 of file geomPoint.cxx. |
|
If the Geom is a composite type such as a tristrip, this allocates and returns a new Geom that represents the same geometry as a simple type, for instance a set of triangles. If the Geom is already a simple type, this allocates and returns a copy. This is just a convenience function for dealing with composite types when performance is less than paramount. Reimplemented from Geom. Definition at line 56 of file geomPoint.h. |
|
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 Geom. Definition at line 132 of file geomPoint.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(). |
|
Marks the current volume as stale and propagates the effect at least one level, even if it had already been marked stale.
Definition at line 188 of file boundedObject.I. References BoundedObject::_cycler, BoundedObject::F_final, and INLINE. Referenced by PandaNode::remove_child(). |
|
Reimplemented from Geom. Definition at line 88 of file geomPoint.h. |
|
Returns the GeomBindType which indicates the assignment of colors (or normals, etc.) to the primitives.
Definition at line 36 of file geom.I. References Geom::_coords, and INLINE. Referenced by GLGraphicsStateGuardian::draw_point(), DXGraphicsStateGuardian8::draw_point(), DXGraphicsStateGuardian7::draw_prim_inner_loop(), GLGraphicsStateGuardian::draw_quad(), and GeomTristrip::get_num_tris(). |
|
Returns the current bounding volume on this node, possibly forcing a recompute. A node's bounding volume encloses only the node itself, irrespective of the nodes above or below it in the graph. This is different from the bounding volumes on the arcs, which enclose all geometry below them. Reimplemented in PandaNode. Definition at line 59 of file boundedObject.cxx. Referenced by PandaNode::clear_effect(), PandaNode::get_state(), and CollisionLevelState::reserve(). |
|
Returns the state of the _bound pointer. To be used only internally by derived classes. This returns a const pointer only; the bounding volume should not be modified directly, because that might interfere with pipelining. Instead, create a new copy with make_copy(), modify the copy, and set_bound_ptr() with the copy. Alternatively, if you have just called recompute_bound(), which is guaranteed to reset the pointer, just use the return value from that as a non-const BoundingVolume pointer. Definition at line 318 of file boundedObject.I. |
|
Reimplemented from Geom. Definition at line 76 of file geomPoint.h. Referenced by StaticTextFont::get_glyph(). |
|
Definition at line 447 of file geom.cxx. References PTA_ushort. Referenced by DXGraphicsStateGuardian7::draw_prim_inner_loop_coordtexonly(), and Geom::fillin(). |
|
Returns the array of colors associated with the Geom. This may have any binding type. It may either be indexed or nonindexed, depending on whether get_colors_index() returns a NULL array. |
|
Returns the array of indices that, if nonempty, will be used to traverse the vertices in colors_array.
Definition at line 161 of file geom.I. References Geom::_num_vertices, and INLINE. |
|
Definition at line 401 of file geom.cxx. References Geom::_bind, Geom::_tindex, and G_TEXCOORD. |
|
Definition at line 417 of file geom.cxx. Referenced by Geom::calc_tight_bounds(), DXGraphicsStateGuardian7::draw_prim_inner_loop_coordtexonly(), Geom::fillin(), and GeomTransformer::~GeomTransformer(). |
|
Returns the array of vertex coordinates associated with the Geom. This must have binding type G_PER_VERTEX. It may either be indexed or nonindexed, depending on whether get_coords_index() returns a NULL array. |
|
Returns the array of indices that, if nonempty, will be used to traverse the vertices in coords_array.
Definition at line 131 of file geom.I. References Geom::_num_vertices, Geom::_numprims, Geom::get_num_vertices_per_prim(), INLINE, WritableConfigurable::make_dirty(), and Geom::uses_components(). |
|
Implements Geom. Definition at line 52 of file geomPoint.h. |
|
Returns the array the indicates the length (number of vertices) of each primitive. This array will generally only be defined for composite type Geoms, like a GeomTristrip; it is meaningless for simple Geoms. Definition at line 285 of file geom.I. Referenced by GLGraphicsStateGuardian::draw_quad(). |
|
Definition at line 426 of file geom.I. Referenced by GeomTristrip::get_num_tris(). |
|
Definition at line 370 of file geom.I. Referenced by DXGraphicsStateGuardian8::draw_point(), GeomTristrip::get_num_tris(), and issue_vertex_rib(). |
|
|
|
Definition at line 342 of file geom.I. Referenced by Geom::operator=(). |
|
Definition at line 432 of file geom.cxx. References Geom::make_copy(). Referenced by SceneGraphAnalyzer::collect_statistics(), DXGraphicsStateGuardian7::draw_prim_inner_loop_coordtexonly(), and Geom::fillin(). |
|
Returns the array of normals associated with the Geom. This may have any binding type. It may either be indexed or nonindexed, depending on whether get_normals_index() returns a NULL array. Definition at line 76 of file geom.I. References Geom::_texcoords, and INLINE. |
|
Returns the array of indices that, if nonempty, will be used to traverse the vertices in normals_array.
|
|
Implements Geom. Definition at line 45 of file geomPoint.h. |
|
Returns the number of primitives in the Geom.
Definition at line 213 of file geom.I. Referenced by SceneGraphAnalyzer::collect_statistics(), GLGraphicsStateGuardian::draw_point(), DXGraphicsStateGuardian8::draw_point(), DXGraphicsStateGuardian7::draw_prim_inner_loop_coordtexonly(), GLGraphicsStateGuardian::draw_quad(), Geom::fillin(), Geom::operator=(), and CRGraphicsStateGuardian::prepare_lens(). |
|
Returns the number of vertices required by all all the prims in the Geom.
Definition at line 228 of file geom.I. Referenced by GLGraphicsStateGuardian::draw_point(), DXGraphicsStateGuardian8::draw_point(), DXGraphicsStateGuardian7::draw_prim_inner_loop_coordtexonly(), GLGraphicsStateGuardian::draw_quad(), and CRGraphicsStateGuardian::prepare_lens(). |
|
Implements Geom. Definition at line 42 of file geomPoint.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(). |
|
Definition at line 61 of file geomPoint.h. Referenced by DXGraphicsStateGuardian7::draw_prim_inner_loop_coordtexonly(), and CRGraphicsStateGuardian::prepare_lens(). |
|
Definition at line 462 of file geom.cxx. References Geom::_prepared_context, Geom::_prepared_gsg, Geom::config(), Geom::draw_immediate(), WritableConfigurable::is_dirty(), and NULL. Referenced by DXGraphicsStateGuardian7::draw_prim_inner_loop_coordtexonly(), Geom::fillin(), and GeomTransformer::transform_vertices(). |
|
Returns the array of texcoords associated with the Geom. This may have a binding type of G_PER_VERTEX or G_OFF. It may either be indexed or nonindexed, depending on whether get_texcoords_index() returns a NULL array. Definition at line 116 of file geom.I. References Geom::_cindex. |
|
Returns the array of indices that, if nonempty, will be used to traverse the vertices in texcoords_array.
|
|
This is similar in principle to explode(), except it returns only a list of triangle vertex indices, with no information about color or whatever. The array returned is a set of indices into the geom's _coords array, as retrieve by get_coords(); there will be 3*n elements in the array, where n is the number of triangles described by the geometry. This is useful when it's important to determine the physical structure of the geometry, without necessarily worrying about its rendering properties, and when performance considerations are not overwhelming. Reimplemented in GeomQuad, GeomTri, GeomTrifan, and GeomTristrip. |
|
Reimplemented from Geom. Definition at line 85 of file geomPoint.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. |
|
Definition at line 761 of file geom.cxx. References Geom::_bind, and GeomBindType. |
|
Reimplemented from Geom. Definition at line 80 of file geomPoint.h. |
|
Returns true if the bound is currently marked stale and will be recomputed the next time get_bound() is called. This function is defined up at the top of this file, because several of the inline functions below reference it. Definition at line 217 of file boundedObject.I. References BoundedObject::_cycler, and INLINE. Referenced by BoundedObject::~BoundedObject(). |
|
Definition at line 82 of file writableConfigurable.h. Referenced by Geom::get_texcoords(), and dDrawable::~dDrawable(). |
|
Returns true if the Geom has any dynamic properties that are expected to change from one frame to the next, or false if the Geom is largely static. For now, this is the same thing as asking whether its vertices are indexed. Reimplemented from 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(). |
|
Returns the current state of the "final" flag. Initially, this flag is off (false), but it may be changed by an explicit call to set_final(). See set_final(). Definition at line 280 of file boundedObject.I. |
|
|
Definition at line 410 of file geom.I. Referenced by GLGraphicsStateGuardian::draw_point(), GLGraphicsStateGuardian::draw_quad(), GeomTristrip::get_num_tris(), and CRGraphicsStateGuardian::prepare_lens(). |
|
Returns a newly-allocated Geom that is a shallow copy of this one. It will be a different Geom pointer, but its internal data may or may not be shared with that of the original Geom. Implements Geom. Definition at line 50 of file geomPoint.cxx. |
|
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(). |
|
Factory method to generate a GeomPoint object.
Definition at line 105 of file geomPoint.cxx. References _size, Geom::fillin(), and DatagramIterator::get_float32(). |
|
Definition at line 354 of file geom.I. Referenced by GLGraphicsStateGuardian::draw_point(), GLGraphicsStateGuardian::draw_quad(), GeomTristrip::get_num_tris(), and CRGraphicsStateGuardian::prepare_lens(). |
|
Definition at line 382 of file geom.I. Referenced by GLGraphicsStateGuardian::draw_point(), GLGraphicsStateGuardian::draw_quad(), GeomTristrip::get_num_tris(), and CRGraphicsStateGuardian::prepare_lens(). |
|
Definition at line 326 of file geom.I. References Geom::_get_color, Colorf, and INLINE. Referenced by GLGraphicsStateGuardian::draw_point(), GLGraphicsStateGuardian::draw_quad(), GeomTristrip::get_num_tris(), Geom::operator=(), and CRGraphicsStateGuardian::prepare_lens(). |
|
Marks the current bounding volume as stale, so that it will be recomputed later. This may have a cascading effect up to the root of all graphs of which the node is a part. Returns true if the setting was changed, or false if it was already marked stale (or if it is a static bounding volume). Definition at line 162 of file boundedObject.I. References BoundedObject::_cycler, BoundedObject::F_bound_stale, and INLINE. Referenced by CollisionSphere::CollisionSphere(), GeomNode::combine_with(), CollisionPlane::get_normal(), PGItem::instance_to_state_def(), CollisionPlane::make_copy(), PGItem::set_active(), CollisionSphere::set_center(), TextNode::set_coordinate_system(), PandaNode::set_effect(), CollisionNode::set_from_collide_mask(), GeomNode::set_geom_state(), CollisionRay::set_origin(), CollisionSegment::set_point_a(), CollisionSphere::test_intersection(), CollisionSegment::test_intersection(), CollisionRay::test_intersection(), and CollisionNode::xform(). |
|
Definition at line 639 of file geom.cxx. References Geom::_bind, Geom::_cindex, Geom::_get_color, Geom::_get_normal, Geom::_get_texcoord, Geom::_get_vertex, Geom::_primlengths, Geom::_tindex, G_OFF, get_color_noop(), get_normal_noop(), get_texcoord_noop(), and get_vertex_noop(). |
|
Creates a context for the Geom on the particular GSG, if it does not already exist. Returns the new (or old) GeomContext. If the given GeomContext pointer is non-NULL, it will be passed to the GSG, which may or may not choose to extend the existing GeomContext, or create a totally new one. |
|
Implements Geom. Definition at line 62 of file geomPoint.cxx. |
|
Called by BoundedObject::mark_bound_stale(), this should make sure that all bounding volumes that depend on this one are marked stale also.
Reimplemented from BoundedObject. Definition at line 102 of file drawable.cxx. |
|
Recomputes the dynamic bounding volume for this Geom. This includes all of the vertices. Reimplemented from BoundedObject. Definition at line 796 of file geom.cxx. References indent(). |
|
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 GeomPoint object.
Definition at line 146 of file geomPoint.cxx. |
|
Explicitly sets a new bounding volume on this node. This will be a static bounding volume that will no longer be recomputed automatically. Reimplemented in PandaNode. Definition at line 135 of file boundedObject.I. References BoundedObject::F_bound_stale. |
|
Sets the type of the bounding volume that will be dynamically computed for this particular node. Presently, this should only be BVT_dynamic_sphere. Definition at line 115 of file boundedObject.I. |
|
Changes the _bound pointer. To be used only internally by derived classes, usually in recompute_bound(). The return value is the same pointer passed in, as a convenience (it will now be reference counted). Definition at line 340 of file boundedObject.I. |
|
Definition at line 366 of file geom.cxx. References Geom::_bind, Geom::_nindex, Geom::_norms, and G_NORMAL. Referenced by BuilderPrim::fill_geom(). |
|
|
|
Definition at line 317 of file geom.cxx. References Geom::_bind, Geom::_cindex, and G_COLOR. Referenced by Geom::calc_tight_bounds(), WindowFramework::set_background_type(), and CollisionPolygon::test_intersection_from_segment(). |
|
Sets the "final" flag on this BoundedObject. If this is true, than no bounding volume need be tested below it; a positive intersection with this bounding volume is deemed to be a positive intersection with all geometry inside. This is useful to quickly force a larger bounding volume around a node when the GeomNodes themselves are inaccurate for some reason, without forcing a recompute of every nested bounding volume. It's also helpful when the bounding volume is tricked by some special properties, like billboards, that may move geometry out of its bounding volume otherwise. Definition at line 256 of file boundedObject.I. |
|
Sets the array that indicates the length (number of vertices) of each primitive. This array should have get_num_prims() entries. This only has meaning for composite type Geoms, like a GeomTristrip; it is ignored for simple Geoms, like a GeomTri. Definition at line 262 of file geom.I. References Geom::NormalIterator::_array, Geom::NormalIterator::_index, Geom::_nindex, Geom::_norms, WritableConfigurable::check_config(), and INLINE. Referenced by WindowFramework::set_background_type(), and CollisionPolygon::test_intersection_from_segment(). |
|
|
|
Sets the number of primitives in the Geom. The meaning of this depends on the precise type of Geom; generally, each prim is one triangle in a GeomTri, or one tristrip in a GeomTristrip. Definition at line 195 of file geom.I. Referenced by WindowFramework::set_background_type(), and CollisionPolygon::test_intersection_from_segment(). |
|
Definition at line 60 of file geomPoint.h. |
|
Definition at line 383 of file geom.cxx. References Geom::_bind, Geom::_cindex, Geom::_colors, and G_COLOR. |
|
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(). |
|
Applies the indicated transform to all of the vertices in the Geom. If the Geom happens to share a vertex table with another Geom, this operation will duplicate the vertex table instead of breaking the other Geom; however, if multiple Geoms with shared tables are transformed by the same matrix, they will no longer share tables after the operation. Consider using the GeomTransformer if you will be applying the same transform to multiple Geoms. Definition at line 295 of file geom.cxx. References Geom::_bind, Geom::_nindex, Geom::_norms, G_NORMAL, and WritableConfigurable::make_dirty(). |
|
Frees the geom context only on the indicated GSG, if it exists there.
Definition at line 721 of file geom.cxx. References Geom::_colors, Geom::_coords, Geom::_norms, Geom::_texcoords, Geom::_vindex, and READ_PTA. |
|
Frees the context allocated on all GSG's for which the geom has been declared.
Definition at line 702 of file geom.cxx. Referenced by Geom::draw(), and Geom::Geom(). |
|
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(). |
|
Implements Geom. Definition at line 48 of file geomPoint.h. |
|
|
Function to write the important information in the particular object to a Datagram.
Reimplemented from Geom. Definition at line 88 of file geomPoint.cxx. |
|
Writes to the indicated ostream a formatted picture of the contents of the Geom, in detail--but hopefully not too much detail.
|
|
Definition at line 258 of file geom.h. Referenced by Geom::get_coords(), Geom::init(), Geom::output(), Geom::set_colors(), Geom::set_coords(), Geom::set_texcoords(), Geom::transform_vertices(), and Geom::~Geom(). |
|
Definition at line 253 of file geom.h. Referenced by Geom::Geom(), Geom::get_texcoords_array(), Geom::output(), Geom::set_coords(), and Geom::set_texcoords(). |
|
Definition at line 248 of file geom.h. Referenced by Geom::Geom(), Geom::set_texcoords(), Geom::unprepare(), and Geom::write(). |
|
Definition at line 246 of file geom.h. Referenced by Geom::Geom(), Geom::get_binding(), Geom::unprepare(), and Geom::write(). |
|
Definition at line 264 of file geom.h. Referenced by Geom::make_vertex_iterator(), and Geom::output(). |
|
Definition at line 262 of file geom.h. Referenced by Geom::output(). |
|
Definition at line 263 of file geom.h. Referenced by Geom::output(). |
|
Definition at line 261 of file geom.h. Referenced by Geom::output(). |
|
Definition at line 252 of file geom.h. Referenced by Geom::Geom(), Geom::set_colors(), Geom::set_lengths(), Geom::transform_vertices(), and Geom::write(). |
|
Definition at line 247 of file geom.h. Referenced by Geom::Geom(), Geom::set_colors(), Geom::set_lengths(), Geom::transform_vertices(), Geom::unprepare(), and Geom::write(). |
|
Definition at line 256 of file geom.h. Referenced by Geom::clear_gsg(), Geom::Geom(), Geom::get_colors_index(), and Geom::get_coords_index(). |
|
Definition at line 256 of file geom.h. Referenced by Geom::clear_gsg(), GeomTri::draw_immediate(), GeomQuad::draw_immediate(), Geom::Geom(), and Geom::get_coords_index(). |
|
Definition at line 273 of file geom.h. Referenced by Geom::config(), Geom::draw(), and Geom::get_texcoords(). |
|
Definition at line 272 of file geom.h. Referenced by Geom::config(), Geom::draw(), and Geom::get_texcoords(). |
|
Definition at line 257 of file geom.h. Referenced by GeomTristrip::draw_immediate(), Geom::Geom(), and Geom::output(). |
|
Definition at line 64 of file geomPoint.h. Referenced by make_GeomPoint(). |
|
Definition at line 249 of file geom.h. Referenced by Geom::Geom(), Geom::get_normals_array(), Geom::unprepare(), and Geom::write(). |
|
Definition at line 254 of file geom.h. Referenced by Geom::Geom(), Geom::get_coords(), and Geom::output(). |
|
Reimplemented from Geom. Definition at line 33 of file geomPoint.cxx. |
|
Definition at line 251 of file geom.h. Referenced by GeomTri::draw_immediate(), GeomQuad::draw_immediate(), Geom::Geom(), Geom::unprepare(), and Geom::write(). |
|
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(). |