Panda3D
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
EggGroup Class Reference

The main glue of the egg hierarchy, this corresponds to the <Group>, <Instance>, and <Joint> type nodes. More...

#include "eggGroup.h"

Inheritance diagram for EggGroup:
EggGroupNode EggRenderMode EggTransform EggNode EggNamedObject EggObject Namable TypedReferenceCount MemoryBase TypedObject ReferenceCount MemoryBase MemoryBase EggBin

Public Types

enum  BillboardType { BT_none = 0x00000000, BT_axis = 0x00000020, BT_point_camera_relative = 0x00000040, BT_point_world_relative = 0x00000080 }
 
enum  BlendMode {
  BM_unspecified, BM_none, BM_add, BM_subtract,
  BM_inv_subtract, BM_min, BM_max
}
 
enum  BlendOperand {
  BO_unspecified, BO_zero, BO_one, BO_incoming_color,
  BO_one_minus_incoming_color, BO_fbuffer_color, BO_one_minus_fbuffer_color, BO_incoming_alpha,
  BO_one_minus_incoming_alpha, BO_fbuffer_alpha, BO_one_minus_fbuffer_alpha, BO_constant_color,
  BO_one_minus_constant_color, BO_constant_alpha, BO_one_minus_constant_alpha, BO_incoming_color_saturate,
  BO_color_scale, BO_one_minus_color_scale, BO_alpha_scale, BO_one_minus_alpha_scale
}
 
enum  CollideFlags {
  CF_none = 0x00000000, CF_descend = 0x00100000, CF_event = 0x00200000, CF_keep = 0x00400000,
  CF_solid = 0x00800000, CF_center = 0x01000000, CF_turnstile = 0x02000000, CF_level = 0x04000000,
  CF_intangible = 0x08000000
}
 
enum  CollisionSolidType {
  CST_none = 0x00000000, CST_plane = 0x00010000, CST_polygon = 0x00020000, CST_polyset = 0x00030000,
  CST_sphere = 0x00040000, CST_tube = 0x00050000, CST_inv_sphere = 0x00060000, CST_box = 0x00070000,
  CST_floor_mesh = 0x00080000
}
 
enum  DartType {
  DT_none = 0x00000000, DT_structured = 0x10000000, DT_sync = 0x20000000, DT_nosync = 0x30000000,
  DT_default = 0x40000000
}
 
enum  DCSType {
  DC_unspecified = 0x00000000, DC_none = 0x00000010, DC_local = 0x00000020, DC_net = 0x00000030,
  DC_no_touch = 0x00000040, DC_default = 0x00000050
}
 
enum  GroupType { GT_invalid = -1, GT_group = 0x00000000, GT_instance = 0x00000001, GT_joint = 0x00000002 }
 
typedef pmap< std::string, std::string > TagData
 
typedef pmap< PT_EggVertex, double > VertexRef
 
- Public Types inherited from EggGroupNode
typedef Children::const_iterator const_iterator
 
typedef Children::const_pointer const_pointer
 
typedef Children::const_reference const_reference
 
typedef Children::const_reverse_iterator const_reverse_iterator
 
typedef Children::difference_type difference_type
 
typedef Children::const_iterator iterator
 
typedef Children::const_pointer pointer
 
typedef Children::const_reference reference
 
typedef Children::const_reverse_iterator reverse_iterator
 
typedef Children::size_type size_type
 
enum  TriangulateFlags {
  T_polygon = 0x001, T_convex = 0x002, T_composite = 0x004, T_recurse = 0x008,
  T_flat_shaded = 0x010
}
 
- Public Types inherited from EggRenderMode
enum  AlphaMode {
  AM_unspecified, AM_off, AM_on, AM_blend,
  AM_blend_no_occlude, AM_ms, AM_ms_mask, AM_binary,
  AM_dual, AM_premultiplied
}
 
enum  DepthTestMode { DTM_unspecified, DTM_off, DTM_on }
 
enum  DepthWriteMode { DWM_unspecified, DWM_off, DWM_on }
 
enum  VisibilityMode { VM_unspecified, VM_hidden, VM_normal }
 
- Public Types inherited from EggTransform
enum  ComponentType {
  CT_invalid, CT_translate2d, CT_translate3d, CT_rotate2d,
  CT_rotx, CT_roty, CT_rotz, CT_rotate3d,
  CT_scale2d, CT_scale3d, CT_uniform_scale, CT_matrix3,
  CT_matrix4
}
 

Public Member Functions

 EggGroup (const std::string &name="")
 
 EggGroup (const EggGroup &copy)
 
void add_group_ref (EggGroup *group)
 Adds a new <Ref> entry to the group. More...
 
void add_object_type (const std::string &object_type)
 
virtual EggTransformas_transform ()
 Returns this object cross-cast to an EggTransform pointer, if it inherits from EggTransform, or NULL if it does not. More...
 
void clear_billboard_center ()
 
void clear_blend_color ()
 
void clear_collide_mask ()
 
void clear_collision_name ()
 
void clear_default_pose ()
 Removes the initial pose transform. More...
 
void clear_from_collide_mask ()
 
void clear_group_refs ()
 Removes all of the <Ref> entries within this group. More...
 
void clear_indexed_flag ()
 
void clear_into_collide_mask ()
 
void clear_lod ()
 
void clear_object_types ()
 
void clear_tag (const std::string &key)
 Removes the value defined for this key on this particular node. More...
 
virtual EggRenderModedetermine_alpha_mode ()
 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. More...
 
virtual EggRenderModedetermine_bin ()
 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. More...
 
virtual bool determine_decal ()
 Walks back up the hierarchy, looking for an EggGroup at this level or above that has the "decal" flag set. More...
 
virtual EggRenderModedetermine_depth_offset ()
 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. More...
 
virtual EggRenderModedetermine_depth_test_mode ()
 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. More...
 
virtual EggRenderModedetermine_depth_write_mode ()
 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. More...
 
virtual EggRenderModedetermine_draw_order ()
 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. More...
 
virtual bool determine_indexed ()
 Walks back up the hierarchy, looking for an EggGroup at this level or above that has the "indexed" scalar set. More...
 
virtual EggRenderModedetermine_visibility_mode ()
 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. More...
 
virtual TypeHandle force_init_type ()
 
const LPoint3d & get_billboard_center () const
 
BillboardType get_billboard_type () const
 
const LColor & get_blend_color () const
 
BlendMode get_blend_mode () const
 
BlendOperand get_blend_operand_a () const
 
BlendOperand get_blend_operand_b () const
 
CollideFlags get_collide_flags () const
 
CollideMask get_collide_mask () const
 
const std::string & get_collision_name () const
 
CollisionSolidType get_cs_type () const
 
DartType get_dart_type () const
 
DCSType get_dcs_type () const
 
bool get_decal_flag () const
 
const EggTransformget_default_pose () const
 
bool get_direct_flag () const
 
CollideMask get_from_collide_mask () const
 
EggGroupget_group_ref (int n) const
 
GroupType get_group_type () const
 
bool get_indexed_flag () const
 
CollideMask get_into_collide_mask () const
 
const EggSwitchConditionget_lod () const
 
bool get_model_flag () const
 
bool get_nofog_flag () const
 
int get_num_group_refs () const
 
int get_num_object_types () const
 
std::string get_object_type (int index) const
 
bool get_occluder_flag () const
 
bool get_polylight_flag () const
 
bool get_portal_flag () const
 
double get_scroll_r () const
 
double get_scroll_u () const
 
double get_scroll_v () const
 
double get_scroll_w () const
 
bool get_switch_flag () const
 
double get_switch_fps () const
 
std::string get_tag (const std::string &key) const
 Retrieves the user-defined value that was previously set on this node for the particular key, if any. More...
 
bool get_texlist_flag () const
 
virtual TypeHandle get_type () const
 
double get_vertex_membership (const EggVertex *vert) const
 Returns the amount of membership of the indicated vertex in this group. More...
 
bool has_billboard_center () const
 
bool has_blend_color () const
 
bool has_collide_mask () const
 
bool has_collision_name () const
 
bool has_dcs_type () const
 Returns true if the specified DCS type is not DC_none and not DC_unspecified. More...
 
bool has_from_collide_mask () const
 
bool has_indexed_flag () const
 
bool has_into_collide_mask () const
 
bool has_lod () const
 
bool has_object_type (const std::string &object_type) const
 Returns true if the indicated object type has been added to the group, or false otherwise. More...
 
bool has_scrolling_uvs ()
 
bool has_tag (const std::string &key) const
 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. More...
 
bool is_instance_type () const
 Returns true if this group is an instance type node; i.e. More...
 
virtual bool is_joint () const
 Returns true if this particular node represents a <Joint> entry or not. More...
 
EggTransformmodify_default_pose ()
 Returns a writable accessor to the initial pose transform. More...
 
EggGroupoperator= (const EggGroup &copy)
 
void ref_vertex (EggVertex *vert, double membership=1.0)
 Adds the vertex to the set of those referenced by the group, at the indicated membership level. More...
 
void remove_group_ref (int n)
 Removes the nth <Ref> entry within this group. More...
 
bool remove_object_type (const std::string &object_type)
 Removes the first instance of the indicated object type from the group if it is present. More...
 
void set_billboard_center (const LPoint3d &billboard_center)
 
void set_billboard_type (BillboardType type)
 
void set_blend_color (const LColor &blend_color)
 
void set_blend_mode (BlendMode blend_mode)
 
void set_blend_operand_a (BlendOperand blend_operand_a)
 
void set_blend_operand_b (BlendOperand blend_operand_b)
 
void set_collide_flags (int flags)
 
void set_collide_mask (CollideMask mask)
 
void set_collision_name (const std::string &collision_name)
 
void set_cs_type (CollisionSolidType type)
 
void set_dart_type (DartType type)
 
void set_dcs_type (DCSType type)
 
void set_decal_flag (bool flag)
 
void set_default_pose (const EggTransform &transform)
 
void set_direct_flag (bool flag)
 
void set_from_collide_mask (CollideMask mask)
 
void set_group_type (GroupType type)
 
void set_indexed_flag (bool flag)
 
void set_into_collide_mask (CollideMask mask)
 
void set_lod (const EggSwitchCondition &lod)
 
void set_model_flag (bool flag)
 
void set_nofog_flag (bool flag)
 
void set_occluder_flag (bool flag)
 
void set_polylight_flag (bool flag)
 
void set_portal_flag (bool flag)
 
void set_scroll_r (const double r_speed)
 
void set_scroll_u (const double u_speed)
 
void set_scroll_v (const double v_speed)
 
void set_scroll_w (const double w_speed)
 
void set_switch_flag (bool flag)
 
void set_switch_fps (double fps)
 
void set_tag (const std::string &key, const std::string &value)
 Associates a user-defined value with a user-defined key which is stored on the node. More...
 
void set_texlist_flag (bool flag)
 
void set_vertex_membership (EggVertex *vert, double membership)
 Explicitly sets the net membership of the indicated vertex in this group to the given value. More...
 
void steal_vrefs (EggGroup *other)
 Moves all of the vertex references from the indicated other group into this one. More...
 
TagData::const_iterator tag_begin () const
 Returns an iterator that can, in conjunction with tag_end(), be used to traverse the entire set of tag keys. More...
 
TagData::const_iterator tag_end () const
 Returns an iterator that can, in conjunction with tag_begin(), be used to traverse the entire set of tag keys. More...
 
TagData::size_type tag_size () const
 Returns the number of elements between tag_begin() and tag_end(). More...
 
void test_vref_integrity () const
 
void unref_all_vertices ()
 Removes all vertices from the reference list. More...
 
void unref_vertex (EggVertex *vert)
 Removes the vertex from the set of those referenced by the group. More...
 
VertexRef::const_iterator vref_begin () const
 Returns an iterator that can, in conjunction with vref_end(), be used to traverse the entire set of referenced vertices. More...
 
VertexRef::const_iterator vref_end () const
 Returns an iterator that can, in conjunction with vref_begin(), be used to traverse the entire set of referenced vertices. More...
 
VertexRef::size_type vref_size () const
 Returns the number of elements between vref_begin() and vref_end(). More...
 
virtual void write (std::ostream &out, int indent_level) const
 Writes the group and all of its children to the indicated output stream in Egg format. More...
 
void write_billboard_flags (std::ostream &out, int indent_level) const
 Writes just the <Billboard> entry and related fields to the indicated ostream. More...
 
void write_collide_flags (std::ostream &out, int indent_level) const
 Writes just the <Collide> entry and related fields to the indicated ostream. More...
 
void write_decal_flags (std::ostream &out, int indent_level) const
 Writes the flags related to decaling, if any. More...
 
void write_model_flags (std::ostream &out, int indent_level) const
 Writes the <Model> flag and related flags to the indicated ostream. More...
 
void write_object_types (std::ostream &out, int indent_level) const
 Writes just the <ObjectTypes> entries, if any, to the indicated ostream. More...
 
void write_render_mode (std::ostream &out, int indent_level) const
 Writes the flags inherited from EggRenderMode and similar flags that control obscure render effects. More...
 
void write_switch_flags (std::ostream &out, int indent_level) const
 Writes the <Switch> flag and related flags to the indicated ostream. More...
 
void write_tags (std::ostream &out, int indent_level) const
 Writes just the <Tag> entries, if any, to the indicated ostream. More...
 
- Public Member Functions inherited from EggGroupNode
 EggGroupNode (const std::string &name="")
 
 EggGroupNode (const EggGroupNode &copy)
 
EggNodeadd_child (EggNode *node)
 Adds the indicated child to the group and returns it. More...
 
void apply_first_attribute (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. More...
 
void apply_last_attribute (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. More...
 
iterator begin () const
 
void clear ()
 
void clear_connected_shading ()
 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(). More...
 
bool empty () const
 
iterator end () const
 
iterator erase (iterator position)
 
iterator erase (iterator first, iterator last)
 
EggNodefind_child (const std::string &name) const
 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. More...
 
void force_filenames (const Filename &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. More...
 
void get_connected_shading ()
 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. More...
 
EggNodeget_first_child ()
 Returns the first child in the group's list of children, or NULL if the list of children is empty. More...
 
EggNodeget_next_child ()
 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. More...
 
bool has_absolute_pathnames () const
 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. More...
 
virtual bool has_normals () const
 Returns true if any of the primitives (e.g. More...
 
virtual bool has_primitives () const
 Returns true if there are any primitives (e.g. More...
 
iterator insert (iterator position, PT(EggNode) x)
 
virtual bool joint_has_primitives () const
 Returns true if there are any primitives (e.g. More...
 
void make_point_primitives ()
 Creates PointLight primitives to reference any otherwise unreferences vertices discovered in this group or below. More...
 
void mesh_triangles (int flags)
 Combine triangles together into triangle strips, at this group and below. More...
 
EggGroupNodeoperator= (const EggGroupNode &copy)
 
void post_apply_flat_attribute (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*. More...
 
 PT (EggNode) remove_child(EggNode *node)
 
reverse_iterator rbegin () const
 
void rebuild_vertex_pools (EggVertexPools &vertex_pools, unsigned int max_vertices, bool recurse)
 Copies vertices used by the primitives at this group node (and below, if recurse is true) into one or more new vertex pools, and updates the primitives to reference these pools. More...
 
void recompute_polygon_normals (CoordinateSystem cs=CS_default)
 Recomputes all the polygon normals for polygon geometry at this group node and below so that they accurately reflect the vertex positions. More...
 
bool recompute_tangent_binormal (const GlobPattern &uv_name)
 This function recomputes the tangent and binormal for the named texture coordinate set for all vertices at this level and below. More...
 
bool recompute_tangent_binormal (const vector_string &names)
 This function recomputes the tangent and binormal for the named texture coordinate sets. More...
 
bool recompute_tangent_binormal_auto ()
 This function recomputes the tangent and binormal for any texture coordinate set that affects a normal map. More...
 
void recompute_vertex_normals (double threshold, CoordinateSystem cs=CS_default)
 Recomputes all the vertex normals for polygon geometry at this group node and below so that they accurately reflect the vertex positions. More...
 
int remove_invalid_primitives (bool recurse)
 Removes primitives at this level and below which appear to be degenerate; e.g. More...
 
int remove_unused_vertices (bool recurse)
 Removes all vertices from VertexPools within this group or below that are not referenced by at least one primitive. More...
 
int rename_nodes (vector_string strip_prefix, bool recurse)
 Rename by stripping out the prefix. More...
 
reverse_iterator rend () const
 
void replace (iterator position, PT(EggNode) x)
 Replaces the node at the indicated position with the indicated node. More...
 
void resolve_filenames (const DSearchPath &searchpath)
 Walks the tree and attempts to resolve any filenames encountered. More...
 
void reverse_vertex_ordering ()
 Reverses the vertex ordering of all polygons defined at this node and below. More...
 
size_type size () const
 
void steal_children (EggGroupNode &other)
 Moves all the children from the other node to this one. More...
 
void strip_normals ()
 Removes all normals from primitives, and the vertices they reference, at this node and below. More...
 
int triangulate_polygons (int flags)
 Replace all higher-order polygons at this point in the scene graph and below with triangles. More...
 
void unify_attributes (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. More...
 
- Public Member Functions inherited from EggNode
 EggNode (const std::string &name="")
 
 EggNode (const EggNode &copy)
 
void apply_texmats ()
 Applies the texture matrices to the UV's of the vertices that reference them, and then removes the texture matrices from the textures themselves. More...
 
void flatten_transforms ()
 Removes any transform and instance records from this node in the scene graph and below. More...
 
int get_depth () const
 
const LMatrix4d & get_node_frame () const
 Returns the coordinate frame of the node itself. More...
 
const LMatrix4d & get_node_frame_inv () const
 Returns the inverse of the matrix returned by get_node_frame(). More...
 
const LMatrix4d * get_node_frame_inv_ptr () const
 Returns either a NULL pointer or a unique pointer shared by nodes with the same get_node_frame_inv() matrix. More...
 
const LMatrix4d * get_node_frame_ptr () const
 Returns either a NULL pointer or a unique pointer shared by nodes with the same get_node_frame() matrix. More...
 
const LMatrix4d & get_node_to_vertex () const
 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. More...
 
const LMatrix4d * get_node_to_vertex_ptr () const
 Returns either a NULL pointer or a unique pointer shared by nodes with the same get_node_to_vertex() matrix. More...
 
EggGroupNodeget_parent () const
 
const LMatrix4d & get_vertex_frame () const
 Returns the coordinate frame of the vertices referenced by primitives at or under this node. More...
 
const LMatrix4d & get_vertex_frame_inv () const
 Returns the inverse of the matrix returned by get_vertex_frame(). More...
 
const LMatrix4d * get_vertex_frame_inv_ptr () const
 Returns either a NULL pointer or a unique pointer shared by nodes with the same get_vertex_frame_inv() matrix. More...
 
const LMatrix4d * get_vertex_frame_ptr () const
 Returns either a NULL pointer or a unique pointer shared by nodes with the same get_vertex_frame() matrix. More...
 
const LMatrix4d & get_vertex_to_node () const
 Returns the transformation matrix suitable for converting the vertices as read from the egg file into the coordinate space of the node. More...
 
const LMatrix4d * get_vertex_to_node_ptr () const
 Returns either a NULL pointer or a unique pointer shared by nodes with the same get_vertex_to_node() matrix. More...
 
virtual bool is_anim_matrix () const
 Returns true if this node represents a table of animation transformation data, false otherwise. More...
 
bool is_local_coord () const
 Returns true if this node's vertices are not in the global coordinate space. More...
 
bool is_under_instance () const
 Returns true if there is an <Instance> node somewhere in the egg tree at or above this node, false otherwise. More...
 
bool is_under_transform () const
 Returns true if there is a <Transform> entry somewhere in the egg tree at or above this node, false otherwise. More...
 
EggNodeoperator= (const EggNode &copy)
 
bool parse_egg (const std::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. More...
 
int rename_node (vector_string strip_prefix)
 Rename by stripping out the prefix. More...
 
void test_under_integrity () const
 
void transform (const LMatrix4d &mat)
 Applies the indicated transformation to the node and all of its descendants. More...
 
void transform_vertices_only (const LMatrix4d &mat)
 Applies the indicated transformation only to vertices that appear in global space within vertex pools at this node and below. More...
 
- Public Member Functions inherited from EggNamedObject
 EggNamedObject (const std::string &name="")
 
 EggNamedObject (const EggNamedObject &copy)
 
EggNamedObjectoperator= (const EggNamedObject &copy)
 
void output (std::ostream &out) const
 
void write_header (std::ostream &out, int indent_level, const char *egg_keyword) const
 Writes the first line of the egg object, e.g. More...
 
- Public Member Functions inherited from EggObject
 EggObject (const EggObject &copy)
 
void clear_user_data ()
 Removes *all* user data pointers from the node. More...
 
void clear_user_data (TypeHandle type)
 Removes the user data pointer of the indicated type. More...
 
EggUserDataget_user_data () const
 Returns the user data pointer most recently stored on this object, or NULL if nothing was previously stored. More...
 
EggUserDataget_user_data (TypeHandle type) const
 Returns the user data pointer of the indicated type, if it exists, or NULL if it does not. More...
 
bool has_user_data () const
 Returns true if a generic user data pointer has recently been set and not yet cleared, false otherwise. More...
 
bool has_user_data (TypeHandle type) const
 Returns true if the user data pointer of the indicated type has been set, false otherwise. More...
 
EggObjectoperator= (const EggObject &copy)
 
void set_user_data (EggUserData *user_data)
 Sets the user data associated with this object. More...
 
- Public Member Functions inherited from TypedReferenceCount
 TypedReferenceCount (const TypedReferenceCount &copy)
 
void operator= (const TypedReferenceCount &copy)
 
- Public Member Functions inherited from TypedObject
 TypedObject (const TypedObject &copy)=default
 
TypedObjectas_typed_object ()
 Returns the object, upcast (if necessary) to a TypedObject pointer. More...
 
const TypedObjectas_typed_object () const
 Returns the object, upcast (if necessary) to a TypedObject pointer. More...
 
int get_best_parent_from_Set (const std::set< int > &) const
 
int get_type_index () const
 Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. More...
 
bool is_exact_type (TypeHandle handle) const
 Returns true if the current object is the indicated type exactly. More...
 
bool is_of_type (TypeHandle handle) const
 Returns true if the current object is or derives from the indicated type. More...
 
TypedObjectoperator= (const TypedObject &copy)=default
 
- Public Member Functions inherited from ReferenceCount
int get_ref_count () const
 
WeakReferenceListget_weak_list () const
 Returns the WeakReferenceList associated with this ReferenceCount object. More...
 
bool has_weak_list () const
 Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise. More...
 
void local_object ()
 This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack. More...
 
void ref () const
 Explicitly increments the reference count. More...
 
bool ref_if_nonzero () const
 Atomically increases the reference count of this object if it is not zero. More...
 
bool test_ref_count_integrity () const
 Does some easy checks to make sure that the reference count isn't completely bogus. More...
 
bool test_ref_count_nonzero () const
 Does some easy checks to make sure that the reference count isn't zero, or completely bogus. More...
 
virtual bool unref () const
 Explicitly decrements the reference count. More...
 
WeakReferenceListweak_ref ()
 Adds the indicated PointerToVoid as a weak reference to this object. More...
 
void weak_unref ()
 Removes the indicated PointerToVoid as a weak reference to this object. More...
 
- Public Member Functions inherited from Namable
 Namable (const std::string &initial_name="")
 
void clear_name ()
 Resets the Namable's name to empty. More...
 
const std::string & get_name () const
 
bool has_name () const
 Returns true if the Namable has a nonempty name set, false if the name is empty. More...
 
void output (std::ostream &out) const
 Outputs the Namable. More...
 
void set_name (const std::string &name)
 
- Public Member Functions inherited from EggRenderMode
 EggRenderMode (const EggRenderMode &copy)
 
void clear_bin ()
 Removes the bin name that was set for this particular object. More...
 
void clear_depth_offset ()
 Removes the depth-offset flag from this particular object. More...
 
void clear_draw_order ()
 Removes the draw-order flag from this particular object. More...
 
AlphaMode get_alpha_mode () const
 Returns the alpha mode that was set, or AM_unspecified if nothing was set. More...
 
std::string get_bin () const
 Returns the bin name that has been set for this particular object, if any. More...
 
int get_depth_offset () const
 Returns the "depth-offset" flag as set for this particular object. More...
 
DepthTestMode get_depth_test_mode () const
 Returns the depth_test mode that was set, or DTM_unspecified if nothing was set. More...
 
DepthWriteMode get_depth_write_mode () const
 Returns the depth_write mode that was set, or DWM_unspecified if nothing was set. More...
 
int get_draw_order () const
 Returns the "draw-order" flag as set for this particular object. More...
 
VisibilityMode get_visibility_mode () const
 Returns the visibility mode that was set, or VM_unspecified if nothing was set. More...
 
bool has_bin () const
 Returns true if a bin name has been set for this particular object. More...
 
bool has_depth_offset () const
 Returns true if the depth-offset flag has been set for this particular object. More...
 
bool has_draw_order () const
 Returns true if the draw-order flag has been set for this particular object. More...
 
bool operator != (const EggRenderMode &other) const
 
bool operator< (const EggRenderMode &other) const
 
EggRenderModeoperator= (const EggRenderMode &copy)
 
bool operator== (const EggRenderMode &other) const
 
void set_alpha_mode (AlphaMode mode)
 Specifies precisely how the transparency for this geometry should be achieved, or if it should be used. More...
 
void set_bin (const std::string &bin)
 Sets the "bin" string for this particular object. More...
 
void set_depth_offset (int bias)
 Sets the "depth-offset" flag associated with this object. More...
 
void set_depth_test_mode (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). More...
 
void set_depth_write_mode (DepthWriteMode mode)
 Specifies whether writes should be made to the depth buffer (assuming the rendering backend provides a depth buffer) when rendering this geometry. More...
 
void set_draw_order (int order)
 Sets the "draw-order" flag associated with this object. More...
 
void set_visibility_mode (VisibilityMode mode)
 Specifies whether this geometry is to be considered normally visible, or hidden. More...
 
void write (std::ostream &out, int indent_level) const
 Writes the attributes to the indicated output stream in Egg format. More...
 
- Public Member Functions inherited from EggTransform
 EggTransform (const EggTransform &copy)
 
void add_matrix3 (const LMatrix3d &mat)
 Appends an arbitrary 3x3 matrix to the current transform. More...
 
void add_matrix4 (const LMatrix4d &mat)
 Appends an arbitrary 4x4 matrix to the current transform. More...
 
void add_rotate2d (double angle)
 Appends a 2-d rotation to the current transform. More...
 
void add_rotate3d (double angle, const LVector3d &axis)
 Appends a 3-d rotation about an arbitrary axis to the current transform. More...
 
void add_rotate3d (const LQuaterniond &quat)
 Appends an arbitrary 3-d rotation to the current transform, expressed as a quaternion. More...
 
void add_rotx (double angle)
 Appends a rotation about the X axis to the current transform. More...
 
void add_roty (double angle)
 Appends a rotation about the Y axis to the current transform. More...
 
void add_rotz (double angle)
 Appends a rotation about the Z axis to the current transform. More...
 
void add_scale2d (const LVecBase2d &scale)
 Appends a possibly non-uniform scale to the current transform. More...
 
void add_scale3d (const LVecBase3d &scale)
 Appends a possibly non-uniform scale to the current transform. More...
 
void add_translate2d (const LVector2d &translate)
 Appends a 2-d translation operation to the current transform. More...
 
void add_translate3d (const LVector3d &translate)
 Appends a 3-d translation operation to the current transform. More...
 
void add_uniform_scale (double scale)
 Appends a uniform scale to the current transform. More...
 
void clear_transform ()
 Resets the transform to empty, identity. More...
 
const LMatrix3d & get_component_mat3 (int n) const
 Returns the 3x3 matrix associated with the nth component. More...
 
const LMatrix4d & get_component_mat4 (int n) const
 Returns the 4x4 matrix associated with the nth component. More...
 
double get_component_number (int n) const
 Returns the solitary number associated with the nth component. More...
 
ComponentType get_component_type (int n) const
 Returns the type of the nth component. More...
 
const LVecBase2d & get_component_vec2 (int n) const
 Returns the 2-component vector associated with the nth component. More...
 
const LVecBase3d & get_component_vec3 (int n) const
 Returns the 3-component vector associated with the nth component. More...
 
int get_num_components () const
 Returns the number of components that make up the transform. More...
 
LMatrix3d get_transform2d () const
 Returns the overall transform as a 3x3 matrix. More...
 
const LMatrix4d & get_transform3d () const
 Returns the overall transform as a 4x4 matrix. More...
 
bool has_transform () const
 Returns true if the transform is nonempty, false if it is empty (no transform components have been added). More...
 
bool has_transform2d () const
 Returns true if the transform is specified as a 2-d transform, e.g. More...
 
bool has_transform3d () const
 Returns true if the transform is specified as a 3-d transform, e.g. More...
 
EggTransformoperator= (const EggTransform &copy)
 
void set_transform2d (const LMatrix3d &mat)
 Sets the overall transform as a 3x3 matrix. More...
 
void set_transform3d (const LMatrix4d &mat)
 Sets the overall transform as a 4x4 matrix. More...
 
bool transform_is_identity () const
 Returns true if the described transform is identity, false otherwise. More...
 
void write (std::ostream &out, int indent_level, const std::string &label) const
 Writes the transform to the indicated stream in Egg format. More...
 

Static Public Member Functions

static TypeHandle get_class_type ()
 
static void init_type ()
 
static BillboardType string_billboard_type (const std::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. More...
 
static BlendMode string_blend_mode (const std::string &strval)
 Returns the BlendMode value associated with the given string representation, or BM_none if the string does not match any known BlendMode. More...
 
static BlendOperand string_blend_operand (const std::string &strval)
 Returns the BlendOperand value associated with the given string representation, or BO_none if the string does not match any known BlendOperand. More...
 
static CollideFlags string_collide_flags (const std::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. More...
 
static CollisionSolidType string_cs_type (const std::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. More...
 
static DartType string_dart_type (const std::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. More...
 
static DCSType string_dcs_type (const std::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. More...
 
static GroupType string_group_type (const std::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. More...
 
- Static Public Member Functions inherited from EggGroupNode
static TypeHandle get_class_type ()
 
static void init_type ()
 
static bool is_right (const LVector2d &v1, const LVector2d &v2)
 Returns true if the 2-d v1 is to the right of v2. More...
 
- Static Public Member Functions inherited from EggNode
static TypeHandle get_class_type ()
 
static void init_type ()
 
- Static Public Member Functions inherited from EggNamedObject
static TypeHandle get_class_type ()
 
static void init_type ()
 
- Static Public Member Functions inherited from EggObject
static TypeHandle get_class_type ()
 
static void init_type ()
 
- Static Public Member Functions inherited from TypedReferenceCount
static TypeHandle get_class_type ()
 
static void init_type ()
 
- Static Public Member Functions inherited from TypedObject
static TypeHandle get_class_type ()
 
static void init_type ()
 This function is declared non-inline to work around a compiler bug in g++ 2.96. More...
 
- Static Public Member Functions inherited from ReferenceCount
static TypeHandle get_class_type ()
 
static void init_type ()
 
- Static Public Member Functions inherited from Namable
static TypeHandle get_class_type ()
 
static void init_type ()
 
- Static Public Member Functions inherited from EggRenderMode
static TypeHandle get_class_type ()
 
static void init_type ()
 
static AlphaMode string_alpha_mode (const std::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. More...
 
static DepthTestMode string_depth_test_mode (const std::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. More...
 
static DepthWriteMode string_depth_write_mode (const std::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. More...
 
static VisibilityMode string_visibility_mode (const std::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. More...
 

Public Attributes

 clear_billboard_center
 
 clear_blend_color
 Removes the blend color specification. More...
 
 clear_collide_mask
 
 clear_from_collide_mask
 
 clear_indexed_flag
 
 clear_into_collide_mask
 
 clear_lod
 
 get_billboard_center
 
 get_billboard_type
 
 get_blend_color
 Returns the blend color if one has been specified, or (0, 0, 0, 0) if one has not. More...
 
 get_blend_mode
 
 get_blend_operand_a
 
 get_blend_operand_b
 
 get_collide_flags
 
 get_collide_mask
 
 get_collision_name
 
 get_cs_type
 
 get_dart_type
 
 get_dcs_type
 
 get_decal_flag
 
 get_default_pose
 Returns a read-only accessor to the initial pose transform. More...
 
 get_direct_flag
 
 get_from_collide_mask
 
 get_group_ref
 Returns the nth <Ref> entry within this group. More...
 
 get_group_type
 
 get_indexed_flag
 
 get_into_collide_mask
 
 get_lod
 
 get_model_flag
 
 get_nofog_flag
 
 get_num_group_refs
 Returns the number of <Ref> entries within this group. More...
 
 get_num_object_types
 
 get_object_type
 
 get_occluder_flag
 
 get_portal_flag
 
 get_scroll_r
 
 get_scroll_u
 
 get_scroll_v
 
 get_scroll_w
 
 get_switch_flag
 
 get_switch_fps
 
 get_texlist_flag
 
 has_billboard_center
 
 has_blend_color
 Returns true if the blend color has been specified, false otherwise. More...
 
 has_collide_mask
 
 has_from_collide_mask
 
 has_indexed_flag
 
 has_into_collide_mask
 
 has_lod
 
 set_billboard_center
 Sets the point around which the billboard will rotate, if this node contains a billboard specification. More...
 
 set_billboard_type
 
 set_blend_color
 
 set_blend_mode
 
 set_blend_operand_a
 
 set_blend_operand_b
 
 set_collide_flags
 
 set_collide_mask
 
 set_collision_name
 
 set_cs_type
 
 set_dart_type
 
 set_dcs_type
 
 set_decal_flag
 
 set_default_pose
 Replaces the initial pose transform. More...
 
 set_direct_flag
 
 set_from_collide_mask
 
 set_group_type
 
 set_indexed_flag
 If this flag is true, geometry at this node and below will be generated as indexed geometry. More...
 
 set_into_collide_mask
 
 set_lod
 
 set_model_flag
 
 set_nofog_flag
 
 set_occluder_flag
 
 set_portal_flag
 
 set_scroll_r
 
 set_scroll_u
 
 set_scroll_v
 
 set_scroll_w
 
 set_switch_flag
 
 set_switch_fps
 
 set_texlist_flag
 
- Public Attributes inherited from EggGroupNode
 get_children
 
- Public Attributes inherited from EggNode
 get_depth
 Returns the number of nodes above this node in the egg hierarchy. More...
 
 get_parent
 
- Public Attributes inherited from TypedObject
 get_type
 
- Public Attributes inherited from ReferenceCount
 get_ref_count
 Returns the current reference count. More...
 
- Public Attributes inherited from Namable
 get_name
 
 set_name
 

Detailed Description

The main glue of the egg hierarchy, this corresponds to the <Group>, <Instance>, and <Joint> type nodes.

Definition at line 34 of file eggGroup.h.

Member Function Documentation

◆ add_group_ref()

void EggGroup::add_group_ref ( EggGroup group)

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.

Definition at line 760 of file eggGroup.cxx.

◆ as_transform()

EggTransform * EggGroup::as_transform ( )
virtual

Returns this object cross-cast to an EggTransform pointer, if it inherits from EggTransform, or NULL if it does not.

Reimplemented from EggObject.

Definition at line 1019 of file eggGroup.cxx.

◆ clear_default_pose()

void EggGroup::clear_default_pose ( )
inline

Removes the initial pose transform.

See set_default_pose().

Definition at line 799 of file eggGroup.I.

References EggTransform::clear_transform().

◆ clear_group_refs()

void EggGroup::clear_group_refs ( )

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

See add_group_ref().

Definition at line 796 of file eggGroup.cxx.

◆ clear_tag()

void EggGroup::clear_tag ( const std::string &  key)
inline

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.

Definition at line 756 of file eggGroup.I.

◆ determine_alpha_mode()

EggRenderMode * EggGroup::determine_alpha_mode ( )
virtual

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.

Definition at line 479 of file eggGroup.cxx.

References EggNode::determine_alpha_mode(), and EggRenderMode::get_alpha_mode().

◆ determine_bin()

EggRenderMode * EggGroup::determine_bin ( )
virtual

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.

Definition at line 563 of file eggGroup.cxx.

References EggNode::determine_bin(), and EggRenderMode::has_bin().

◆ determine_decal()

bool EggGroup::determine_decal ( )
virtual

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.

Definition at line 595 of file eggGroup.cxx.

References EggNode::determine_decal().

◆ determine_depth_offset()

EggRenderMode * EggGroup::determine_depth_offset ( )
virtual

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.

Definition at line 535 of file eggGroup.cxx.

References EggNode::determine_depth_offset(), and EggRenderMode::has_depth_offset().

◆ determine_depth_test_mode()

EggRenderMode * EggGroup::determine_depth_test_mode ( )
virtual

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.

Definition at line 507 of file eggGroup.cxx.

References EggNode::determine_depth_test_mode(), and EggRenderMode::get_depth_test_mode().

◆ determine_depth_write_mode()

EggRenderMode * EggGroup::determine_depth_write_mode ( )
virtual

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.

Definition at line 493 of file eggGroup.cxx.

References EggNode::determine_depth_write_mode(), and EggRenderMode::get_depth_write_mode().

◆ determine_draw_order()

EggRenderMode * EggGroup::determine_draw_order ( )
virtual

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.

Definition at line 549 of file eggGroup.cxx.

References EggNode::determine_draw_order(), and EggRenderMode::has_draw_order().

◆ determine_indexed()

bool EggGroup::determine_indexed ( )
virtual

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.

Definition at line 579 of file eggGroup.cxx.

References EggNode::determine_indexed().

◆ determine_visibility_mode()

EggRenderMode * EggGroup::determine_visibility_mode ( )
virtual

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.

Definition at line 521 of file eggGroup.cxx.

References EggNode::determine_visibility_mode(), and EggRenderMode::get_visibility_mode().

◆ get_tag()

std::string EggGroup::get_tag ( const std::string &  key) const
inline

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.

Definition at line 730 of file eggGroup.I.

◆ get_vertex_membership()

double EggGroup::get_vertex_membership ( const EggVertex vert) const

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

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

Definition at line 677 of file eggGroup.cxx.

Referenced by split_vertex().

◆ has_dcs_type()

bool EggGroup::has_dcs_type ( ) const
inline

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

Definition at line 199 of file eggGroup.I.

◆ has_object_type()

bool EggGroup::has_object_type ( const std::string &  object_type) const

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

Definition at line 145 of file eggGroup.cxx.

Referenced by MayaNodeDesc::has_object_type().

◆ has_tag()

bool EggGroup::has_tag ( const std::string &  key) const
inline

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.

Definition at line 745 of file eggGroup.I.

◆ is_instance_type()

bool EggGroup::is_instance_type ( ) const
inline

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.

Definition at line 32 of file eggGroup.I.

◆ is_joint()

bool EggGroup::is_joint ( ) const
virtual

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.

Definition at line 468 of file eggGroup.cxx.

◆ modify_default_pose()

EggTransform & EggGroup::modify_default_pose ( )
inline

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.

Definition at line 780 of file eggGroup.I.

◆ ref_vertex()

void EggGroup::ref_vertex ( EggVertex vert,
double  membership = 1.0 
)

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.

Definition at line 608 of file eggGroup.cxx.

References unref_vertex().

Referenced by DaeCharacter::influence_vertex(), and split_vertex().

◆ remove_group_ref()

void EggGroup::remove_group_ref ( int  n)

Removes the nth <Ref> entry within this group.

See add_group_ref().

Definition at line 787 of file eggGroup.cxx.

◆ remove_object_type()

bool EggGroup::remove_object_type ( const std::string &  object_type)

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.

Definition at line 161 of file eggGroup.cxx.

◆ set_tag()

void EggGroup::set_tag ( const std::string &  key,
const std::string &  value 
)
inline

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.

Definition at line 720 of file eggGroup.I.

◆ set_vertex_membership()

void EggGroup::set_vertex_membership ( EggVertex vert,
double  membership 
)

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

Definition at line 692 of file eggGroup.cxx.

References unref_vertex().

◆ steal_vrefs()

void EggGroup::steal_vrefs ( EggGroup other)

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.

Definition at line 721 of file eggGroup.cxx.

◆ string_billboard_type()

EggGroup::BillboardType EggGroup::string_billboard_type ( const std::string &  strval)
static

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

Definition at line 866 of file eggGroup.cxx.

◆ string_blend_mode()

EggGroup::BlendMode EggGroup::string_blend_mode ( const std::string &  strval)
static

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

Definition at line 946 of file eggGroup.cxx.

◆ string_blend_operand()

EggGroup::BlendOperand EggGroup::string_blend_operand ( const std::string &  strval)
static

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

Definition at line 970 of file eggGroup.cxx.

◆ string_collide_flags()

EggGroup::CollideFlags EggGroup::string_collide_flags ( const std::string &  strval)
static

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.

Definition at line 918 of file eggGroup.cxx.

◆ string_cs_type()

EggGroup::CollisionSolidType EggGroup::string_cs_type ( const std::string &  strval)
static

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

Definition at line 886 of file eggGroup.cxx.

◆ string_dart_type()

EggGroup::DartType EggGroup::string_dart_type ( const std::string &  strval)
static

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

Definition at line 825 of file eggGroup.cxx.

◆ string_dcs_type()

EggGroup::DCSType EggGroup::string_dcs_type ( const std::string &  strval)
static

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

Definition at line 844 of file eggGroup.cxx.

◆ string_group_type()

EggGroup::GroupType EggGroup::string_group_type ( const std::string &  strval)
static

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

Definition at line 808 of file eggGroup.cxx.

◆ tag_begin()

EggGroup::TagData::const_iterator EggGroup::tag_begin ( ) const
inline

Returns an iterator that can, in conjunction with tag_end(), be used to traverse the entire set of tag keys.

Each iterator returns a pair<string, string>.

This interface is not safe to use outside of PANDAEGG.DLL.

Definition at line 811 of file eggGroup.I.

◆ tag_end()

EggGroup::TagData::const_iterator EggGroup::tag_end ( ) const
inline

Returns an iterator that can, in conjunction with tag_begin(), be used to traverse the entire set of tag keys.

Each iterator returns a pair<string, string>.

This interface is not safe to use outside of PANDAEGG.DLL.

Definition at line 823 of file eggGroup.I.

◆ tag_size()

EggGroup::TagData::size_type EggGroup::tag_size ( ) const
inline

Returns the number of elements between tag_begin() and tag_end().

This interface is not safe to use outside of PANDAEGG.DLL.

Definition at line 833 of file eggGroup.I.

◆ unref_all_vertices()

void EggGroup::unref_all_vertices ( )

Removes all vertices from the reference list.

Definition at line 656 of file eggGroup.cxx.

◆ unref_vertex()

void EggGroup::unref_vertex ( EggVertex vert)

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

Does nothing if the vertex is not already reffed.

Definition at line 640 of file eggGroup.cxx.

Referenced by ref_vertex(), and set_vertex_membership().

◆ vref_begin()

EggGroup::VertexRef::const_iterator EggGroup::vref_begin ( ) const
inline

Returns an iterator that can, in conjunction with vref_end(), be used to traverse the entire set of referenced vertices.

Each iterator returns a pair<PT(EggVertex), double>.

This interface is not safe to use outside of PANDAEGG.DLL.

Definition at line 845 of file eggGroup.I.

◆ vref_end()

EggGroup::VertexRef::const_iterator EggGroup::vref_end ( ) const
inline

Returns an iterator that can, in conjunction with vref_begin(), be used to traverse the entire set of referenced vertices.

Each iterator returns a pair<PT(EggVertex), double>.

This interface is not safe to use outside of PANDAEGG.DLL.

Definition at line 857 of file eggGroup.I.

◆ vref_size()

EggGroup::VertexRef::size_type EggGroup::vref_size ( ) const
inline

Returns the number of elements between vref_begin() and vref_end().

This interface is not safe to use outside of PANDAEGG.DLL.

Definition at line 867 of file eggGroup.I.

◆ write()

void EggGroup::write ( std::ostream &  out,
int  indent_level 
) const
virtual

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

Reimplemented from EggGroupNode.

Definition at line 177 of file eggGroup.cxx.

References EggNamedObject::write_header().

◆ write_billboard_flags()

void EggGroup::write_billboard_flags ( std::ostream &  out,
int  indent_level 
) const

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

Definition at line 315 of file eggGroup.cxx.

References indent().

◆ write_collide_flags()

void EggGroup::write_collide_flags ( std::ostream &  out,
int  indent_level 
) const

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

Definition at line 332 of file eggGroup.cxx.

References enquote_string(), and indent().

◆ write_decal_flags()

void EggGroup::write_decal_flags ( std::ostream &  out,
int  indent_level 
) const

Writes the flags related to decaling, if any.

Definition at line 426 of file eggGroup.cxx.

References indent().

◆ write_model_flags()

void EggGroup::write_model_flags ( std::ostream &  out,
int  indent_level 
) const

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

Definition at line 371 of file eggGroup.cxx.

References indent().

◆ write_object_types()

void EggGroup::write_object_types ( std::ostream &  out,
int  indent_level 
) const

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

Definition at line 413 of file eggGroup.cxx.

References enquote_string(), and indent().

◆ write_render_mode()

void EggGroup::write_render_mode ( std::ostream &  out,
int  indent_level 
) const

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

Definition at line 454 of file eggGroup.cxx.

References indent(), and EggRenderMode::write().

◆ write_switch_flags()

void EggGroup::write_switch_flags ( std::ostream &  out,
int  indent_level 
) const

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

Definition at line 399 of file eggGroup.cxx.

References indent().

◆ write_tags()

void EggGroup::write_tags ( std::ostream &  out,
int  indent_level 
) const

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

Definition at line 436 of file eggGroup.cxx.

References enquote_string(), and indent().

Member Data Documentation

◆ clear_blend_color

void EggGroup::clear_blend_color
inline

Removes the blend color specification.

Definition at line 318 of file eggGroup.h.

◆ get_blend_color

const LColor & EggGroup::get_blend_color
inline

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

Definition at line 318 of file eggGroup.h.

◆ get_default_pose

const EggTransform & EggGroup::get_default_pose
inline

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.

Definition at line 320 of file eggGroup.h.

◆ get_group_ref

EggGroup * EggGroup::get_group_ref

Returns the nth <Ref> entry within this group.

See add_group_ref().

Definition at line 354 of file eggGroup.h.

◆ get_num_group_refs

int EggGroup::get_num_group_refs

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

See add_group_ref().

Definition at line 354 of file eggGroup.h.

◆ has_blend_color

bool EggGroup::has_blend_color
inline

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

Definition at line 318 of file eggGroup.h.

◆ set_billboard_center

void EggGroup::set_billboard_center
inline

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

Definition at line 290 of file eggGroup.h.

◆ set_default_pose

void EggGroup::set_default_pose
inline

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.

Definition at line 320 of file eggGroup.h.

◆ set_indexed_flag

void EggGroup::set_indexed_flag
inline

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

Definition at line 307 of file eggGroup.h.


The documentation for this class was generated from the following files: