# EggData

from pandac.PandaModules import EggData

Class : EggData
Description : This is the primary interface into all the egg data, and the root of the egg file structure. An EggData structure corresponds exactly with an egg file on the disk.
The EggData class inherits from EggGroupNode its collection of children, which are accessed by using the EggData itself as an STL container with begin() and end() calls. The children of the EggData class are the toplevel nodes in the egg file.

## Inheritance:

EggData: EggGroupNode
EggGroupNode: EggNode
EggNode: EggNamedObject
EggNamedObject: EggObject Namable
EggObject: TypedReferenceCount
TypedReferenceCount: TypedObject ReferenceCount
TypedObject: MemoryBase
MemoryBase:
ReferenceCount: MemoryBase
Namable:

## Methods of EggData:

collapseEquivalentMaterials
collapseEquivalentTextures
getAutoResolveExternals
getClassType
getCoordinateSystem
getEggFilename
loadExternals
merge
operator =
originalHadAbsolutePathnames
read
recomputePolygonNormals
recomputeVertexNormals
resolveEggFilename
setAutoResolveExternals
setCoordinateSystem
setEggFilename
stripNormals
writeEgg

## Methods of EggGroupNode:

addChild
applyFirstAttribute
applyLastAttribute
clear
clearConnectedShading
empty
findChild
forceFilenames
getClassType
getConnectedShading
getFirstChild
getNextChild
hasAbsolutePathnames
isRight
meshTriangles
operator =
postApplyFlatAttribute
recomputePolygonNormals
recomputeTangentBinormal
recomputeTangentBinormalAuto
recomputeVertexNormals
removeChild
removeInvalidPrimitives
removeUnusedVertices
renameNodes
resolveFilenames
reverseVertexOrdering
size
stealChildren
stripNormals
triangulatePolygons
unifyAttributes

## Methods of EggNode:

applyTexmats
determineAlphaMode
determineBin
determineDecal
determineDepthTestMode
determineDepthWriteMode
determineDrawOrder
determineIndexed
determineVisibilityMode
flattenTransforms
getClassType
getDepth
getNodeFrame
getNodeFrameInv
getNodeFrameInvPtr
getNodeFramePtr
getNodeToVertex
getNodeToVertexPtr
getParent
getVertexFrame
getVertexFrameInv
getVertexFrameInvPtr
getVertexFramePtr
getVertexToNode
getVertexToNodePtr
isAnimMatrix
isJoint
isLocalCoord
isUnderInstance
isUnderTransform
operator =
parseEgg
renameNode
testUnderIntegrity
transform
transformVerticesOnly
write

## Methods of EggNamedObject:

getClassType
operator =
output

## Methods of EggObject:

clearUserData
getClassType
getUserData
hasUserData
operator =
setUserData

## Methods of TypedReferenceCount:

getClassType

## Methods of TypedObject:

getClassType
getType
getTypeIndex
isExactType
isOfType

## Methods of ReferenceCount:

getClassType
getRefCount
ref
testRefCountIntegrity
testRefCountNonzero
unref

## Methods of Namable:

clearName
getClassType
getName
hasName
operator =
output
setName

## Constants in EggGroupNode:

TPolygon | (TriangulateFlags)
TConvex | (TriangulateFlags)
TComposite | (TriangulateFlags)
TRecurse | (TriangulateFlags)
TFlatShaded | (TriangulateFlags)

collapseEquivalentMaterials int EggData::collapse_equivalent_materials(void); Description: Removes duplicate references to the same material with the same properties. Considers two material references with identical properties, but different mref names, to be equivalent, and collapses them, choosing one mref name to keep arbitrarily. Returns the number of materials removed.

collapseEquivalentTextures int EggData::collapse_equivalent_textures(void); Description: Removes duplicate references to the same texture image with the same properties. Considers two texture references with identical properties, but different tref names, to be equivalent, and collapses them, choosing one tref name to keep arbitrarily. Returns the number of textures removed.

getAutoResolveExternals bool EggData::get_auto_resolve_externals(void) const; Description: Indicates whether the EggData object will automatically resolve any external references when read() is called. The default is false.

getClassType static TypeHandle EggData::get_class_type(void); Undocumented function.

getCoordinateSystem CoordinateSystem EggData::get_coordinate_system(void) const; Description: Returns the coordinate system in which the egg file is defined.

getEggFilename Filename const &EggData::get_egg_filename(void) const; Description: Returns the directory in which the egg file is considered to reside.

loadExternals bool EggData::load_externals(DSearchPath const &searchpath = ((()))); Description: Loads up all the egg files referenced by <File> entries within the egg structure, and inserts their contents in place of the <File> entries. Searches for files in the searchpath, if not found directly, and writes error messages to the indicated output stream. Returns true if all externals were loaded successfully, false otherwise.

merge void EggData::merge(EggData &other); Description: Appends the other egg structure to the end of this one. The other egg structure is invalidated.

operator = EggData &EggData::operator =(EggData const &copy); Description:

originalHadAbsolutePathnames bool EggData::original_had_absolute_pathnames(void) const; Description: Returns true if the data processed in the last call to read() contained absolute pathnames, or false if those pathnames were all relative. This method is necessary because if auto_resolve_externals() is in effect, it may modify the pathnames to be absolute whether or not they were as loaded from disk. This method can be used to query the state of the original egg file from disk.

read bool EggData::read(Filename filename, string display_name = ((string()))); Description: Opens the indicated filename and reads the egg data contents from it. Returns true if the file was successfully opened and read, false if there were some errors, in which case the data may be partially read. error is the output stream to which to write error messages. Description: Parses the egg syntax contained in the indicated input stream. Returns true if the stream was a completely valid egg file, false if there were some errors, in which case the data may be partially read. Before you call this routine, you should probably call set_egg_filename() to set the name of the egg file we're processing, if at all possible. If there is no such filename, you may set it to the empty string.

recomputePolygonNormals void EggData::recompute_polygon_normals(void); Description: Recomputes all the polygon normals for polygon geometry at this group node and below so that they accurately reflect the vertex positions. Normals are removed from the vertices and defined only on polygons, giving the geometry a faceted appearance. This function also removes degenerate polygons that do not have enough vertices to define a normal. It does not affect normals for other kinds of primitives like Nurbs or Points. This function does not remove or adjust vertices in the vertex pool; it only adds new vertices with the normals removed. Thus, it is a good idea to call remove_unused_vertices() after calling this.

recomputeVertexNormals void EggData::recompute_vertex_normals(double threshold); Description: Recomputes all the vertex normals for polygon geometry at this group node and below so that they accurately reflect the vertex positions. A shared edge between two polygons (even in different groups) is considered smooth if the angle between the two edges is less than threshold degrees. This function also removes degenerate polygons that do not have enough vertices to define a normal. It does not affect normals for other kinds of primitives like Nurbs or Points. This function does not remove or adjust vertices in the vertex pool; it only adds new vertices with the correct normals. Thus, it is a good idea to call remove_unused_vertices() after calling this.

resolveEggFilename static bool EggData::resolve_egg_filename(Filename &egg_filename, DSearchPath const &searchpath = ((()))); Description: Looks for the indicated filename, first along the indicated searchpath, and then along the egg_path and finally along the model_path. If found, updates the filename to the full path and returns true; otherwise, returns false.

setAutoResolveExternals void EggData::set_auto_resolve_externals(bool resolve); Description: Indicates whether the EggData object will automatically resolve any external references when read() is called. The default is false.

setCoordinateSystem void EggData::set_coordinate_system(CoordinateSystem coordsys); Description: Changes the coordinate system of the EggData. If the coordinate system was previously different, this may result in a conversion of the data.

setEggFilename void EggData::set_egg_filename(Filename const &egg_filenamea); Description: Sets the filename--especially the directory part--in which the egg file is considered to reside. This is also implicitly set by read().

stripNormals void EggData::strip_normals(void); Description: Removes all normals from primitives, and the vertices they reference, at this node and below. This function does not remove or adjust vertices in the vertex pool; it only adds new vertices with the normal removed. Thus, it is a good idea to call remove_unused_vertices() after calling this.

writeEgg bool EggData::write_egg(Filename filename); Description: The main interface for writing complete egg files.

addChild EggNode *EggGroupNode::add_child(EggNode *node); Description: Adds the indicated child to the group and returns it. If the child node is already a child of some other node, removes it first.

applyFirstAttribute void EggGroupNode::apply_first_attribute(bool recurse); Description: Sets the first vertex of the triangle (or each component) to the primitive normal and/or color, if the primitive is flat-shaded. This reflects the DirectX convention of storing flat-shaded properties on the first vertex, although it is not usually a convention in Egg. This may create redundant vertices in the vertex pool, so it may be a good idea to follow this up with remove_unused_vertices().

applyLastAttribute void EggGroupNode::apply_last_attribute(bool recurse); Description: Sets the last vertex of the triangle (or each component) to the primitive normal and/or color, if the primitive is flat-shaded. This reflects the OpenGL convention of storing flat-shaded properties on the last vertex, although it is not usually a convention in Egg. This may create redundant vertices in the vertex pool, so it may be a good idea to follow this up with remove_unused_vertices().

clear void EggGroupNode::clear(void); Description:

clearConnectedShading void EggGroupNode::clear_connected_shading(void); Description: Resets the connected_shading information on all primitives at this node and below, so that it may be accurately rederived by the next call to get_connected_shading(). It may be a good idea to call remove_unused_vertices() as well, to establish the correct connectivity between common vertices.

empty bool EggGroupNode::empty(void) const; Description:

findChild EggNode *EggGroupNode::find_child(string const &name) const; Description: Returns the child of this node whose name is the indicated string, or NULL if there is no child of this node by that name. Does not search recursively.

forceFilenames void EggGroupNode::force_filenames(Filename const &directory); Description: Similar to resolve_filenames, but each non-absolute filename encountered is arbitrarily taken to be in the indicated directory, whether or not the so-named filename exists.

getClassType static TypeHandle EggGroupNode::get_class_type(void); Undocumented function.

getConnectedShading void EggGroupNode::get_connected_shading(void); Description: Queries the connected_shading information on all primitives at this node and below, to ensure that it has been completely filled in before we start mucking around with vertices.

getFirstChild EggNode *EggGroupNode::get_first_child(void); This is an alternate way to traverse the list of children. It is mainly provided for scripting code, which can't use the iterators defined above (they don't export through interrogate very well). These are, of course, non-thread-safe. Description: Returns the first child in the group's list of children, or NULL if the list of children is empty. Can be used with get_next_child() to return the complete list of children without using the iterator class; however, this is non-thread-safe, and so is not recommended except for languages other than C++ which cannot use the iterators.

getNextChild EggNode *EggGroupNode::get_next_child(void); This is an alternate way to traverse the list of children. It is mainly provided for scripting code, which can't use the iterators defined above (they don't export through interrogate very well). These are, of course, non-thread-safe. Description: Returns the next child in the group's list of children since the last call to get_first_child() or get_next_child(), or NULL if the last child has been returned. Can be used with get_first_child() to return the complete list of children without using the iterator class; however, this is non-thread-safe, and so is not recommended except for languages other than C++ which cannot use the iterators. It is an error to call this without previously calling get_first_child().

hasAbsolutePathnames bool EggGroupNode::has_absolute_pathnames(void) const; Description: Returns true if any nodes at this level and below include a reference to a file via an absolute pathname, or false if all references are relative.

isRight static bool EggGroupNode::is_right(LVector2d const &v1, LVector2d const &v2); Filename: eggGroupNode.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 2-d v1 is to the right of v2.

meshTriangles void EggGroupNode::mesh_triangles(int flags); Description: Combine triangles together into triangle strips, at this group and below.

operator = EggGroupNode &EggGroupNode::operator =(EggGroupNode const &copy); Description:

postApplyFlatAttribute void EggGroupNode::post_apply_flat_attribute(bool recurse); Description: Intended as a followup to apply_last_attribute(), this also sets an attribute on the first vertices of the primitive, if they don't already have an attribute set, just so they end up with *something*.

recomputePolygonNormals void EggGroupNode::recompute_polygon_normals(CoordinateSystem cs = (CS_default)); Description: Recomputes all the polygon normals for polygon geometry at this group node and below so that they accurately reflect the vertex positions. Normals are removed from the vertices and defined only on polygons, giving the geometry a faceted appearance. This function also removes degenerate polygons that do not have enough vertices to define a normal. It does not affect normals for other kinds of primitives like Nurbs or Points. This function does not remove or adjust vertices in the vertex pool; it only adds new vertices with the normals removed. Thus, it is a good idea to call remove_unused_vertices() after calling this.

recomputeTangentBinormal bool EggGroupNode::recompute_tangent_binormal(GlobPattern const &uv_name); Description: This function recomputes the tangent and binormal for the named texture coordinate set for all vertices at this level and below. Use the empty string for the default texture coordinate set. It is necessary for each vertex to already have a normal (or at least a polygon normal), as well as a texture coordinate in the named texture coordinate set, before calling this function. You might precede this with recompute_vertex_normals() to ensure that the normals exist. Like recompute_vertex_normals(), this function does not remove or adjust vertices in the vertex pool; it only adds new vertices with the new tangents and binormals computed. Thus, it is a good idea to call remove_unused_vertices() after calling this. Description: This function recomputes the tangent and binormal for the named texture coordinate sets. Returns true if anything was done.

recomputeTangentBinormalAuto bool EggGroupNode::recompute_tangent_binormal_auto(void); Description: This function recomputes the tangent and binormal for any texture coordinate set that affects a normal map. Returns true if anything was done.

recomputeVertexNormals void EggGroupNode::recompute_vertex_normals(double threshold, CoordinateSystem cs = (CS_default)); Description: Recomputes all the vertex normals for polygon geometry at this group node and below so that they accurately reflect the vertex positions. A shared edge between two polygons (even in different groups) is considered smooth if the angle between the two edges is less than threshold degrees. This function also removes degenerate polygons that do not have enough vertices to define a normal. It does not affect normals for other kinds of primitives like Nurbs or Points. This function does not remove or adjust vertices in the vertex pool; it only adds new vertices with the correct normals. Thus, it is a good idea to call remove_unused_vertices() after calling this.

removeChild PointerTo< EggNode > EggGroupNode::remove_child(EggNode *node); Description: Removes the indicated child node from the group and returns it. If the child was not already in the group, does nothing and returns NULL.

removeInvalidPrimitives int EggGroupNode::remove_invalid_primitives(bool recurse); Description: Removes primitives at this level and below which appear to be degenerate; e.g. polygons with fewer than 3 vertices, etc. Returns the number of primitives removed.

removeUnusedVertices int EggGroupNode::remove_unused_vertices(bool recurse); Description: Removes all vertices from VertexPools within this group or below 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 total number of vertices removed. Note that this operates on the VertexPools within this group level, without respect to primitives that reference these vertices (unlike other functions like strip_normals()). It is therefore most useful to call this on the EggData root, rather than on a subgroup within the hierarchy, since a VertexPool may appear anywhere in the hierarchy.

renameNodes int EggGroupNode::rename_nodes(vector< string > strip_prefix, bool recurse); Description: Rename by stripping out the prefix

resolveFilenames void EggGroupNode::resolve_filenames(DSearchPath const &searchpath); Description: Walks the tree and attempts to resolve any filenames encountered. This looks up filenames in the search path, etc. It does not automatically search the egg_path for missing files.

reverseVertexOrdering void EggGroupNode::reverse_vertex_ordering(void); Description: Reverses the vertex ordering of all polygons defined at this node and below. Does not change the surface normals, if any.

size unsigned int EggGroupNode::size(void) const; Description:

stealChildren void EggGroupNode::steal_children(EggGroupNode &other); Description: Moves all the children from the other node to this one. This is especially useful because the group node copy assignment operator does not copy children.

stripNormals void EggGroupNode::strip_normals(void); Description: Removes all normals from primitives, and the vertices they reference, at this node and below. This function does not remove or adjust vertices in the vertex pool; it only adds new vertices with the normal removed. Thus, it is a good idea to call remove_unused_vertices() after calling this.

triangulatePolygons int EggGroupNode::triangulate_polygons(int flags); Description: Replace all higher-order polygons at this point in the scene graph and below with triangles. Returns the total number of new triangles produced, less degenerate polygons removed. If flags contains T_polygon and T_convex, both concave and convex polygons will be subdivided into triangles; with only T_polygon, only concave polygons will be subdivided, and convex polygons will be largely unchanged.

unifyAttributes void EggGroupNode::unify_attributes(bool use_connected_shading, bool allow_per_primitive, bool recurse); Description: Applies per-vertex normal and color to all vertices, if they are in fact per-vertex (and different for each vertex), or moves them to the primitive if they are all the same. After this call, either the primitive will have normals or its vertices will, but not both. Ditto for colors. If use_connected_shading is true, each polygon is considered in conjunction with all connected polygons; otherwise, each polygon is considered individually. If allow_per_primitive is false, S_per_face or S_overall will treated like S_per_vertex: normals and colors will always be assigned to the vertices. In this case, there will never be per-primitive colors or normals after this call returns. On the other hand, if allow_per_primitive is true, then S_per_face means that normals and colors should be assigned to the primitives, and removed from the vertices, as described above. This may create redundant vertices in the vertex pool, so it may be a good idea to follow this up with remove_unused_vertices().

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 &copy); 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.

renameNode int EggNode::rename_node(vector< string > strip_prefix); Description: Rename by stripping out the prefix

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 &copy); 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 &copy); 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.

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 void 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.

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.

testRefCountNonzero bool ReferenceCount::test_ref_count_nonzero(void) const; Description: Does some easy checks to make sure that the reference count isn't zero, or completely bogus. Returns true if ok, false otherwise.

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

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: