addVertex EggVertex *EggVertexPool::add_vertex(EggVertex *vertex, int index = (-1)); add_vertex() adds a freshly-allocated vertex. It is up to the user to allocate the vertex. Description: Adds the indicated vertex to the pool. It is an error if the vertex is already a member of this or any other pool. The vertex must have been allocated from the free store; its pointer will now be owned by the vertex pool. If the index number is supplied, tries to assign that index number; it is an error if the index number is already in use. It is possible that a forward reference to this vertex was requested in the past; if so, the data from the supplied vertex is copied onto the forward reference, which becomes the actual vertex. In this case, a different pointer is saved (and returned) than the one actually passed in. In the usual case, however, the vertex pointer passed in is the one that is saved in the vertex pool and returned from this method. |
createUniqueVertex EggVertex *EggVertexPool::create_unique_vertex(EggVertex const ©); create_unique_vertex() creates a new vertex if there is not already one identical to the indicated vertex, or returns the existing one if there is. Description: Creates a new vertex in the pool that is a copy of the indicated one and returns it. If there is already a vertex in the pool like the indicated one, simply returns that one. |
getClassType static TypeHandle EggVertexPool::get_class_type(void); Undocumented function. |
getForwardVertex EggVertex *EggVertexPool::get_forward_vertex(int index); Returns a forward reference if there is no such vertex. Description: Returns the vertex in the pool with the indicated index number. If there is not a vertex in the pool with the indicated index number, creates a special forward-reference EggVertex that has no data, on the assumption that the vertex pool has not yet been fully read and more data will be available later. |
getHighestIndex int EggVertexPool::get_highest_index(void) const; Returns 0 if the pool is empty. Description: Returns the highest index number used by any vertex in the pool (except forward references). Returns -1 if the pool is empty. |
getNumDimensions int EggVertexPool::get_num_dimensions(void) const; Description: Returns the maximum number of dimensions used by any vertex in the pool. |
getUvNames void EggVertexPool::get_uv_names(vector< string > &uv_names, vector< string > &uvw_names, vector< string > &tbn_names) const; Description: Returns the list of UV names that are defined by any vertices in the pool, as well as the subset of UV names that actually define 3-d texture coordinates ("uvw_names"). Also returns the subset of UV/UVW names that define a tangent and binormal. It is the user's responsibility to clear both vectors before calling this method. |
getVertex EggVertex *EggVertexPool::get_vertex(int index) const; Returns NULL if there is no such vertex. Description: Returns the vertex in the pool with the indicated index number, or NULL if no vertices have that index number. |
hasColors bool EggVertexPool::has_colors(void) const; Description: Returns true if any vertex in the pool has a color defined, false if none of them do. |
hasDefinedVertices bool EggVertexPool::has_defined_vertices(void) const; Description: Returns true if any vertices in the pool are fully defined vertices, false if all vertices are forward references. |
hasForwardVertices bool EggVertexPool::has_forward_vertices(void) const; Description: Returns true if any vertices in the pool are undefined forward-reference vertices, false if all vertices are defined. |
hasNonwhiteColors bool EggVertexPool::has_nonwhite_colors(void) const; Description: Returns true if any vertex in the pool has a color defined other than white, false if no vertices have colors, or if all colors are white. |
hasUvs bool EggVertexPool::has_uvs(void) const; Description: Returns true if any vertex in the pool has a uv defined, false if none of them do. |
hasVertex bool EggVertexPool::has_vertex(int index) const; Filename: eggVertexPool.I Created by: drose (16Jan99) PANDA 3D SOFTWARE Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved All use of this software is subject to the terms of the Panda 3d Software license. You should have received a copy of this license along with this source code; you will also find a current copy of the license at http://etc.cmu.edu/panda3d/docs/license/ . To contact the maintainers of this program write to panda3d-general@lists.sourceforge.net . Description: Returns true if the indicated vertex has been defined in the vertex pool, false otherwise. This does not include forward references. |
makeNewVertex EggVertex *EggVertexPool::make_new_vertex(void); make_new_vertex() allocates and returns a new vertex from the pool. Description: Allocates and returns a new vertex from the pool. This is one of three ways to add new vertices to a vertex pool. This flavor of make_new_vertex() explicitly sets the vertex position as it is allocated. It does not attempt to share vertices. |
operator [] EggVertex *EggVertexPool::operator [](int index) const; Returns NULL if there is no such vertex. Description: Returns the vertex in the pool with the indicated index number, or NULL if no vertices have that index number. |
removeUnusedVertices int EggVertexPool::remove_unused_vertices(void); Description: Removes all vertices from the pool that are not referenced by at least one primitive. Also collapses together equivalent vertices, and renumbers all vertices after the operation so their indices are consecutive, beginning at zero. Returns the number of vertices removed. |
removeVertex void EggVertexPool::remove_vertex(EggVertex *vertex); Description: Removes the vertex from the pool. It is an error if the vertex is not already a member of the pool. |
setHighestIndex void EggVertexPool::set_highest_index(int highest_index); Returns 0 if the pool is empty. Description: Artificially changes the "highest index number", so that a newly created vertex will begin at this number plus 1. This can be used to default a vertex pool to start counting at 1 (or any other index number), instead of the default of 0. Use with caution. |
transform void EggVertexPool::transform(LMatrix4d const &mat); Description: Applies the indicated transformation matrix to all the vertices. However, vertices that are attached to primitives that believe their vertices are in a local coordinate system are transformed only by the scale and rotation component. If a vertex happens to be attached both to a local and a global primitive, and the transformation includes a translation component, the vertex will be split. |
applyTexmats void EggNode::apply_texmats(void); Description: Applies the texture matrices to the UV's of the vertices that reference them, and then removes the texture matrices from the textures themselves. |
determineAlphaMode virtual EggRenderMode *EggNode::determine_alpha_mode(void); Description: Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this node that has an alpha_mode other than AM_unspecified. Returns a valid EggRenderMode pointer if one is found, or NULL otherwise. |
determineBin virtual EggRenderMode *EggNode::determine_bin(void); Description: Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this node that has a bin specified. Returns a valid EggRenderMode pointer if one is found, or NULL otherwise. |
determineDecal virtual bool EggNode::determine_decal(void); Description: Walks back up the hierarchy, looking for an EggGroup at this level or above that has the "decal" flag set. Returns the value of the decal flag if it is found, or false if it is not. In other words, returns true if the "decal" flag is in effect for the indicated node, false otherwise. |
determineDepthTestMode virtual EggRenderMode *EggNode::determine_depth_test_mode(void); Description: Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this node that has a depth_test_mode other than DTM_unspecified. Returns a valid EggRenderMode pointer if one is found, or NULL otherwise. |
determineDepthWriteMode virtual EggRenderMode *EggNode::determine_depth_write_mode(void); Description: Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this node that has a depth_write_mode other than DWM_unspecified. Returns a valid EggRenderMode pointer if one is found, or NULL otherwise. |
determineDrawOrder virtual EggRenderMode *EggNode::determine_draw_order(void); Description: Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this node that has a draw_order specified. Returns a valid EggRenderMode pointer if one is found, or NULL otherwise. |
determineIndexed virtual bool EggNode::determine_indexed(void); Description: Walks back up the hierarchy, looking for an EggGroup at this level or above that has the "indexed" scalar set. Returns the value of the indexed scalar if it is found, or false if it is not. In other words, returns true if the "indexed" flag is in effect for the indicated node, false otherwise. |
determineVisibilityMode virtual EggRenderMode *EggNode::determine_visibility_mode(void); Description: Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this node that has a visibility_mode other than VM_unspecified. Returns a valid EggRenderMode pointer if one is found, or NULL otherwise. |
flattenTransforms void EggNode::flatten_transforms(void); Description: Removes any transform and instance records from this node in the scene graph and below. If an instance node is encountered, removes the instance and applies the transform to its vertices, duplicating vertices if necessary. Since this function may result in duplicated vertices, it may be a good idea to call remove_unused_vertices() after calling this. |
getClassType static TypeHandle EggNode::get_class_type(void); Undocumented function. |
getDepth int EggNode::get_depth(void) const; Description: Returns the number of nodes above this node in the egg hierarchy. |
getNodeFrame LMatrix4d const &EggNode::get_node_frame(void) const; Description: Returns the coordinate frame of the node itself. This is simply the net product of all transformations up to the root. |
getNodeFrameInv LMatrix4d const &EggNode::get_node_frame_inv(void) const; Description: Returns the inverse of the matrix returned by get_node_frame(). See get_node_frame(). |
getNodeFrameInvPtr LMatrix4d const *EggNode::get_node_frame_inv_ptr(void) const; Description: Returns either a NULL pointer or a unique pointer shared by nodes with the same get_node_frame_inv() matrix. |
getNodeFramePtr LMatrix4d const *EggNode::get_node_frame_ptr(void) const; Description: Returns either a NULL pointer or a unique pointer shared by nodes with the same get_node_frame() matrix. |
getNodeToVertex LMatrix4d const &EggNode::get_node_to_vertex(void) const; Description: Returns the transformation matrix suitable for converting vertices in the coordinate space of the node to the appropriate coordinate space for storing in the egg file. This is the same thing as: get_node_frame() * get_vertex_frame_inv() |
getNodeToVertexPtr LMatrix4d const *EggNode::get_node_to_vertex_ptr(void) const; Description: Returns either a NULL pointer or a unique pointer shared by nodes with the same get_node_to_vertex() matrix. |
getParent EggGroupNode *EggNode::get_parent(void) const; Description: |
getVertexFrame LMatrix4d const &EggNode::get_vertex_frame(void) const; Description: Returns the coordinate frame of the vertices referenced by primitives at or under this node. This is not the same as get_node_frame(). Generally, vertices in an egg file are stored in the global coordinate space, regardless of the transforms defined at each node. Thus, get_vertex_frame() will usually return the identity transform (global coordinate space). However, primitives under an <Instance> entry reference their vertices in the coordinate system under effect at the time of the <Instance>. Thus, nodes under an <Instance> entry may return this non-identity matrix. Specifically, this may return a non-identity matrix only if is_local_coord() is true. |
getVertexFrameInv LMatrix4d const &EggNode::get_vertex_frame_inv(void) const; Description: Returns the inverse of the matrix returned by get_vertex_frame(). See get_vertex_frame(). |
getVertexFrameInvPtr LMatrix4d const *EggNode::get_vertex_frame_inv_ptr(void) const; Description: Returns either a NULL pointer or a unique pointer shared by nodes with the same get_vertex_frame_inv() matrix. |
getVertexFramePtr LMatrix4d const *EggNode::get_vertex_frame_ptr(void) const; Description: Returns either a NULL pointer or a unique pointer shared by nodes with the same get_vertex_frame() matrix. |
getVertexToNode LMatrix4d const &EggNode::get_vertex_to_node(void) const; Description: Returns the transformation matrix suitable for converting the vertices as read from the egg file into the coordinate space of the node. This is the same thing as: get_vertex_frame() * get_node_frame_inv() |
getVertexToNodePtr LMatrix4d const *EggNode::get_vertex_to_node_ptr(void) const; Description: Returns either a NULL pointer or a unique pointer shared by nodes with the same get_vertex_to_node() matrix. |
isAnimMatrix virtual bool EggNode::is_anim_matrix(void) const; Description: Returns true if this node represents a table of animation transformation data, false otherwise. |
isJoint virtual bool EggNode::is_joint(void) const; Description: Returns true if this particular node represents a <Joint> entry or not. This is a handy thing to know since Joints are sorted to the end of their sibling list when writing an egg file. See EggGroupNode::write(). |
isLocalCoord bool EggNode::is_local_coord(void) const; Description: Returns true if this node's vertices are not in the global coordinate space. This will be the case if there was an <Instance> node under a transform at or above this node. |
isUnderInstance bool EggNode::is_under_instance(void) const; Description: Returns true if there is an <Instance> node somewhere in the egg tree at or above this node, false otherwise. |
isUnderTransform bool EggNode::is_under_transform(void) const; Description: Returns true if there is a <Transform> entry somewhere in the egg tree at or above this node, false otherwise. |
operator = EggNode &EggNode::operator =(EggNode const ©); Description: |
parseEgg bool EggNode::parse_egg(string const &egg_syntax); Description: Parses the egg syntax given in the indicate string as if it had been read from the egg file within this object's definition. Updates the object accordingly. Returns true if successful, false if there was some parse error or if the object does not support this functionality. |
testUnderIntegrity void EggNode::test_under_integrity(void) const; Description: Recursively checks the integrity of the _under_flags, _parent, and _depth members of this node and all of its ancestors. |
transform void EggNode::transform(LMatrix4d const &mat); Description: Applies the indicated transformation to the node and all of its descendants. |
transformVerticesOnly void EggNode::transform_vertices_only(LMatrix4d const &mat); Description: Applies the indicated transformation only to vertices that appear in global space within vertex pools at this node and below. Joints and other transforms are not affected, nor are local vertices. |
write virtual void EggNode::write(ostream &out, int indent_level) const = 0; Undocumented function. |
getClassType static TypeHandle EggNamedObject::get_class_type(void); Undocumented function. |
operator = EggNamedObject &EggNamedObject::operator =(EggNamedObject const ©); Description: |
output void EggNamedObject::output(ostream &out) const; Description: |
clearUserData void EggObject::clear_user_data(void); Description: Removes *all* user data pointers from the node. Description: Removes the user data pointer of the indicated type. |
getClassType static TypeHandle EggObject::get_class_type(void); Undocumented function. |
getUserData EggUserData *EggObject::get_user_data(void) const; Description: Returns the user data pointer most recently stored on this object, or NULL if nothing was previously stored. Description: Returns the user data pointer of the indicated type, if it exists, or NULL if it does not. |
hasUserData bool EggObject::has_user_data(void) const; Description: Returns true if a generic user data pointer has recently been set and not yet cleared, false otherwise. Description: Returns true if the user data pointer of the indicated type has been set, false otherwise. |
operator = EggObject &EggObject::operator =(EggObject const ©); Description: |
setUserData void EggObject::set_user_data(EggUserData *user_data); Description: Sets the user data associated with this object. This may be any EggUserData-derived object. The egg library will do nothing with this pointer, except to hold its reference count and return the pointer on request. The EggObject maintains multiple different EggUserData pointers, one for each unique type (as reported by get_type()). If you know that only one type of EggUserData object will be added in your application, you may use the query functions that accept no parameters, but it is recommended that in general you pass in the type of your particular user data, to allow multiple applications to coexist in the same egg data. This pointer is also copied by the copy assignment operator and copy constructor. |
getClassType static TypeHandle TypedReferenceCount::get_class_type(void); Undocumented function. |
getBestParentFromSet int TypedObject::get_best_parent_from_Set(set< int > const &) const; Description: Returns true if the current object is the indicated type exactly. |
getClassType static TypeHandle TypedObject::get_class_type(void); Undocumented function. |
getType virtual TypeHandle TypedObject::get_type(void) const = 0; Derived classes should override this function to return get_class_type(). |
getTypeIndex int TypedObject::get_type_index(void) const; Description: 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(). |
isExactType bool TypedObject::is_exact_type(TypeHandle handle) const; Description: Returns true if the current object is the indicated type exactly. |
isOfType bool TypedObject::is_of_type(TypeHandle handle) const; Description: Returns true if the current object is or derives from the indicated type. |
getClassType static TypeHandle ReferenceCount::get_class_type(void); Undocumented function. |
getRefCount int ReferenceCount::get_ref_count(void) const; Description: Returns the current reference count. |
ref int ReferenceCount::ref(void) const; Description: 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. |
testRefCountIntegrity bool ReferenceCount::test_ref_count_integrity(void) const; Description: Does some easy checks to make sure that the reference count isn't completely bogus. Returns true if ok, false otherwise. |
unref int ReferenceCount::unref(void) const; Description: 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. |
clearName void Namable::clear_name(void); Description: Resets the Namable's name to empty. |
getClassType static TypeHandle Namable::get_class_type(void); Undocumented function. |
getName string const &Namable::get_name(void) const; Description: |
hasName bool Namable::has_name(void) const; Description: Returns true if the Namable has a nonempty name set, false if the name is empty. |
operator = Namable &Namable::operator =(Namable const &other); Description: |
output void Namable::output(ostream &out) const; In the absence of any definition to the contrary, outputting a Namable will write out its name. Description: Outputs the Namable. This function simply writes the name to the output stream; most Namable derivatives will probably redefine this. |
setName void Namable::set_name(string const &name); Description: |