# EggCompositePrimitive

from pandac.PandaModules import EggCompositePrimitive

Class : EggCompositePrimitive
Description : The base class for primitives such as triangle strips and triangle fans, which include several component triangles, each of which might have its own color and/or normal.

## Inheritance:

EggCompositePrimitive: EggPrimitive
EggPrimitive: EggNode EggAttributes EggRenderMode
EggNode: EggNamedObject
EggNamedObject: EggObject Namable
EggObject: TypedReferenceCount
TypedReferenceCount: TypedObject ReferenceCount
TypedObject:
ReferenceCount:
Namable:
EggAttributes:
EggRenderMode:

## Methods of EggCompositePrimitive:

getClassType
getComponent
getNumComponents
operator =
setComponent
triangulateInPlace
triangulateInto

## Methods of EggPrimitive:

addTexture
addVertex
applyFirstAttribute
applyLastAttribute
cleanup
clear
clearConnectedShading
clearMaterial
clearTexture
copyAttributes
copyVertices
determineAlphaMode
determineBin
determineDepthTestMode
determineDepthWriteMode
determineDrawOrder
determineVisibilityMode
getBfaceFlag
getClassType
getConnectedShading
getMaterial
getNumTextures
getNumVertices
getPool
getShading
getSortName
getTexture
getVertex
hasMaterial
hasNormals
hasPrimitives
hasTexture
hasVertexColor
hasVertexNormal
jointHasPrimitives
operator =
postApplyFlatAttribute
removeDoubledVerts
removeNonuniqueVerts
removeVertex
reverseVertexOrdering
setBfaceFlag
setMaterial
setTexture
setVertex
testVrefIntegrity
unifyAttributes
write

## 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

## Methods of EggAttributes:

clearColor
clearNormal
compareTo
copyColor
copyNormal
getClassType
getColor
getNormal
hasColor
hasNormal
matchesColor
matchesNormal
operator =
setColor
setNormal
sortsLessThan
transform
write

## Methods of EggRenderMode:

clearBin
clearDrawOrder
getAlphaMode
getBin
getClassType
getDepthTestMode
getDepthWriteMode
getDrawOrder
getVisibilityMode
hasBin
hasDrawOrder
operator !=
operator <
operator =
operator ==
setAlphaMode
setBin
setDepthTestMode
setDepthWriteMode
setDrawOrder
setVisibilityMode
stringAlphaMode
stringDepthTestMode
stringDepthWriteMode
stringVisibilityMode
write

## Constants in EggPrimitive:

SUnknown | (Shading)
SOverall | (Shading)
SPerFace | (Shading)
SPerVertex | (Shading)

## Constants in EggRenderMode:

AMUnspecified | (AlphaMode)
AMOff | (AlphaMode)
AMOn | (AlphaMode)
AMBlend | (AlphaMode)
AMBlendNoOcclude | (AlphaMode)
AMMs | (AlphaMode)
AMMsMask | (AlphaMode)
AMBinary | (AlphaMode)
AMDual | (AlphaMode)
DWMUnspecified | (DepthWriteMode)
DWMOff | (DepthWriteMode)
DWMOn | (DepthWriteMode)
DTMUnspecified | (DepthTestMode)
DTMOff | (DepthTestMode)
DTMOn | (DepthTestMode)
VMUnspecified | (VisibilityMode)
VMHidden | (VisibilityMode)
VMNormal | (VisibilityMode)

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

getComponent EggAttributes const *EggCompositePrimitive::get_component(int i) const; Description: Returns the attributes for the nth component triangle.

getNumComponents int EggCompositePrimitive::get_num_components(void) const; Description: Returns the number of individual component triangles within the composite. Each one of these might have a different set of attributes.

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

setComponent void EggCompositePrimitive::set_component(int i, EggAttributes const *attrib); Description: Changes the attributes for the nth component triangle.

triangulateInPlace PointerTo< EggCompositePrimitive > EggCompositePrimitive::triangulate_in_place(void); Description: Subdivides the composite primitive into triangles and adds those triangles to the parent group node in place of the original primitive. Returns a pointer to the original primitive, which is likely about to be destructed. If convex_also is true, both concave and convex polygons will be subdivided into triangles; otherwise, only concave polygons will be subdivided, and convex polygons will be copied unchanged into the container.

triangulateInto bool EggCompositePrimitive::triangulate_into(EggGroupNode *container) const; Description: Subdivides the composite primitive into triangles and adds those triangles to the indicated container. Does not remove the primitive from its existing parent or modify it in any way. Returns true if the triangulation is successful, or false if there was some error (in which case the container may contain some partial triangulation).

addTexture void EggPrimitive::add_texture(EggTexture *texture); Description: Applies the indicated texture to the primitive. Note that, in the case of multiple textures being applied to a single primitive, the order in which the textures are applied does not affect the rendering order; use EggTexture::set_sort() to specify that.

addVertex EggVertex *EggPrimitive::add_vertex(EggVertex *vertex); Description: Adds the indicated vertex to the end of the primitive's list of vertices, and returns it.

applyFirstAttribute virtual void EggPrimitive::apply_first_attribute(void); 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 introduce redundant vertices to the vertex pool.

applyLastAttribute virtual void EggPrimitive::apply_last_attribute(void); 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 introduce redundant vertices to the vertex pool.

cleanup virtual bool EggPrimitive::cleanup(void); Description: Cleans up modeling errors in whatever context this makes sense. For instance, for a polygon, this calls remove_doubled_verts(true). For a point, it calls remove_nonunique_verts(). Returns true if the primitive is valid, or false if it is degenerate.

clear void EggPrimitive::clear(void); Description: Removes all of the vertices from the primitive.

clearConnectedShading void EggPrimitive::clear_connected_shading(void); Description: Resets the connected_shading member in this primitive, so that get_connected_shading() will recompute a new value.

clearMaterial void EggPrimitive::clear_material(void); Description: Removes any material from the primitive.

clearTexture void EggPrimitive::clear_texture(void); Description: Removes any texturing from the primitive.

copyAttributes void EggPrimitive::copy_attributes(EggAttributes const &other); Description: Copies the rendering attributes from the indicated primitive.

copyVertices void EggPrimitive::copy_vertices(EggPrimitive const &other); Description: Replaces the current primitive's list of vertices with a copy of the list of vertices on the other primitive.

determineAlphaMode virtual EggRenderMode *EggPrimitive::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 primitive that has an alpha_mode other than AM_unspecified. Returns a valid EggRenderMode pointer if one is found, or NULL otherwise.

determineBin virtual EggRenderMode *EggPrimitive::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 primitive that has a bin specified. Returns a valid EggRenderMode pointer if one is found, or NULL otherwise.

determineDepthTestMode virtual EggRenderMode *EggPrimitive::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 *EggPrimitive::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 *EggPrimitive::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 primitive that has a draw_order specified. Returns a valid EggRenderMode pointer if one is found, or NULL otherwise.

determineVisibilityMode virtual EggRenderMode *EggPrimitive::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.

getBfaceFlag bool EggPrimitive::get_bface_flag(void) const; Description: Retrieves the backfacing flag of the polygon. See set_bface_flag().

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

getConnectedShading EggPrimitive::Shading EggPrimitive::get_connected_shading(void) const; Description: Determines what sort of shading properties this primitive's connected neighbors have. To get the most accurate results, you should first call clear_connected_shading() on all connected primitives (or on all primitives in the egg file). It might also be a good idea to call remove_unused_vertices() to ensure proper connectivity. You may find it easiest to call these other methods on the EggData root node (they are defined on EggGroupNode).

getMaterial EggMaterial *EggPrimitive::get_material(void) const; Description: Returns a pointer to the applied material, or NULL if there is no material applied.

getNumTextures int EggPrimitive::get_num_textures(void) const; Description: Returns the number of textures applied to the primitive.

getNumVertices int EggPrimitive::get_num_vertices(void) const; These are shorthands if you don't want to use the iterators. Description:

getPool EggVertexPool *EggPrimitive::get_pool(void) const; Description: Returns the vertex pool associated with the vertices of the primitive, or NULL if the primitive has no vertices.

getShading virtual EggPrimitive::Shading EggPrimitive::get_shading(void) const; Description: Returns the shading properties apparent on this particular primitive. This returns S_per_vertex if the vertices have colors or normals (and they are not all the same values), or for a simple primitive, S_overall otherwise. A composite primitive may also return S_per_face if the individual component primitives have colors or normals that are not all the same values. To get the most accurate results, you should call clear_shading() on all connected primitives (or on all primitives in the egg file), followed by get_shading() on each primitive. You may find it easiest to call these methods on the EggData root node (they are defined on EggGroupNode).

getSortName string EggPrimitive::get_sort_name(void) const; Description: Returns the name of the primitive for the purposes of sorting primitives into different groups, if there is one. Presently, this is defined as the primitive name itself, unless it begins with a digit.

getTexture EggTexture *EggPrimitive::get_texture(void) const; Description: Returns the first texture on the primitive, if any, or NULL if there are no textures on the primitive. This method is deprecated and is used in support of single-texturing only. New code should be written to use the multitexture variants instead. Description: Returns the nth texture that has been applied to the primitive.

getVertex EggVertex *EggPrimitive::get_vertex(int index) const; Description: Returns a particular index based on its index number.

hasMaterial bool EggPrimitive::has_material(void) const; Description: Returns true if the primitive is materiald (and get_material() will return a real pointer), false otherwise (and get_material() will return NULL).

hasNormals virtual bool EggPrimitive::has_normals(void) const; Description: Returns true if any of the primitives (e.g. polygons) defined within this group or below have either face or vertex normals defined, false otherwise.

hasPrimitives virtual bool EggPrimitive::has_primitives(void) const; Description: Returns true if there are any primitives (e.g. polygons) defined within this group or below, false otherwise.

hasTexture bool EggPrimitive::has_texture(void) const; Description: Returns true if the primitive has any textures specified, false otherwise. This method is deprecated and is used in support of single-texturing only. New code should be written to use the multitexture variants instead. Description: Returns true if the primitive has the particular indicated texture, false otherwise.

hasVertexColor bool EggPrimitive::has_vertex_color(void) const; Description: Returns true if any vertex on the primitive has a specific color set, false otherwise. If you call unify_attributes() first, this will also return false even if all the vertices were set to the same value (since unify_attributes() removes redundant vertex properties).

hasVertexNormal bool EggPrimitive::has_vertex_normal(void) const; Description: Returns true if any vertex on the primitive has a specific normal set, false otherwise. If you call unify_attributes() first, this will also return false even if all the vertices were set to the same value (since unify_attributes() removes redundant vertex properties).

jointHasPrimitives virtual bool EggPrimitive::joint_has_primitives(void) const; Description: Returns true if there are any primitives (e.g. polygons) defined within this group or below, but the search does not include nested joints.

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

postApplyFlatAttribute virtual void EggPrimitive::post_apply_flat_attribute(void); 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*.

removeDoubledVerts void EggPrimitive::remove_doubled_verts(bool closed); Description: Certain kinds of primitives, particularly polygons, don't like to have the same vertex repeated consecutively. Unfortunately, some modeling programs (like MultiGen) make this an easy mistake to make. It's handy to have a function to remove these redundant vertices. If closed is true, it also checks that the first and last vertices are not the same. This function identifies repeated vertices by position only; it does not consider any other properties, such as color or UV, significant in differentiating vertices.

removeNonuniqueVerts void EggPrimitive::remove_nonunique_verts(void); Description: Removes any multiple appearances of the same vertex from the primitive. This primarily makes sense for a point primitive, which is really a collection of points and which doesn't make sense to include the same point twice, in any order.

removeVertex EggVertex *EggPrimitive::remove_vertex(EggVertex *vertex); Description: Removes the indicated vertex from the primitive and returns it. If the vertex was not already in the primitive, does nothing and returns NULL.

reverseVertexOrdering virtual void EggPrimitive::reverse_vertex_ordering(void); Description: Reverses the ordering of the vertices in this primitive, if appropriate, in order to change the direction the polygon appears to be facing. Does not adjust the surface normal, if any.

setBfaceFlag void EggPrimitive::set_bface_flag(bool flag); Description: Sets the backfacing flag of the polygon. If this is true, the polygon will be rendered so that both faces are visible; if it is false, only the front face of the polygon will be visible.

setMaterial void EggPrimitive::set_material(EggMaterial *material); Description: Applies the indicated material to the primitive.

setTexture void EggPrimitive::set_texture(EggTexture *texture); Description: Replaces the current list of textures with the indicated texture. This method is deprecated and is used in support of single-texturing only. New code should be written to use the multitexture variants instead.q

setVertex void EggPrimitive::set_vertex(int index, EggVertex *vertex); These are shorthands if you don't want to use the iterators. Description: Replaces a particular vertex based on its index number in the list of vertices. This is just a convenience function for people who don't want to mess with the iterators.

testVrefIntegrity void EggPrimitive::test_vref_integrity(void) const; Description: Verifies that each vertex in the primitive exists and that it knows it is referenced by the primitive.

unifyAttributes virtual void EggPrimitive::unify_attributes(EggPrimitive::Shading shading); Description: If the shading property is S_per_vertex, ensures that all vertices have a normal and a color, and the overall primitive does not. If the shading property is S_per_face, and this is a composite primitive, ensures that all components have a normal and a color, and the vertices and overall primitive do not. (If this is a simple primitive, S_per_face works the same as S_overall, below). If the shading property is S_overall, ensures that no vertices or components have a normal or a color, and the overall primitive does (if any exists at all). After this call, either the primitive will have normals or its vertices will, but not both. Ditto for colors. This may create redundant vertices in the vertex pool.

write virtual void EggPrimitive::write(ostream &out, int indent_level) const = 0; Undocumented function.

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:

clearColor void EggAttributes::clear_color(void); Description:

clearNormal void EggAttributes::clear_normal(void); Description:

compareTo int EggAttributes::compare_to(EggAttributes const &other) const; Description: An ordering operator to compare two vertices for sorting order. This imposes an arbitrary ordering useful to identify unique vertices.

copyColor void EggAttributes::copy_color(EggAttributes const &other); Description: Sets this color to be the same as the other's, include morphs. If the other has no color, this clears the color.

copyNormal void EggAttributes::copy_normal(EggAttributes const &other); Description: Sets this normal to be the same as the other's, include morphs. If the other has no normal, this clears the normal.

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

getColor LVecBase4f EggAttributes::get_color(void) const; Description: Returns the color set on this particular attribute. If there is no color set, returns white.

getNormal LVector3d const &EggAttributes::get_normal(void) const; Description:

hasColor bool EggAttributes::has_color(void) const; Description:

hasNormal bool EggAttributes::has_normal(void) const; Filename: eggAttributes.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:

matchesColor bool EggAttributes::matches_color(EggAttributes const &other) const; Description: Returns true if this color matches that of the other EggAttributes object, include the morph list.

matchesNormal bool EggAttributes::matches_normal(EggAttributes const &other) const; Description: Returns true if this normal matches that of the other EggAttributes object, include the morph list.

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

setColor void EggAttributes::set_color(LVecBase4f const &Color); Description:

setNormal void EggAttributes::set_normal(LVector3d const &normal); Description:

sortsLessThan bool EggAttributes::sorts_less_than(EggAttributes const &other) const; Description: An ordering operator to compare two vertices for sorting order. This imposes an arbitrary ordering useful to identify unique vertices.

transform void EggAttributes::transform(LMatrix4d const &mat); Description: Applies the indicated transformation matrix to the attributes.

write void EggAttributes::write(ostream &out, int indent_level) const; Description: Writes the attributes to the indicated output stream in Egg format.

clearBin void EggRenderMode::clear_bin(void); Description: Removes the bin name that was set for this particular object. See set_bin().

clearDrawOrder void EggRenderMode::clear_draw_order(void); Description: Removes the draw-order flag from this particular object. See set_draw_order().

getAlphaMode EggRenderMode::AlphaMode EggRenderMode::get_alpha_mode(void) const; Description: Returns the alpha mode that was set, or AM_unspecified if nothing was set. See set_alpha_mode().

getBin string EggRenderMode::get_bin(void) const; Description: Returns the bin name that has been set for this particular object, if any. See set_bin().

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

getDepthTestMode EggRenderMode::DepthTestMode EggRenderMode::get_depth_test_mode(void) const; Description: Returns the depth_test mode that was set, or DTM_unspecified if nothing was set. See set_depth_test_mode().

getDepthWriteMode EggRenderMode::DepthWriteMode EggRenderMode::get_depth_write_mode(void) const; Description: Returns the depth_write mode that was set, or DWM_unspecified if nothing was set. See set_depth_write_mode().

getDrawOrder int EggRenderMode::get_draw_order(void) const; Description: Returns the "draw-order" flag as set for this particular object. See set_draw_order().

getVisibilityMode EggRenderMode::VisibilityMode EggRenderMode::get_visibility_mode(void) const; Description: Returns the visibility mode that was set, or VM_unspecified if nothing was set. See set_visibility_mode().

hasBin bool EggRenderMode::has_bin(void) const; Description: Returns true if a bin name has been set for this particular object. See set_bin().

hasDrawOrder bool EggRenderMode::has_draw_order(void) const; Description: Returns true if the draw-order flag has been set for this particular object. See set_draw_order().

operator != bool EggRenderMode::operator !=(EggRenderMode const &other) const; Comparison operators are handy. Description:

operator < bool EggRenderMode::operator <(EggRenderMode const &other) const; Description:

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

operator == bool EggRenderMode::operator ==(EggRenderMode const &other) const; Comparison operators are handy. Description:

setAlphaMode void EggRenderMode::set_alpha_mode(EggRenderMode::AlphaMode mode); Description: Specifies precisely how the transparency for this geometry should be achieved, or if it should be used. The default, AM_unspecified, is to use transparency if the geometry has a color whose alpha value is non-1, or if it has a four-channel texture applied; otherwise, AM_on forces transparency on, and AM_off forces it off. The other flavors of transparency are specific ways to turn on transparency, which may or may not be supported by a particular rendering backend.

setBin void EggRenderMode::set_bin(string const &bin); Description: Sets the "bin" string for this particular object. This names a particular bin in which the object should be rendered. The exact meaning of a bin is implementation defined, but generally a GeomBin matching each bin name must also be specifically added to the rendering engine (e.g. the CullTraverser) in use for this to work. See also set_draw_order().

setDepthTestMode void EggRenderMode::set_depth_test_mode(EggRenderMode::DepthTestMode mode); Description: Specifies whether this geometry should be tested against the depth buffer when it is drawn (assuming the rendering backend provides a depth buffer). Note that this is different, and independent from, the depth_write mode.

setDepthWriteMode void EggRenderMode::set_depth_write_mode(EggRenderMode::DepthWriteMode mode); Description: Specifies whether writes should be made to the depth buffer (assuming the rendering backend provides a depth buffer) when rendering this geometry.

setDrawOrder void EggRenderMode::set_draw_order(int order); Description: Sets the "draw-order" flag associated with this object. This specifies a particular order in which objects of this type should be drawn, within the specified bin. If a bin is not explicitly specified, "fixed" is used. See also set_bin().

setVisibilityMode void EggRenderMode::set_visibility_mode(EggRenderMode::VisibilityMode mode); Description: Specifies whether this geometry is to be considered normally visible, or hidden. If it is hidden, it is either not loaded into the scene graph at all, or loaded as a "stashed" node, according to the setting of egg-suppress-hidden.

stringAlphaMode static EggRenderMode::AlphaMode EggRenderMode::string_alpha_mode(string const &string); Description: Returns the AlphaMode value associated with the given string representation, or AM_unspecified if the string does not match any known AlphaMode value.

stringDepthTestMode static EggRenderMode::DepthTestMode EggRenderMode::string_depth_test_mode(string const &string); Description: Returns the DepthTestMode value associated with the given string representation, or DTM_unspecified if the string does not match any known DepthTestMode value.

stringDepthWriteMode static EggRenderMode::DepthWriteMode EggRenderMode::string_depth_write_mode(string const &string); Description: Returns the DepthWriteMode value associated with the given string representation, or DWM_unspecified if the string does not match any known DepthWriteMode value.

stringVisibilityMode static EggRenderMode::VisibilityMode EggRenderMode::string_visibility_mode(string const &string); Description: Returns the HiddenMode value associated with the given string representation, or VM_unspecified if the string does not match any known HiddenMode value.

write void EggRenderMode::write(ostream &out, int indent_level) const; Description: Writes the attributes to the indicated output stream in Egg format.