Panda3D
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes

EggBin Class Reference

A type of group node that holds related subnodes. More...

Inheritance diagram for EggBin:
EggGroup EggGroupNode EggRenderMode EggTransform EggNode EggNamedObject EggObject

List of all members.

Public Types

enum  AlphaMode {
  AMUnspecified = 0, AMOff = 1, AMOn = 2, AMBlend = 3,
  AMBlendNoOcclude = 4, AMMs = 5, AMMsMask = 6, AMBinary = 7,
  AMDual = 8
}
enum  BillboardType { BTNone = 0, BTAxis = 32, BTPointCameraRelative = 64, BTPointWorldRelative = 128 }
enum  BlendMode {
  BMUnspecified = 0, BMNone = 1, BMAdd = 2, BMSubtract = 3,
  BMInvSubtract = 4, BMMin = 5, BMMax = 6
}
enum  BlendOperand {
  BOUnspecified = 0, BOZero = 1, BOOne = 2, BOIncomingColor = 3,
  BOOneMinusIncomingColor = 4, BOFbufferColor = 5, BOOneMinusFbufferColor = 6, BOIncomingAlpha = 7,
  BOOneMinusIncomingAlpha = 8, BOFbufferAlpha = 9, BOOneMinusFbufferAlpha = 10, BOConstantColor = 11,
  BOOneMinusConstantColor = 12, BOConstantAlpha = 13, BOOneMinusConstantAlpha = 14, BOIncomingColorSaturate = 15,
  BOColorScale = 16, BOOneMinusColorScale = 17, BOAlphaScale = 18, BOOneMinusAlphaScale = 19
}
enum  CollideFlags {
  CFNone = 0, CFDescend = 1048576, CFEvent = 2097152, CFKeep = 4194304,
  CFSolid = 8388608, CFCenter = 16777216, CFTurnstile = 33554432, CFLevel = 67108864,
  CFIntangible = 134217728
}
enum  CollisionSolidType {
  CSTNone = 0, CSTPlane = 65536, CSTPolygon = 131072, CSTPolyset = 196608,
  CSTSphere = 262144, CSTTube = 327680, CSTInvSphere = 393216, CSTFloorMesh = 524288
}
enum  ComponentType {
  CTInvalid = 0, CTTranslate2d = 1, CTTranslate3d = 2, CTRotate2d = 3,
  CTRotx = 4, CTRoty = 5, CTRotz = 6, CTRotate3d = 7,
  CTScale2d = 8, CTScale3d = 9, CTUniformScale = 10, CTMatrix3 = 11,
  CTMatrix4 = 12
}
enum  DartType {
  DTNone = 0, DTStructured = 268435456, DTSync = 536870912, DTNosync = 805306368,
  DTDefault = 1073741824
}
enum  DCSType {
  DCUnspecified = 0, DCNone = 16, DCLocal = 32, DCNet = 48,
  DCNoTouch = 64, DCDefault = 80
}
enum  DepthTestMode { DTMUnspecified = 0, DTMOff = 1, DTMOn = 2 }
enum  DepthWriteMode { DWMUnspecified = 0, DWMOff = 1, DWMOn = 2 }
enum  GroupType { GTInvalid = -1, GTGroup = 0, GTInstance = 1, GTJoint = 2 }
enum  TriangulateFlags {
  TPolygon = 1, TConvex = 2, TComposite = 4, TRecurse = 8,
  TFlatShaded = 16
}
enum  VisibilityMode { VMUnspecified = 0, VMHidden = 1, VMNormal = 2 }

Public Member Functions

 EggBin (EggBin const copy)
 EggBin (EggGroup const copy)
 EggBin ()
 EggBin (string name)
EggNode addChild (EggNode node)
 Adds the indicated child to the group and returns it.
 addGroupRef (EggGroup group)
 Adds a new <Ref> entry to the group.
 addMatrix3 (Mat3D const mat)
 Appends an arbitrary 3x3 matrix to the current transform.
 addMatrix4 (Mat4D const mat)
 Appends an arbitrary 4x4 matrix to the current transform.
 addObjectType (string object_type)
 addRotate2d (double angle)
 Appends a 2-d rotation to the current transform.
 addRotate3d (QuatD const quat)
 Appends an arbitrary 3-d rotation to the current transform, expressed as a quaternion.
 addRotate3d (double angle, Vec3D const axis)
 Appends a 3-d rotation about an arbitrary axis to the current transform.
 addRotx (double angle)
 Appends a rotation about the X axis to the current transform.
 addRoty (double angle)
 Appends a rotation about the Y axis to the current transform.
 addRotz (double angle)
 Appends a rotation about the Z axis to the current transform.
 addScale2d (VBase2D const scale)
 Appends a possibly non-uniform scale to the current transform.
 addScale3d (VBase3D const scale)
 Appends a possibly non-uniform scale to the current transform.
 addTranslate2d (Vec2D const translate)
 Appends a 2-d translation operation to the current transform.
 addTranslate3d (Vec3D const translate)
 Appends a 3-d translation operation to the current transform.
 addUniformScale (double scale)
 Appends a uniform scale to the current transform.
 applyFirstAttribute (bool recurse)
 Sets the first vertex of the triangle (or each component) to the primitive normal and/or color, if the primitive is flat-shaded.
 applyLastAttribute (bool recurse)
 Sets the last vertex of the triangle (or each component) to the primitive normal and/or color, if the primitive is flat-shaded.
 applyTexmats ()
 Applies the texture matrices to the UV's of the vertices that reference them, and then removes the texture matrices from the textures themselves.
 clear ()
 clearBillboardCenter ()
 clearBin ()
 Removes the bin name that was set for this particular object.
 clearBlendColor ()
 Removes the blend color specification.
 clearCollideMask ()
 clearCollisionName ()
 clearConnectedShading ()
 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().
 clearDefaultPose ()
 Removes the initial pose transform.
 clearDepthOffset ()
 Removes the depth-offset flag from this particular object.
 clearDrawOrder ()
 Removes the draw-order flag from this particular object.
 clearFromCollideMask ()
 clearGroupRefs ()
 Removes all of the <Ref> entries within this group.
 clearIndexedFlag ()
 clearIntoCollideMask ()
 clearLod ()
 clearObjectTypes ()
 clearTag (string key)
 Removes the value defined for this key on this particular node.
 clearTransform ()
 Resets the transform to empty, identity.
 clearUserData ()
 Removes *all* user data pointers from the node.
 clearUserData (TypeHandle type)
 Removes the user data pointer of the indicated type.
EggRenderMode determineAlphaMode ()
 Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this group that has an alpha_mode other than AM_unspecified.
EggRenderMode determineBin ()
 Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this group that has a bin specified.
bool determineDecal ()
 Walks back up the hierarchy, looking for an EggGroup at this level or above that has the "decal" flag set.
EggRenderMode determineDepthOffset ()
 Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this group that has a depth_offset specified.
EggRenderMode determineDepthTestMode ()
 Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this group that has a depth_test_mode other than DTM_unspecified.
EggRenderMode determineDepthWriteMode ()
 Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this group that has a depth_write_mode other than DWM_unspecified.
EggRenderMode determineDrawOrder ()
 Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this group that has a draw_order specified.
bool determineIndexed ()
 Walks back up the hierarchy, looking for an EggGroup at this level or above that has the "indexed" scalar set.
EggRenderMode determineVisibilityMode ()
 Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this group that has a visibility_mode other than VM_unspecified.
bool empty ()
EggNode findChild (string name)
 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.
 flattenTransforms ()
 Removes any transform and instance records from this node in the scene graph and below.
 forceFilenames (Filename const directory)
 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.
AlphaMode getAlphaMode ()
 Returns the alpha mode that was set, or AM_unspecified if nothing was set.
Point3D const getBillboardCenter ()
BillboardType getBillboardType ()
string getBin ()
 Returns the bin name that has been set for this particular object, if any.
int getBinNumber ()
VBase4 const getBlendColor ()
 Returns the blend color if one has been specified, or (0, 0, 0, 0) if one has not.
BlendMode getBlendMode ()
BlendOperand getBlendOperandA ()
BlendOperand getBlendOperandB ()
CollideFlags getCollideFlags ()
BitMaskunsigned getCollideMask ()
string getCollisionName ()
Mat3D const getComponentMat3 (int n)
 Returns the 3x3 matrix associated with the nth component.
Mat4D const getComponentMat4 (int n)
 Returns the 4x4 matrix associated with the nth component.
double getComponentNumber (int n)
 Returns the solitary number associated with the nth component.
ComponentType getComponentType (int n)
 Returns the type of the nth component.
VBase2D const getComponentVec2 (int n)
 Returns the 2-component vector associated with the nth component.
VBase3D const getComponentVec3 (int n)
 Returns the 3-component vector associated with the nth component.
 getConnectedShading ()
 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.
CollisionSolidType getCsType ()
DartType getDartType ()
DCSType getDcsType ()
bool getDecalFlag ()
EggTransform const getDefaultPose ()
 Returns a read-only accessor to the initial pose transform.
int getDepth ()
 Returns the number of nodes above this node in the egg hierarchy.
int getDepthOffset ()
 Returns the "depth-offset" flag as set for this particular object.
DepthTestMode getDepthTestMode ()
 Returns the depth_test mode that was set, or DTM_unspecified if nothing was set.
DepthWriteMode getDepthWriteMode ()
 Returns the depth_write mode that was set, or DWM_unspecified if nothing was set.
bool getDirectFlag ()
int getDrawOrder ()
 Returns the "draw-order" flag as set for this particular object.
EggNode getFirstChild ()
 Returns the first child in the group's list of children, or NULL if the list of children is empty.
BitMaskunsigned getFromCollideMask ()
EggGroup getGroupRef (int n)
 Returns the nth <Ref> entry within this group.
list getGroupRefs ()
GroupType getGroupType ()
bool getIndexedFlag ()
BitMaskunsigned getIntoCollideMask ()
EggSwitchCondition const getLod ()
bool getModelFlag ()
EggNode getNextChild ()
 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.
Mat4D const getNodeFrame ()
 Returns the coordinate frame of the node itself.
Mat4D const getNodeFrameInv ()
 Returns the inverse of the matrix returned by get_node_frame().
Mat4D const getNodeFrameInvPtr ()
 Returns either a NULL pointer or a unique pointer shared by nodes with the same get_node_frame_inv() matrix.
Mat4D const getNodeFramePtr ()
 Returns either a NULL pointer or a unique pointer shared by nodes with the same get_node_frame() matrix.
Mat4D const getNodeToVertex ()
 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.
Mat4D const getNodeToVertexPtr ()
 Returns either a NULL pointer or a unique pointer shared by nodes with the same get_node_to_vertex() matrix.
bool getNofogFlag ()
int getNumComponents ()
 Returns the number of components that make up the transform.
int getNumGroupRefs ()
 Returns the number of <Ref> entries within this group.
int getNumObjectTypes ()
string getObjectType (int index)
list getObjectTypes ()
EggGroupNode getParent ()
bool getPolylightFlag ()
bool getPortalFlag ()
double getScrollR ()
double getScrollU ()
double getScrollV ()
bool getSwitchFlag ()
double getSwitchFps ()
string getTag (string key)
 Retrieves the user-defined value that was previously set on this node for the particular key, if any.
bool getTexlistFlag ()
Mat3D getTransform2d ()
 Returns the overall transform as a 3x3 matrix.
Mat4D const getTransform3d ()
 Returns the overall transform as a 4x4 matrix.
EggUserData getUserData ()
 Returns the user data pointer most recently stored on this object, or NULL if nothing was previously stored.
EggUserData getUserData (TypeHandle type)
 Returns the user data pointer of the indicated type, if it exists, or NULL if it does not.
Mat4D const getVertexFrame ()
 Returns the coordinate frame of the vertices referenced by primitives at or under this node.
Mat4D const getVertexFrameInv ()
 Returns the inverse of the matrix returned by get_vertex_frame().
Mat4D const getVertexFrameInvPtr ()
 Returns either a NULL pointer or a unique pointer shared by nodes with the same get_vertex_frame_inv() matrix.
Mat4D const getVertexFramePtr ()
 Returns either a NULL pointer or a unique pointer shared by nodes with the same get_vertex_frame() matrix.
double getVertexMembership (EggVertex const vert)
 Returns the amount of membership of the indicated vertex in this group.
Mat4D const getVertexToNode ()
 Returns the transformation matrix suitable for converting the vertices as read from the egg file into the coordinate space of the node.
Mat4D const getVertexToNodePtr ()
 Returns either a NULL pointer or a unique pointer shared by nodes with the same get_vertex_to_node() matrix.
VisibilityMode getVisibilityMode ()
 Returns the visibility mode that was set, or VM_unspecified if nothing was set.
bool hasAbsolutePathnames ()
 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.
bool hasBillboardCenter ()
bool hasBin ()
 Returns true if a bin name has been set for this particular object.
bool hasBlendColor ()
 Returns true if the blend color has been specified, false otherwise.
bool hasCollideMask ()
bool hasCollisionName ()
bool hasDcsType ()
 Returns true if the specified DCS type is not DC_none and not DC_unspecified.
bool hasDepthOffset ()
 Returns true if the depth-offset flag has been set for this particular object.
bool hasDrawOrder ()
 Returns true if the draw-order flag has been set for this particular object.
bool hasFromCollideMask ()
bool hasIndexedFlag ()
bool hasIntoCollideMask ()
bool hasLod ()
bool hasNormals ()
 Returns true if any of the primitives (e.g.
bool hasObjectType (string object_type)
 Returns true if the indicated object type has been added to the group, or false otherwise.
bool hasPrimitives ()
 Returns true if there are any primitives (e.g.
bool hasScrollingUvs ()
bool hasTag (string key)
 Returns true if a value has been defined on this node for the particular key (even if that value is the empty string), or false if no value has been set.
bool hasTransform ()
 Returns true if the transform is nonempty, false if it is empty (no transform components have been added).
bool hasTransform2d ()
 Returns true if the transform is specified as a 2-d transform, e.g.
bool hasTransform3d ()
 Returns true if the transform is specified as a 3-d transform, e.g.
bool hasUserData ()
 Returns true if a generic user data pointer has recently been set and not yet cleared, false otherwise.
bool hasUserData (TypeHandle type)
 Returns true if the user data pointer of the indicated type has been set, false otherwise.
bool isAnimMatrix ()
 Returns true if this node represents a table of animation transformation data, false otherwise.
bool isInstanceType ()
 Returns true if this group is an instance type node; i.e.
bool isJoint ()
 Returns true if this particular node represents a <Joint> entry or not.
bool isLocalCoord ()
 Returns true if this node's vertices are not in the global coordinate space.
bool isUnderInstance ()
 Returns true if there is an <Instance> node somewhere in the egg tree at or above this node, false otherwise.
bool isUnderTransform ()
 Returns true if there is a <Transform> entry somewhere in the egg tree at or above this node, false otherwise.
bool jointHasPrimitives ()
 Returns true if there are any primitives (e.g.
 meshTriangles (int flags)
 Combine triangles together into triangle strips, at this group and below.
EggTransform modifyDefaultPose ()
 Returns a writable accessor to the initial pose transform.
bool operator!= (EggRenderMode const other)
bool operator< (EggRenderMode const other)
bool operator== (EggRenderMode const other)
 output (ostream out)
bool parseEgg (string egg_syntax)
 Parses the egg syntax given in the indicate string as if it had been read from the egg file within this object's definition.
 postApplyFlatAttribute (bool recurse)
 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 (CoordinateSystem cs)
 Recomputes all the polygon normals for polygon geometry at this group node and below so that they accurately reflect the vertex positions.
 recomputePolygonNormals ()
 Recomputes all the polygon normals for polygon geometry at this group node and below so that they accurately reflect the vertex positions.
bool recomputeTangentBinormal (GlobPattern const uv_name)
 This function recomputes the tangent and binormal for the named texture coordinate set for all vertices at this level and below.
bool recomputeTangentBinormal (vectorbasic_stringchar const names)
 This function recomputes the tangent and binormal for the named texture coordinate sets.
bool recomputeTangentBinormalAuto ()
 This function recomputes the tangent and binormal for any texture coordinate set that affects a normal map.
 recomputeVertexNormals (double threshold, CoordinateSystem cs)
 Recomputes all the vertex normals for polygon geometry at this group node and below so that they accurately reflect the vertex positions.
 recomputeVertexNormals (double threshold)
 Recomputes all the vertex normals for polygon geometry at this group node and below so that they accurately reflect the vertex positions.
 refVertex (EggVertex vert)
 Adds the vertex to the set of those referenced by the group, at the indicated membership level.
 refVertex (EggVertex vert, double membership)
 Adds the vertex to the set of those referenced by the group, at the indicated membership level.
EggNode removeChild (EggNode node)
 Removes the indicated child node from the group and returns it.
 removeGroupRef (int n)
 Removes the nth <Ref> entry within this group.
int removeInvalidPrimitives (bool recurse)
 Removes primitives at this level and below which appear to be degenerate; e.g.
bool removeObjectType (string object_type)
 Removes the first instance of the indicated object type from the group if it is present.
int removeUnusedVertices (bool recurse)
 Removes all vertices from VertexPools within this group or below that are not referenced by at least one primitive.
int renameNode (vectorbasic_stringchar strip_prefix)
 Rename by stripping out the prefix.
int renameNodes (vectorbasic_stringchar strip_prefix, bool recurse)
 Rename by stripping out the prefix.
 resolveFilenames (DSearchPath const searchpath)
 Walks the tree and attempts to resolve any filenames encountered.
 reverseVertexOrdering ()
 Reverses the vertex ordering of all polygons defined at this node and below.
 setAlphaMode (AlphaMode mode)
 Specifies precisely how the transparency for this geometry should be achieved, or if it should be used.
 setBillboardCenter (Point3D const billboard_center)
 Sets the point around which the billboard will rotate, if this node contains a billboard specification.
 setBillboardType (BillboardType type)
 setBin (string bin)
 Sets the "bin" string for this particular object.
 setBinNumber (int bin_number)
 setBlendColor (VBase4 const blend_color)
 setBlendMode (BlendMode blend_mode)
 setBlendOperandA (BlendOperand blend_operand_a)
 setBlendOperandB (BlendOperand blend_operand_b)
 setCollideFlags (int flags)
 setCollideMask (BitMaskunsigned int, 32 mask)
 setCollisionName (string collision_name)
 setCsType (CollisionSolidType type)
 setDartType (DartType type)
 setDcsType (DCSType type)
 setDecalFlag (bool flag)
 setDefaultPose (EggTransform const transform)
 Replaces the initial pose transform.
 setDepthOffset (int bias)
 Sets the "depth-offset" flag associated with this object.
 setDepthTestMode (DepthTestMode mode)
 Specifies whether this geometry should be tested against the depth buffer when it is drawn (assuming the rendering backend provides a depth buffer).
 setDepthWriteMode (DepthWriteMode mode)
 Specifies whether writes should be made to the depth buffer (assuming the rendering backend provides a depth buffer) when rendering this geometry.
 setDirectFlag (bool flag)
 setDrawOrder (int order)
 Sets the "draw-order" flag associated with this object.
 setFromCollideMask (BitMaskunsigned int, 32 mask)
 setGroupType (GroupType type)
 setIndexedFlag (bool flag)
 If this flag is true, geometry at this node and below will be generated as indexed geometry.
 setIntoCollideMask (BitMaskunsigned int, 32 mask)
 setLod (EggSwitchCondition const lod)
 setModelFlag (bool flag)
 setNofogFlag (bool flag)
 setPolylightFlag (bool flag)
 setPortalFlag (bool flag)
 setScrollR (double r_speed)
 setScrollU (double u_speed)
 setScrollV (double v_speed)
 setSwitchFlag (bool flag)
 setSwitchFps (double fps)
 setTag (string key, string value)
 Associates a user-defined value with a user-defined key which is stored on the node.
 setTexlistFlag (bool flag)
 setTransform2d (Mat3D const mat)
 Sets the overall transform as a 3x3 matrix.
 setTransform3d (Mat4D const mat)
 Sets the overall transform as a 4x4 matrix.
 setUserData (EggUserData user_data)
 Sets the user data associated with this object.
 setVertexMembership (EggVertex vert, double membership)
 Explicitly sets the net membership of the indicated vertex in this group to the given value.
 setVisibilityMode (VisibilityMode mode)
 Specifies whether this geometry is to be considered normally visible, or hidden.
unsigned int size ()
 stealChildren (EggGroupNode other)
 Moves all the children from the other node to this one.
 stealVrefs (EggGroup other)
 Moves all of the vertex references from the indicated other group into this one.
 stripNormals ()
 Removes all normals from primitives, and the vertices they reference, at this node and below.
 testUnderIntegrity ()
 Recursively checks the integrity of the _under_flags, _parent, and _depth members of this node and all of its ancestors.
 testVrefIntegrity ()
 Verifies that each vertex in the group exists and that it knows it is referenced by the group.
 transform (Mat4D const mat)
 Applies the indicated transformation to the node and all of its descendants.
bool transformIsIdentity ()
 Returns true if the described transform is identity, false otherwise.
 transformVerticesOnly (Mat4D const mat)
 Applies the indicated transformation only to vertices that appear in global space within vertex pools at this node and below.
int triangulatePolygons (int flags)
 Replace all higher-order polygons at this point in the scene graph and below with triangles.
 unifyAttributes (bool use_connected_shading, bool allow_per_primitive, bool recurse)
 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.
 unrefAllVertices ()
 Removes all vertices from the reference list.
 unrefVertex (EggVertex vert)
 Removes the vertex from the set of those referenced by the group.
 write (ostream out, int indent_level, string label)
 Writes the transform to the indicated stream in Egg format.
 write (ostream out, int indent_level)
 Writes the group and all of its children to the indicated output stream in Egg format.
 writeBillboardFlags (ostream out, int indent_level)
 Writes just the <Billboard> entry and related fields to the indicated ostream.
 writeCollideFlags (ostream out, int indent_level)
 Writes just the <Collide> entry and related fields to the indicated ostream.
 writeDecalFlags (ostream out, int indent_level)
 Writes the flags related to decaling, if any.
 writeModelFlags (ostream out, int indent_level)
 Writes the <Model> flag and related flags to the indicated ostream.
 writeObjectTypes (ostream out, int indent_level)
 Writes just the <ObjectTypes> entries, if any, to the indicated ostream.
 writeRenderMode (ostream out, int indent_level)
 Writes the flags inherited from EggRenderMode and similar flags that control obscure render effects.
 writeSwitchFlags (ostream out, int indent_level)
 Writes the <Switch> flag and related flags to the indicated ostream.
 writeTags (ostream out, int indent_level)
 Writes just the <Tag> entries, if any, to the indicated ostream.

Static Public Member Functions

static TypeHandle getClassType ()
static bool isRight (Vec2D const v1, Vec2D const v2)
 Returns true if the 2-d v1 is to the right of v2.
static AlphaMode stringAlphaMode (string string)
 Returns the AlphaMode value associated with the given string representation, or AM_unspecified if the string does not match any known AlphaMode value.
static BillboardType stringBillboardType (string strval)
 Returns the BillboardType value associated with the given string representation, or BT_none if the string does not match any known BillboardType value.
static BlendMode stringBlendMode (string strval)
 Returns the BlendMode value associated with the given string representation, or BM_none if the string does not match any known BlendMode.
static BlendOperand stringBlendOperand (string strval)
 Returns the BlendOperand value associated with the given string representation, or BO_none if the string does not match any known BlendOperand.
static CollideFlags stringCollideFlags (string strval)
 Returns the CollideFlags value associated with the given string representation, or CF_none if the string does not match any known CollideFlags value.
static CollisionSolidType stringCsType (string strval)
 Returns the CollisionSolidType value associated with the given string representation, or CST_none if the string does not match any known CollisionSolidType value.
static DartType stringDartType (string strval)
 Returns the DartType value associated with the given string representation, or DT_none if the string does not match any known DartType value.
static DCSType stringDcsType (string strval)
 Returns the DCSType value associated with the given string representation, or DC_unspecified if the string does not match any known DCSType value.
static DepthTestMode stringDepthTestMode (string string)
 Returns the DepthTestMode value associated with the given string representation, or DTM_unspecified if the string does not match any known DepthTestMode value.
static DepthWriteMode stringDepthWriteMode (string string)
 Returns the DepthWriteMode value associated with the given string representation, or DWM_unspecified if the string does not match any known DepthWriteMode value.
static GroupType stringGroupType (string strval)
 Returns the GroupType value associated with the given string representation, or GT_invalid if the string does not match any known GroupType value.
static VisibilityMode stringVisibilityMode (string string)
 Returns the HiddenMode value associated with the given string representation, or VM_unspecified if the string does not match any known HiddenMode value.

Public Attributes

BitMaskunsigned int

Detailed Description

A type of group node that holds related subnodes.

This is a special kind of node that will never be read in from an egg file, but can only exist in the egg scene graph if it is created via the use of an EggBinMaker.


Member Enumeration Documentation

enum AlphaMode [inherited]
Enumerator:
AMUnspecified 
AMOff 
AMOn 
AMBlend 
AMBlendNoOcclude 
AMMs 
AMMsMask 
AMBinary 
AMDual 
enum BillboardType [inherited]
Enumerator:
BTNone 
BTAxis 
BTPointCameraRelative 
BTPointWorldRelative 
enum BlendMode [inherited]
Enumerator:
BMUnspecified 
BMNone 
BMAdd 
BMSubtract 
BMInvSubtract 
BMMin 
BMMax 
enum BlendOperand [inherited]
Enumerator:
BOUnspecified 
BOZero 
BOOne 
BOIncomingColor 
BOOneMinusIncomingColor 
BOFbufferColor 
BOOneMinusFbufferColor 
BOIncomingAlpha 
BOOneMinusIncomingAlpha 
BOFbufferAlpha 
BOOneMinusFbufferAlpha 
BOConstantColor 
BOOneMinusConstantColor 
BOConstantAlpha 
BOOneMinusConstantAlpha 
BOIncomingColorSaturate 
BOColorScale 
BOOneMinusColorScale 
BOAlphaScale 
BOOneMinusAlphaScale 
enum CollideFlags [inherited]
Enumerator:
CFNone 
CFDescend 
CFEvent 
CFKeep 
CFSolid 
CFCenter 
CFTurnstile 
CFLevel 
CFIntangible 
enum CollisionSolidType [inherited]
Enumerator:
CSTNone 
CSTPlane 
CSTPolygon 
CSTPolyset 
CSTSphere 
CSTTube 
CSTInvSphere 
CSTFloorMesh 
enum ComponentType [inherited]
Enumerator:
CTInvalid 
CTTranslate2d 
CTTranslate3d 
CTRotate2d 
CTRotx 
CTRoty 
CTRotz 
CTRotate3d 
CTScale2d 
CTScale3d 
CTUniformScale 
CTMatrix3 
CTMatrix4 
enum DartType [inherited]
Enumerator:
DTNone 
DTStructured 
DTSync 
DTNosync 
DTDefault 
enum DCSType [inherited]
Enumerator:
DCUnspecified 
DCNone 
DCLocal 
DCNet 
DCNoTouch 
DCDefault 
enum DepthTestMode [inherited]
Enumerator:
DTMUnspecified 
DTMOff 
DTMOn 
enum DepthWriteMode [inherited]
Enumerator:
DWMUnspecified 
DWMOff 
DWMOn 
enum GroupType [inherited]
Enumerator:
GTInvalid 
GTGroup 
GTInstance 
GTJoint 
enum TriangulateFlags [inherited]
Enumerator:
TPolygon 
TConvex 
TComposite 
TRecurse 
TFlatShaded 
enum VisibilityMode [inherited]
Enumerator:
VMUnspecified 
VMHidden 
VMNormal 

Constructor & Destructor Documentation

EggBin ( EggBin const  copy)
EggBin ( EggGroup const  copy)
EggBin ( string  name)
EggBin ( )

Member Function Documentation

EggNode addChild ( EggNode  node) [inherited]

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.

addGroupRef ( EggGroup  group) [inherited]

Adds a new <Ref> entry to the group.

This declares an internal reference to another node, and is used to implement scene-graph instancing; it is only valid if the group_type is GT_instance.

addMatrix3 ( Mat3D const  mat) [inherited]

Appends an arbitrary 3x3 matrix to the current transform.

addMatrix4 ( Mat4D const  mat) [inherited]

Appends an arbitrary 4x4 matrix to the current transform.

addObjectType ( string  object_type) [inherited]
addRotate2d ( double  angle) [inherited]

Appends a 2-d rotation to the current transform.

The rotation angle is specified in degrees counterclockwise about the origin.

addRotate3d ( QuatD const  quat) [inherited]

Appends an arbitrary 3-d rotation to the current transform, expressed as a quaternion.

This is converted to axis-angle notation for the egg file.

addRotate3d ( double  angle,
Vec3D const  axis 
) [inherited]

Appends a 3-d rotation about an arbitrary axis to the current transform.

The rotation angle is specified in degrees counterclockwise about the axis.

addRotx ( double  angle) [inherited]

Appends a rotation about the X axis to the current transform.

The rotation angle is specified in degrees counterclockwise about the axis.

addRoty ( double  angle) [inherited]

Appends a rotation about the Y axis to the current transform.

The rotation angle is specified in degrees counterclockwise about the axis.

addRotz ( double  angle) [inherited]

Appends a rotation about the Z axis to the current transform.

The rotation angle is specified in degrees counterclockwise about the axis.

addScale2d ( VBase2D const  scale) [inherited]

Appends a possibly non-uniform scale to the current transform.

addScale3d ( VBase3D const  scale) [inherited]

Appends a possibly non-uniform scale to the current transform.

addTranslate2d ( Vec2D const  translate) [inherited]

Appends a 2-d translation operation to the current transform.

addTranslate3d ( Vec3D const  translate) [inherited]

Appends a 3-d translation operation to the current transform.

addUniformScale ( double  scale) [inherited]

Appends a uniform scale to the current transform.

applyFirstAttribute ( bool  recurse) [inherited]

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 ( bool  recurse) [inherited]

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().

applyTexmats ( ) [inherited]

Applies the texture matrices to the UV's of the vertices that reference them, and then removes the texture matrices from the textures themselves.

clear ( ) [inherited]
clearBillboardCenter ( ) [inherited]
clearBin ( ) [inherited]

Removes the bin name that was set for this particular object.

See set_bin().

clearBlendColor ( ) [inherited]

Removes the blend color specification.

clearCollideMask ( ) [inherited]
clearCollisionName ( ) [inherited]
clearConnectedShading ( ) [inherited]

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.

clearDefaultPose ( ) [inherited]

Removes the initial pose transform.

See set_default_pose().

clearDepthOffset ( ) [inherited]

Removes the depth-offset flag from this particular object.

See set_depth_offset().

clearDrawOrder ( ) [inherited]

Removes the draw-order flag from this particular object.

See set_draw_order().

clearFromCollideMask ( ) [inherited]
clearGroupRefs ( ) [inherited]

Removes all of the <Ref> entries within this group.

See add_group_ref().

clearIndexedFlag ( ) [inherited]
clearIntoCollideMask ( ) [inherited]
clearLod ( ) [inherited]
clearObjectTypes ( ) [inherited]
clearTag ( string  key) [inherited]

Removes the value defined for this key on this particular node.

After a call to clear_tag(), has_tag() will return false for the indicated key.

clearTransform ( ) [inherited]

Resets the transform to empty, identity.

clearUserData ( ) [inherited]

Removes *all* user data pointers from the node.

clearUserData ( TypeHandle  type) [inherited]

Removes the user data pointer of the indicated type.

EggRenderMode determineAlphaMode ( ) [inherited]

Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this group that has an alpha_mode other than AM_unspecified.

Returns a valid EggRenderMode pointer if one is found, or NULL otherwise.

Reimplemented from EggNode.

EggRenderMode determineBin ( ) [inherited]

Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this group that has a bin specified.

Returns a valid EggRenderMode pointer if one is found, or NULL otherwise.

Reimplemented from EggNode.

bool determineDecal ( ) [inherited]

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.

Reimplemented from EggNode.

EggRenderMode determineDepthOffset ( ) [inherited]

Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this group that has a depth_offset specified.

Returns a valid EggRenderMode pointer if one is found, or NULL otherwise.

Reimplemented from EggNode.

EggRenderMode determineDepthTestMode ( ) [inherited]

Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this group that has a depth_test_mode other than DTM_unspecified.

Returns a valid EggRenderMode pointer if one is found, or NULL otherwise.

Reimplemented from EggNode.

EggRenderMode determineDepthWriteMode ( ) [inherited]

Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this group that has a depth_write_mode other than DWM_unspecified.

Returns a valid EggRenderMode pointer if one is found, or NULL otherwise.

Reimplemented from EggNode.

EggRenderMode determineDrawOrder ( ) [inherited]

Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this group that has a draw_order specified.

Returns a valid EggRenderMode pointer if one is found, or NULL otherwise.

Reimplemented from EggNode.

bool determineIndexed ( ) [inherited]

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.

Reimplemented from EggNode.

EggRenderMode determineVisibilityMode ( ) [inherited]

Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this group that has a visibility_mode other than VM_unspecified.

Returns a valid EggRenderMode pointer if one is found, or NULL otherwise.

Reimplemented from EggNode.

bool empty ( ) [inherited]
EggNode findChild ( string  name) [inherited]

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.

flattenTransforms ( ) [inherited]

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.

forceFilenames ( Filename const  directory) [inherited]

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.

AlphaMode getAlphaMode ( ) [inherited]

Returns the alpha mode that was set, or AM_unspecified if nothing was set.

See set_alpha_mode().

Point3D const getBillboardCenter ( ) [inherited]
BillboardType getBillboardType ( ) [inherited]
string getBin ( ) [inherited]

Returns the bin name that has been set for this particular object, if any.

See set_bin().

int getBinNumber ( )
VBase4 const getBlendColor ( ) [inherited]

Returns the blend color if one has been specified, or (0, 0, 0, 0) if one has not.

BlendMode getBlendMode ( ) [inherited]
BlendOperand getBlendOperandA ( ) [inherited]
BlendOperand getBlendOperandB ( ) [inherited]
static TypeHandle getClassType ( ) [static]

Reimplemented from EggGroup.

CollideFlags getCollideFlags ( ) [inherited]
BitMaskunsigned getCollideMask ( ) [inherited]
string getCollisionName ( ) [inherited]
Mat3D const getComponentMat3 ( int  n) [inherited]

Returns the 3x3 matrix associated with the nth component.

It is an error to call this if the component type is not CT_matrix3.

Mat4D const getComponentMat4 ( int  n) [inherited]

Returns the 4x4 matrix associated with the nth component.

It is an error to call this if the component type is not CT_matrix4.

double getComponentNumber ( int  n) [inherited]

Returns the solitary number associated with the nth component.

In the case of a rotation, this is the angle in degrees to rotate; in the case of uniform scale, this is the amount of the scale. Other types do not use this property.

ComponentType getComponentType ( int  n) [inherited]

Returns the type of the nth component.

VBase2D const getComponentVec2 ( int  n) [inherited]

Returns the 2-component vector associated with the nth component.

This may be the translate vector, rotate axis, or non-uniform scale. It is an error to call this if the component type does not use a 2-d vector property.

VBase3D const getComponentVec3 ( int  n) [inherited]

Returns the 3-component vector associated with the nth component.

This may be the translate vector, rotate axis, or non-uniform scale. It is an error to call this if the component type does not use a 3-d vector property.

getConnectedShading ( ) [inherited]

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.

CollisionSolidType getCsType ( ) [inherited]
DartType getDartType ( ) [inherited]
DCSType getDcsType ( ) [inherited]
bool getDecalFlag ( ) [inherited]
EggTransform const getDefaultPose ( ) [inherited]

Returns a read-only accessor to the initial pose transform.

This is the <DefaultPose> entry for a Joint, and defines only the initial transform pose for the unanimated joint; it has nothing to do with the group's <Transform> entry, which defines the (eventual) space of the group's vertices.

int getDepth ( ) [inherited]

Returns the number of nodes above this node in the egg hierarchy.

int getDepthOffset ( ) [inherited]

Returns the "depth-offset" flag as set for this particular object.

See set_depth_offset().

DepthTestMode getDepthTestMode ( ) [inherited]

Returns the depth_test mode that was set, or DTM_unspecified if nothing was set.

See set_depth_test_mode().

DepthWriteMode getDepthWriteMode ( ) [inherited]

Returns the depth_write mode that was set, or DWM_unspecified if nothing was set.

See set_depth_write_mode().

bool getDirectFlag ( ) [inherited]
int getDrawOrder ( ) [inherited]

Returns the "draw-order" flag as set for this particular object.

See set_draw_order().

EggNode getFirstChild ( ) [inherited]

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.

BitMaskunsigned getFromCollideMask ( ) [inherited]
EggGroup getGroupRef ( int  n) [inherited]

Returns the nth <Ref> entry within this group.

See add_group_ref().

list getGroupRefs ( ) [inherited]
GroupType getGroupType ( ) [inherited]
bool getIndexedFlag ( ) [inherited]
BitMaskunsigned getIntoCollideMask ( ) [inherited]
EggSwitchCondition const getLod ( ) [inherited]
bool getModelFlag ( ) [inherited]
EggNode getNextChild ( ) [inherited]

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().

Mat4D const getNodeFrame ( ) [inherited]

Returns the coordinate frame of the node itself.

This is simply the net product of all transformations up to the root.

Mat4D const getNodeFrameInv ( ) [inherited]

Returns the inverse of the matrix returned by get_node_frame().

See get_node_frame().

Mat4D const getNodeFrameInvPtr ( ) [inherited]

Returns either a NULL pointer or a unique pointer shared by nodes with the same get_node_frame_inv() matrix.

Mat4D const getNodeFramePtr ( ) [inherited]

Returns either a NULL pointer or a unique pointer shared by nodes with the same get_node_frame() matrix.

Mat4D const getNodeToVertex ( ) [inherited]

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()

Mat4D const getNodeToVertexPtr ( ) [inherited]

Returns either a NULL pointer or a unique pointer shared by nodes with the same get_node_to_vertex() matrix.

bool getNofogFlag ( ) [inherited]
int getNumComponents ( ) [inherited]

Returns the number of components that make up the transform.

int getNumGroupRefs ( ) [inherited]

Returns the number of <Ref> entries within this group.

See add_group_ref().

int getNumObjectTypes ( ) [inherited]
string getObjectType ( int  index) [inherited]
list getObjectTypes ( ) [inherited]
EggGroupNode getParent ( ) [inherited]
bool getPolylightFlag ( ) [inherited]
bool getPortalFlag ( ) [inherited]
double getScrollR ( ) [inherited]
double getScrollU ( ) [inherited]
double getScrollV ( ) [inherited]
bool getSwitchFlag ( ) [inherited]
double getSwitchFps ( ) [inherited]
string getTag ( string  key) [inherited]

Retrieves the user-defined value that was previously set on this node for the particular key, if any.

If no value has been previously set, returns the empty string.

bool getTexlistFlag ( ) [inherited]
Mat3D getTransform2d ( ) [inherited]

Returns the overall transform as a 3x3 matrix.

It is an error to call this if has_transform3d() is true.

Mat4D const getTransform3d ( ) [inherited]

Returns the overall transform as a 4x4 matrix.

It is valid to call this even if has_transform2d() is true; in this case, the 3x3 transform will be expanded to a 4x4 matrix.

EggUserData getUserData ( ) [inherited]

Returns the user data pointer most recently stored on this object, or NULL if nothing was previously stored.

EggUserData getUserData ( TypeHandle  type) [inherited]

Returns the user data pointer of the indicated type, if it exists, or NULL if it does not.

Mat4D const getVertexFrame ( ) [inherited]

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.

Mat4D const getVertexFrameInv ( ) [inherited]

Returns the inverse of the matrix returned by get_vertex_frame().

See get_vertex_frame().

Mat4D const getVertexFrameInvPtr ( ) [inherited]

Returns either a NULL pointer or a unique pointer shared by nodes with the same get_vertex_frame_inv() matrix.

Mat4D const getVertexFramePtr ( ) [inherited]

Returns either a NULL pointer or a unique pointer shared by nodes with the same get_vertex_frame() matrix.

double getVertexMembership ( EggVertex const  vert) [inherited]

Returns the amount of membership of the indicated vertex in this group.

If the vertex is not reffed by the group, returns 0.

Mat4D const getVertexToNode ( ) [inherited]

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()

Mat4D const getVertexToNodePtr ( ) [inherited]

Returns either a NULL pointer or a unique pointer shared by nodes with the same get_vertex_to_node() matrix.

VisibilityMode getVisibilityMode ( ) [inherited]

Returns the visibility mode that was set, or VM_unspecified if nothing was set.

See set_visibility_mode().

bool hasAbsolutePathnames ( ) [inherited]

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.

bool hasBillboardCenter ( ) [inherited]
bool hasBin ( ) [inherited]

Returns true if a bin name has been set for this particular object.

See set_bin().

bool hasBlendColor ( ) [inherited]

Returns true if the blend color has been specified, false otherwise.

bool hasCollideMask ( ) [inherited]
bool hasCollisionName ( ) [inherited]
bool hasDcsType ( ) [inherited]

Returns true if the specified DCS type is not DC_none and not DC_unspecified.

bool hasDepthOffset ( ) [inherited]

Returns true if the depth-offset flag has been set for this particular object.

See set_depth_offset().

bool hasDrawOrder ( ) [inherited]

Returns true if the draw-order flag has been set for this particular object.

See set_draw_order().

bool hasFromCollideMask ( ) [inherited]
bool hasIndexedFlag ( ) [inherited]
bool hasIntoCollideMask ( ) [inherited]
bool hasLod ( ) [inherited]
bool hasNormals ( ) [inherited]

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.

bool hasObjectType ( string  object_type) [inherited]

Returns true if the indicated object type has been added to the group, or false otherwise.

bool hasPrimitives ( ) [inherited]

Returns true if there are any primitives (e.g.

polygons) defined within this group or below, false otherwise.

bool hasScrollingUvs ( ) [inherited]
bool hasTag ( string  key) [inherited]

Returns true if a value has been defined on this node for the particular key (even if that value is the empty string), or false if no value has been set.

bool hasTransform ( ) [inherited]

Returns true if the transform is nonempty, false if it is empty (no transform components have been added).

This is true for either a 2-d or a 3-d transform.

bool hasTransform2d ( ) [inherited]

Returns true if the transform is specified as a 2-d transform, e.g.

with a 3x3 matrix, or false if it is specified as a 3-d transform (with a 4x4 matrix), or not specified at all.

Normally, EggTextures have a 2-d matrix (but occasionally they use a 3-d matrix), and EggGroups always have a 3-d matrix.

bool hasTransform3d ( ) [inherited]

Returns true if the transform is specified as a 3-d transform, e.g.

with a 4x4 matrix, or false if it is specified as a 2-d transform (with a 2x2 matrix), or not specified at all.

Normally, EggTextures have a 3-d matrix (but occasionally they use a 3-d matrix), and EggGroups always have a 3-d matrix.

bool hasUserData ( ) [inherited]

Returns true if a generic user data pointer has recently been set and not yet cleared, false otherwise.

bool hasUserData ( TypeHandle  type) [inherited]

Returns true if the user data pointer of the indicated type has been set, false otherwise.

bool isAnimMatrix ( ) [inherited]

Returns true if this node represents a table of animation transformation data, false otherwise.

bool isInstanceType ( ) [inherited]

Returns true if this group is an instance type node; i.e.

it begins the root of a local coordinate space. This is not related to instancing (multiple copies of a node in a scene graph).

This also includes the case of the node including a billboard flag without an explicit center, which implicitly makes the node behave like an instance.

bool isJoint ( ) [inherited]

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().

Reimplemented from EggNode.

bool isLocalCoord ( ) [inherited]

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.

static bool isRight ( Vec2D const  v1,
Vec2D const  v2 
) [static, inherited]

Returns true if the 2-d v1 is to the right of v2.

bool isUnderInstance ( ) [inherited]

Returns true if there is an <Instance> node somewhere in the egg tree at or above this node, false otherwise.

bool isUnderTransform ( ) [inherited]

Returns true if there is a <Transform> entry somewhere in the egg tree at or above this node, false otherwise.

bool jointHasPrimitives ( ) [inherited]

Returns true if there are any primitives (e.g.

polygons) defined within this group or below, but the search does not include nested joints.

meshTriangles ( int  flags) [inherited]

Combine triangles together into triangle strips, at this group and below.

EggTransform modifyDefaultPose ( ) [inherited]

Returns a writable accessor to the initial pose transform.

This is the <DefaultPose> entry for a Joint, and defines only the initial transform pose for the unanimated joint; it has nothing to do with the group's <Transform> entry, which defines the (eventual) space of the group's vertices.

bool operator!= ( EggRenderMode const  other) [inherited]
bool operator< ( EggRenderMode const  other) [inherited]
bool operator== ( EggRenderMode const  other) [inherited]
output ( ostream  out) [inherited]
bool parseEgg ( string  egg_syntax) [inherited]

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.

postApplyFlatAttribute ( bool  recurse) [inherited]

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 ( CoordinateSystem  cs) [inherited]

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.

recomputePolygonNormals ( ) [inherited]

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.

Reimplemented in EggData.

bool recomputeTangentBinormal ( vectorbasic_stringchar const  names) [inherited]

This function recomputes the tangent and binormal for the named texture coordinate sets.

Returns true if anything was done.

bool recomputeTangentBinormal ( GlobPattern const  uv_name) [inherited]

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.

bool recomputeTangentBinormalAuto ( ) [inherited]

This function recomputes the tangent and binormal for any texture coordinate set that affects a normal map.

Returns true if anything was done.

recomputeVertexNormals ( double  threshold,
CoordinateSystem  cs 
) [inherited]

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.

recomputeVertexNormals ( double  threshold) [inherited]

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.

Reimplemented in EggData.

refVertex ( EggVertex  vert,
double  membership 
) [inherited]

Adds the vertex to the set of those referenced by the group, at the indicated membership level.

If the vertex is already being referenced, increases the membership amount by the indicated amount.

refVertex ( EggVertex  vert) [inherited]

Adds the vertex to the set of those referenced by the group, at the indicated membership level.

If the vertex is already being referenced, increases the membership amount by the indicated amount.

EggNode removeChild ( EggNode  node) [inherited]

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.

removeGroupRef ( int  n) [inherited]

Removes the nth <Ref> entry within this group.

See add_group_ref().

int removeInvalidPrimitives ( bool  recurse) [inherited]

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.

bool removeObjectType ( string  object_type) [inherited]

Removes the first instance of the indicated object type from the group if it is present.

Returns true if the object type was found and removed, false otherwise.

int removeUnusedVertices ( bool  recurse) [inherited]

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.

int renameNode ( vectorbasic_stringchar  strip_prefix) [inherited]

Rename by stripping out the prefix.

int renameNodes ( vectorbasic_stringchar  strip_prefix,
bool  recurse 
) [inherited]

Rename by stripping out the prefix.

resolveFilenames ( DSearchPath const  searchpath) [inherited]

Walks the tree and attempts to resolve any filenames encountered.

This looks up filenames along the specified search path; it does not automatically search the model_path for missing files.

reverseVertexOrdering ( ) [inherited]

Reverses the vertex ordering of all polygons defined at this node and below.

Does not change the surface normals, if any.

setAlphaMode ( AlphaMode  mode) [inherited]

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.

setBillboardCenter ( Point3D const  billboard_center) [inherited]

Sets the point around which the billboard will rotate, if this node contains a billboard specification.

If a billboard type is given but no billboard_center is specified, then the group node is treated as an <Instance>, and the billboard rotates around the origin. If, however, a billboard_center is specified, then the group node is *not* treated as an <Instance>, and the billboard rotates around the specified point.

The point is in the same coordinate system as the vertices of this node: usually global, but possibly local if there is an <Instance> somewhere above. Specifically, this is the coordinate system defined by get_vertex_frame().

setBillboardType ( BillboardType  type) [inherited]
setBin ( string  bin) [inherited]

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().

setBinNumber ( int  bin_number)
setBlendColor ( VBase4 const  blend_color) [inherited]
setBlendMode ( BlendMode  blend_mode) [inherited]
setBlendOperandA ( BlendOperand  blend_operand_a) [inherited]
setBlendOperandB ( BlendOperand  blend_operand_b) [inherited]
setCollideFlags ( int  flags) [inherited]
setCollideMask ( BitMaskunsigned  int,
32  mask 
) [inherited]
setCollisionName ( string  collision_name) [inherited]
setCsType ( CollisionSolidType  type) [inherited]
setDartType ( DartType  type) [inherited]
setDcsType ( DCSType  type) [inherited]
setDecalFlag ( bool  flag) [inherited]
setDefaultPose ( EggTransform const  transform) [inherited]

Replaces the initial pose transform.

This is the <DefaultPose> entry for a Joint, and defines only the initial transform pose for the unanimated joint; it has nothing to do with the group's <Transform> entry, which defines the (eventual) space of the group's vertices.

setDepthOffset ( int  bias) [inherited]

Sets the "depth-offset" flag associated with this object.

This adds or subtracts an offset bias into the depth buffer. See also DepthOffsetAttrib and NodePath.set_depth_offset().

setDepthTestMode ( DepthTestMode  mode) [inherited]

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 ( DepthWriteMode  mode) [inherited]

Specifies whether writes should be made to the depth buffer (assuming the rendering backend provides a depth buffer) when rendering this geometry.

setDirectFlag ( bool  flag) [inherited]
setDrawOrder ( int  order) [inherited]

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().

setFromCollideMask ( BitMaskunsigned  int,
32  mask 
) [inherited]
setGroupType ( GroupType  type) [inherited]
setIndexedFlag ( bool  flag) [inherited]

If this flag is true, geometry at this node and below will be generated as indexed geometry.

setIntoCollideMask ( BitMaskunsigned  int,
32  mask 
) [inherited]
setLod ( EggSwitchCondition const  lod) [inherited]
setModelFlag ( bool  flag) [inherited]
setNofogFlag ( bool  flag) [inherited]
setPolylightFlag ( bool  flag) [inherited]
setPortalFlag ( bool  flag) [inherited]
setScrollR ( double  r_speed) [inherited]
setScrollU ( double  u_speed) [inherited]
setScrollV ( double  v_speed) [inherited]
setSwitchFlag ( bool  flag) [inherited]
setSwitchFps ( double  fps) [inherited]
setTag ( string  key,
string  value 
) [inherited]

Associates a user-defined value with a user-defined key which is stored on the node.

This value has no meaning to Panda; but it is stored indefinitely on the node until it is requested again. This value will be copied to the PandaNode that is created for this particular EggGroup if the egg file is loaded as a scene.

Each unique key stores a different string value. There is no effective limit on the number of different keys that may be stored or on the length of any one key's value.

setTexlistFlag ( bool  flag) [inherited]
setTransform2d ( Mat3D const  mat) [inherited]

Sets the overall transform as a 3x3 matrix.

This completely replaces whatever componentwise transform may have been defined.

setTransform3d ( Mat4D const  mat) [inherited]

Sets the overall transform as a 4x4 matrix.

This completely replaces whatever componentwise transform may have been defined.

setUserData ( EggUserData  user_data) [inherited]

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.

setVertexMembership ( EggVertex  vert,
double  membership 
) [inherited]

Explicitly sets the net membership of the indicated vertex in this group to the given value.

setVisibilityMode ( VisibilityMode  mode) [inherited]

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.

unsigned int size ( ) [inherited]
stealChildren ( EggGroupNode  other) [inherited]

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.

stealVrefs ( EggGroup  other) [inherited]

Moves all of the vertex references from the indicated other group into this one.

If a given vertex was previously shared by both groups, the relative memberships will be summed.

static AlphaMode stringAlphaMode ( string  string) [static, inherited]

Returns the AlphaMode value associated with the given string representation, or AM_unspecified if the string does not match any known AlphaMode value.

static BillboardType stringBillboardType ( string  strval) [static, inherited]

Returns the BillboardType value associated with the given string representation, or BT_none if the string does not match any known BillboardType value.

static BlendMode stringBlendMode ( string  strval) [static, inherited]

Returns the BlendMode value associated with the given string representation, or BM_none if the string does not match any known BlendMode.

static BlendOperand stringBlendOperand ( string  strval) [static, inherited]

Returns the BlendOperand value associated with the given string representation, or BO_none if the string does not match any known BlendOperand.

static CollideFlags stringCollideFlags ( string  strval) [static, inherited]

Returns the CollideFlags value associated with the given string representation, or CF_none if the string does not match any known CollideFlags value.

This only recognizes a single keyword; it does not attempt to parse a string of keywords.

static CollisionSolidType stringCsType ( string  strval) [static, inherited]

Returns the CollisionSolidType value associated with the given string representation, or CST_none if the string does not match any known CollisionSolidType value.

static DartType stringDartType ( string  strval) [static, inherited]

Returns the DartType value associated with the given string representation, or DT_none if the string does not match any known DartType value.

static DCSType stringDcsType ( string  strval) [static, inherited]

Returns the DCSType value associated with the given string representation, or DC_unspecified if the string does not match any known DCSType value.

static DepthTestMode stringDepthTestMode ( string  string) [static, inherited]

Returns the DepthTestMode value associated with the given string representation, or DTM_unspecified if the string does not match any known DepthTestMode value.

static DepthWriteMode stringDepthWriteMode ( string  string) [static, inherited]

Returns the DepthWriteMode value associated with the given string representation, or DWM_unspecified if the string does not match any known DepthWriteMode value.

static GroupType stringGroupType ( string  strval) [static, inherited]

Returns the GroupType value associated with the given string representation, or GT_invalid if the string does not match any known GroupType value.

static VisibilityMode stringVisibilityMode ( string  string) [static, inherited]

Returns the HiddenMode value associated with the given string representation, or VM_unspecified if the string does not match any known HiddenMode value.

stripNormals ( ) [inherited]

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.

Reimplemented in EggData.

testUnderIntegrity ( ) [inherited]

Recursively checks the integrity of the _under_flags, _parent, and _depth members of this node and all of its ancestors.

testVrefIntegrity ( ) [inherited]

Verifies that each vertex in the group exists and that it knows it is referenced by the group.

transform ( Mat4D const  mat) [inherited]

Applies the indicated transformation to the node and all of its descendants.

Reimplemented in EggVertexPool.

bool transformIsIdentity ( ) [inherited]

Returns true if the described transform is identity, false otherwise.

transformVerticesOnly ( Mat4D const  mat) [inherited]

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.

int triangulatePolygons ( int  flags) [inherited]

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 ( bool  use_connected_shading,
bool  allow_per_primitive,
bool  recurse 
) [inherited]

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().

unrefAllVertices ( ) [inherited]

Removes all vertices from the reference list.

unrefVertex ( EggVertex  vert) [inherited]

Removes the vertex from the set of those referenced by the group.

Does nothing if the vertex is not already reffed.

write ( ostream  out,
int  indent_level 
) [inherited]

Writes the group and all of its children to the indicated output stream in Egg format.

Reimplemented from EggRenderMode.

write ( ostream  out,
int  indent_level,
string  label 
) [inherited]

Writes the transform to the indicated stream in Egg format.

writeBillboardFlags ( ostream  out,
int  indent_level 
) [inherited]

Writes just the <Billboard> entry and related fields to the indicated ostream.

writeCollideFlags ( ostream  out,
int  indent_level 
) [inherited]

Writes just the <Collide> entry and related fields to the indicated ostream.

writeDecalFlags ( ostream  out,
int  indent_level 
) [inherited]

Writes the flags related to decaling, if any.

writeModelFlags ( ostream  out,
int  indent_level 
) [inherited]

Writes the <Model> flag and related flags to the indicated ostream.

writeObjectTypes ( ostream  out,
int  indent_level 
) [inherited]

Writes just the <ObjectTypes> entries, if any, to the indicated ostream.

writeRenderMode ( ostream  out,
int  indent_level 
) [inherited]

Writes the flags inherited from EggRenderMode and similar flags that control obscure render effects.

writeSwitchFlags ( ostream  out,
int  indent_level 
) [inherited]

Writes the <Switch> flag and related flags to the indicated ostream.

writeTags ( ostream  out,
int  indent_level 
) [inherited]

Writes just the <Tag> entries, if any, to the indicated ostream.


Member Data Documentation

BitMaskunsigned int [inherited]
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties