Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

EggGroup Class Reference

The main glue of the egg hierarchy, this corresponds to the , , and type nodes. More...

#include <eggGroup.h>

Inheritance diagram for EggGroup:

EggGroupNode EggRenderMode EggTransform3d EggNode EggNamedObject EggObject Namable TypedReferenceCount TypedObject ReferenceCount EggBin List of all members.

Public Types

typedef pmap< PT_EggVertex,
double > 
VertexRef
enum  GroupType { GT_invalid = -1, GT_group = 0x00000000, GT_instance = 0x00000001, GT_joint = 0x00000002 }
enum  DartType { DT_none = 0x00000000, DT_sync = 0x00000004, DT_nosync = 0x00000008, DT_default = 0x0000000c }
enum  DCSType { DC_none = 0x00000000, DC_local = 0x00000010, DC_net = 0x00000020, DC_default = 0x00000030 }
enum  BillboardType { BT_none = 0x00000000, BT_axis = 0x00000020, BT_point_camera_relative = 0x00000040, BT_point_world_relative = 0x00000080 }
enum  CollisionSolidType {
  CST_none = 0x00000000, CST_plane = 0x00010000, CST_polygon = 0x00020000, CST_polyset = 0x00030000,
  CST_sphere = 0x00040000, CST_inverse_sphere = 0x00050000, CST_geode = 0x00060000
}
enum  CollideFlags {
  CF_none = 0x00000000, CF_intangible = 0x00080000, CF_descend = 0x00100000, CF_event = 0x00200000,
  CF_keep = 0x00400000, CF_solid = 0x00800000, CF_center = 0x01000000, CF_turnstile = 0x02000000
}
typedef Children::const_pointer pointer
typedef Children::const_pointer const_pointer
typedef Children::const_reference reference
typedef Children::const_reference const_reference
typedef Children::const_iterator iterator
typedef Children::const_iterator const_iterator
typedef Children::const_reverse_iterator reverse_iterator
typedef Children::const_reverse_iterator const_reverse_iterator
typedef Children::size_type size_type
typedef Children::difference_type difference_type
enum  AlphaMode {
  AM_unspecified, AM_off, AM_on, AM_blend,
  AM_blend_no_occlude, AM_ms, AM_ms_mask, AM_binary,
  AM_dual
}
enum  DepthWriteMode { DWM_unspecified, DWM_off, DWM_on }
enum  DepthTestMode { DTM_unspecified, DTM_off, DTM_on }
enum  ComponentType {
  CT_invalid, CT_translate, CT_rotx, CT_roty,
  CT_rotz, CT_rotate, CT_scale, CT_uniform_scale,
  CT_matrix
}

Public Member Functions

 EggGroup (const string &name="")
 EggGroup (const EggGroup &copy)
EggGroup & operator= (const EggGroup &copy)
 ~EggGroup ()
virtual void write (ostream &out, int indent_level) const
 Writes the group and all of its children to the indicated output stream in Egg format.

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.

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 an depth_write_mode other than DWM_unspecified.

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 an depth_test_mode other than DTM_unspecified.

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.

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.

void set_group_type (GroupType type)
GroupType get_group_type () const
bool is_instance_type () const
 Returns true if this group is an instance type node; i.e.

void set_billboard_type (BillboardType type)
BillboardType get_billboard_type () const
void set_billboard_center (const LPoint3d &billboard_center)
 Sets the point around which the billboard will rotate, if this node contains a billboard specification.

void clear_billboard_center ()
bool has_billboard_center () const
const LPoint3d & get_billboard_center () const
void set_cs_type (CollisionSolidType type)
CollisionSolidType get_cs_type () const
void set_collide_flags (int flags)
CollideFlags get_collide_flags () const
void set_collision_name (const string &collision_name)
void clear_collision_name ()
bool has_collision_name () const
const string & get_collision_name () const
void set_dcs_type (DCSType type)
DCSType get_dcs_type () const
void set_dart_type (DartType type)
DartType get_dart_type () const
void set_switch_flag (bool flag)
bool get_switch_flag () const
void set_switch_fps (double fps)
double get_switch_fps () const
void add_object_type (const string &object_type)
void clear_object_types ()
int get_num_object_types () const
string get_object_type (int index) const
bool has_object_type (const string &object_type) const
 Returns true if the indicated object type has been added to the group, or false otherwise.

bool remove_object_type (const string &object_type)
 Removes the first instance of the indicated object type from the group if it is present.

void set_model_flag (bool flag)
bool get_model_flag () const
void set_texlist_flag (bool flag)
bool get_texlist_flag () const
void set_nofog_flag (bool flag)
bool get_nofog_flag () const
void set_decal_flag (bool flag)
bool get_decal_flag () const
void set_direct_flag (bool flag)
bool get_direct_flag () const
void set_collide_mask (CollideMask mask)
void clear_collide_mask ()
bool has_collide_mask () const
CollideMask get_collide_mask () const
void set_from_collide_mask (CollideMask mask)
void clear_from_collide_mask ()
bool has_from_collide_mask () const
CollideMask get_from_collide_mask () const
void set_into_collide_mask (CollideMask mask)
void clear_into_collide_mask ()
bool has_into_collide_mask () const
CollideMask get_into_collide_mask () const
void set_lod (const EggSwitchCondition &lod)
void clear_lod ()
bool has_lod () const
const EggSwitchConditionget_lod () const
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.

void unref_vertex (EggVertex *vert)
 Removes the vertex from the set of those referenced by the group.

void unref_all_vertices ()
 Removes all vertices from the reference list.

double get_vertex_membership (const EggVertex *vert) const
 Returns the amount of membership of the indicated vertex in this group.

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.

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.

VertexRef::size_type vref_size () const
 Returns the number of elements between vref_begin() and vref_end().

void test_vref_integrity () const
 Verifies that each vertex in the group exists and that it knows it is referenced by the group.

virtual TypeHandle get_type () const
virtual TypeHandle force_init_type ()
iterator begin () const
iterator end () const
reverse_iterator rbegin () const
reverse_iterator rend () const
bool empty () const
size_type size () const
iterator insert (iterator position, PointerTo< EggNode > x)
iterator erase (iterator position)
iterator erase (iterator first, iterator last)
void replace (iterator position, PointerTo< EggNode > x)
 Replaces the node at the indicated position with the indicated node.

void clear ()
PointerTo< EggNodeadd_child (PointerTo< EggNode > node)
 Adds the indicated child to the group and returns it.

PointerTo< EggNoderemove_child (PointerTo< EggNode > node)
 Removes the indicated child node from the group and returns it.

void steal_children (EggGroupNode &other)
 Moves all the children from the other node to this one.

void resolve_filenames (const DSearchPath &searchpath)
 Walks the tree and attempts to resolve any filenames encountered.

void reverse_vertex_ordering ()
 Reverses the vertex ordering of all polygons defined at this node and below.

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.

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.

void strip_normals ()
 Removes all normals from primitives, and the vertices they reference, at this node and below.

int triangulate_polygons (bool convex_also)
 Replace all higher-order polygons at this point in the scene graph and below with triangles.

int remove_unused_vertices ()
 Removes all vertices from VertexPools within this group or below that are not referenced by at least one primitive.

int remove_invalid_primitives ()
 Removes primitives at this level and below which appear to be degenerate; e.g.

EggGroupNodeget_parent () const
int get_depth () const
 Returns the number of nodes above this node in the egg hierarchy.

bool is_under_instance () const
 Returns true if there is an node somewhere in the egg tree at or above this node, false otherwise.

bool is_under_transform () const
 Returns true if there is a entry somewhere in the egg tree at or above this node, false otherwise.

bool is_local_coord () const
 Returns true if this node's vertices are not in the global coordinate space.

const LMatrix4d & get_vertex_frame () const
 Returns the coordinate frame of the vertices referenced by primitives at or under this node.

const LMatrix4d & get_node_frame () const
 Returns the coordinate frame of the node itself.

const LMatrix4d & get_vertex_frame_inv () const
 Returns the inverse of the matrix returned by get_vertex_frame().

const LMatrix4d & get_node_frame_inv () const
 Returns the inverse of the matrix returned by get_node_frame().

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.

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.

void transform (const LMatrix4d &mat)
 Applies the indicated transformation to the node and all of its descendants.

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.

void flatten_transforms ()
 Removes any transform and instance records from this node in the scene graph and below.

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.

bool parse_egg (const 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.

void test_under_integrity () const
 Recursively checks the integrity of the _under_flags, _parent, and _depth members of this node and all of its ancestors.

void write_header (ostream &out, int indent_level, const char *egg_keyword) const
 Writes the first line of the egg object, e.g.

int get_type_index () const
 Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.

bool is_of_type (TypeHandle handle) const
 Returns true if the current object is or derives from the indicated type.

bool is_exact_type (TypeHandle handle) const
 Returns true if the current object is the indicated type exactly.

int get_ref_count () const
 Returns the current reference count.

int ref () const
 Explicitly increments the reference count.

int unref () const
 Explicitly decrements the reference count.

void test_ref_count_integrity () const
 Does some easy checks to make sure that the reference count isn't completely bogus.

void set_name (const string &name)
void clear_name ()
 Resets the Namable's name to empty.

bool has_name () const
 Returns true if the Namable has a nonempty name set, false if the name is empty.

const string & get_name () const
void output (ostream &out) const
 Outputs the Namable.

void set_alpha_mode (AlphaMode mode)
 Specifies precisely how the transparency for this geometry should be achieved, or if it should be used.

AlphaMode get_alpha_mode () const
 Returns the alpha mode that was set, or AM_unspecified if nothing was set.

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.

DepthWriteMode get_depth_write_mode () const
 Returns the depth_write mode that was set, or DWM_unspecified if nothing was set.

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

DepthTestMode get_depth_test_mode () const
 Returns the depth_test mode that was set, or DTM_unspecified if nothing was set.

void set_draw_order (int order)
 Sets the "draw-order" flag associated with this object.

int get_draw_order () const
 Returns the "draw-order" flag as set for this particular object.

bool has_draw_order () const
 Returns true if the draw-order flag has been set for this particular object.

void clear_draw_order ()
 Removes the draw-order flag from this particular object.

void set_bin (const string &bin)
 Sets the "bin" string for this particular object.

string get_bin () const
 Returns the bin name that has been set for this particular object, if any.

bool has_bin () const
 Returns true if a bin name has been set for this particular object.

void clear_bin ()
 Removes the bin name that was set for this particular object.

bool operator== (const EggRenderMode &other) const
bool operator!= (const EggRenderMode &other) const
bool operator< (const EggRenderMode &other) const
void clear_transform ()
 Resets the transform to empty, identity.

void add_translate (const LVector3d &translate)
 Appends a translation operation to the current transform.

void add_rotx (double angle)
 Appends a rotation about the X axis to the current transform.

void add_roty (double angle)
 Appends a rotation about the Y axis to the current transform.

void add_rotz (double angle)
 Appends a rotation about the Z axis to the current transform.

void add_rotate (double angle, const LVector3d &axis)
 Appends a rotation about an arbitrary axis to the current transform.

void add_rotate (const LQuaterniond &quat)
 Appends an arbitrary rotation to the current transform, expressed as a quaternion.

void add_scale (const LVecBase3d &scale)
 Appends a possibly non-uniform scale to the current transform.

void add_uniform_scale (double scale)
 Appends a uniform scale to the current transform.

void add_matrix (const LMatrix4d &mat)
 Appends an arbitrary 4x4 matrix to the current transform.

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

void set_transform (const LMatrix4d &mat)
 Sets the overall transform as a 4x4 matrix.

const LMatrix4d & get_transform () const
 Returns the overall transform as a 4x4 matrix.

bool transform_is_identity () const
 Returns true if the described transform is identity, false otherwise.

int get_num_components () const
 Returns the number of components that make up the transform.

ComponentType get_component_type (int n) const
 Returns the type of the nth component.

double get_component_number (int n) const
 Returns the solitary number associated with the nth component.

const LVector3d & get_component_vector (int n) const
 Returns the 3-component vector associated with the nth component.

const LMatrix4d & get_component_matrix (int n) const
 Returns the 4x4 matrix associated with the nth component.


Static Public Member Functions

GroupType string_group_type (const string &string)
 Returns the GroupType value associated with the given string representation, or GT_invalid if the string does not match any known GroupType value.

DartType string_dart_type (const string &string)
 Returns the DartType value associated with the given string representation, or DT_none if the string does not match any known DartType value.

DCSType string_dcs_type (const string &string)
 Returns the DCSType value associated with the given string representation, or DC_none if the string does not match any known DCSType value.

BillboardType string_billboard_type (const string &string)
 Returns the BillboardType value associated with the given string representation, or BT_none if the string does not match any known BillboardType value.

CollisionSolidType string_cs_type (const string &string)
 Returns the CollisionSolidType value associated with the given string representation, or CST_none if the string does not match any known CollisionSolidType value.

CollideFlags string_collide_flags (const string &string)
 Returns the CollideFlags value associated with the given string representation, or CF_none if the string does not match any known CollideFlags value.

TypeHandle get_class_type ()
void init_type ()
AlphaMode string_alpha_mode (const 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.

DepthWriteMode string_depth_write_mode (const 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.

DepthTestMode string_depth_test_mode (const string &string)
 Returns the DepthTestMode value associated with the given string representation, or DWM_unspecified if the string does not match any known DepthTestMode value.


Protected Types

typedef RefCountObj< LMatrix4d > MatrixFrame
enum  UnderFlags { UF_under_instance = 0x001, UF_under_transform = 0x002, UF_local_coord = 0x004 }

Protected Member Functions

void write_vertex_ref (ostream &out, int indent_level) const
 Writes out the vertex ref component of the group body only.

virtual bool egg_start_parse_body ()
 This function is called within parse_egg().

virtual void adjust_under ()
 This is called within update_under() after all the various under settings have been inherited directly from the parent node.

virtual void r_transform (const LMatrix4d &mat, const LMatrix4d &inv, CoordinateSystem to_cs)
 This is called from within the egg code by transform().

virtual void r_flatten_transforms ()
 The recursive implementation of flatten_transforms().

virtual void transform_changed ()
 This virtual method is inherited by EggTransform3d; it is called whenever the transform is changed.

virtual void update_under (int depth_offset)
 This function is called from within EggGroupNode whenever the parentage of the node has changed.

virtual void r_transform_vertices (const LMatrix4d &mat)
 This is called from within the egg code by transform_vertices_only()().

virtual void r_mark_coordsys (CoordinateSystem cs)
 This is only called immediately after loading an egg file from disk, to propagate the value found in the CoordinateSystem entry (or the default Y-up coordinate system) to all nodes that care about what the coordinate system is.

virtual void r_apply_texmats (EggTextureCollection &textures)
 The recursive implementation of apply_texmats().

CoordinateSystem find_coordsys_entry ()
 Walks the tree, looking for an EggCoordinateSystem entry.

int find_textures (EggTextureCollection *collection)
 Walks the tree, looking for EggTextures.

int find_materials (EggMaterialCollection *collection)
 Walks the tree, looking for EggMaterials.

bool r_load_externals (const DSearchPath &searchpath, CoordinateSystem coordsys)
 Walks the tree and locates unloaded external reference nodes, which it attempts to locate and load in.

void internal_clear_transform ()
 Resets the transform to empty without calling transform_changed().

void internal_add_matrix (const LMatrix4d &mat)
 Appends an arbitrary 4x4 matrix to the current transform, without calling transform_changed().

void internal_set_transform (const LMatrix4d &mat)
 Sets the overall transform without calling transform_changed().


Protected Attributes

EggGroupNode_parent
int _depth
int _under_flags
PointerTo< MatrixFrame_vertex_frame
PointerTo< MatrixFrame_node_frame
PointerTo< MatrixFrame_vertex_frame_inv
PointerTo< MatrixFrame_node_frame_inv
PointerTo< MatrixFrame_vertex_to_node
PointerTo< MatrixFrame_node_to_vertex

Private Types

enum  Flags {
  F_group_type = 0x00000003, F_dart_type = 0x0000000c, F_billboard_type = 0x000000e0, F_switch_flag = 0x00000100,
  F_model_flag = 0x00000400, F_texlist_flag = 0x00000800, F_nofog_flag = 0x00001000, F_decal_flag = 0x00002000,
  F_direct_flag = 0x00004000, F_cs_type = 0x00070000, F_collide_flags = 0x03f80000
}
enum  Flags2 {
  F2_collide_mask = 0x00000001, F2_from_collide_mask = 0x00000002, F2_into_collide_mask = 0x00000004, F2_billboard_center = 0x00000008,
  F2_dcs_type = 0x00000030
}

Private Attributes

int _flags
int _flags2
CollideMask _collide_mask
CollideMask _from_collide_mask
CollideMask _into_collide_mask
LPoint3d _billboard_center
vector_string _object_types
string _collision_name
double _fps
PointerTo< EggSwitchCondition_lod
VertexRef _vref

Static Private Attributes

TypeHandle _type_handle

Detailed Description

The main glue of the egg hierarchy, this corresponds to the , , and type nodes.

Definition at line 47 of file eggGroup.h.


Member Typedef Documentation

typedef Children::const_iterator EggGroupNode::const_iterator [inherited]
 

Definition at line 104 of file eggGroupNode.h.

Referenced by CharacterMaker::build_joint_hierarchy(), AnimBundleMaker::create_xfm_channel(), get_textures_by_filename(), EggLoader::make_collision_plane(), EggLoader::make_collision_solids(), EggLoader::make_node(), and AnimBundleMaker::make_node().

typedef Children::const_pointer EggGroupNode::const_pointer [inherited]
 

Definition at line 99 of file eggGroupNode.h.

typedef Children::const_reference EggGroupNode::const_reference [inherited]
 

Definition at line 102 of file eggGroupNode.h.

typedef Children::const_reverse_iterator EggGroupNode::const_reverse_iterator [inherited]
 

Definition at line 106 of file eggGroupNode.h.

typedef Children::difference_type EggGroupNode::difference_type [inherited]
 

Definition at line 108 of file eggGroupNode.h.

typedef Children::const_iterator EggGroupNode::iterator [inherited]
 

Definition at line 103 of file eggGroupNode.h.

Referenced by EggMaterialCollection::collapse_equivalent_materials(), EggTextureCollection::collapse_equivalent_textures(), EggNode::determine_bin(), EggMaterialCollection::extract_materials(), EggTextureCollection::extract_textures(), EggLoader::find_collision_geometry(), EggMaterialCollection::insert_materials(), EggTextureCollection::insert_textures(), EggGroupNode::replace(), EggGroupNode::size(), EggBinMaker::sorts_less(), EggData::write(), and EggGroupNode::~EggGroupNode().

typedef RefCountObj<LMatrix4d> EggNode::MatrixFrame [protected, inherited]
 

Definition at line 118 of file eggNode.h.

Referenced by string_collide_flags().

typedef Children::const_pointer EggGroupNode::pointer [inherited]
 

Definition at line 98 of file eggGroupNode.h.

typedef Children::const_reference EggGroupNode::reference [inherited]
 

Definition at line 101 of file eggGroupNode.h.

typedef Children::const_reverse_iterator EggGroupNode::reverse_iterator [inherited]
 

Definition at line 105 of file eggGroupNode.h.

Referenced by EggGroupNode::begin(), and EggGroupNode::end().

typedef Children::size_type EggGroupNode::size_type [inherited]
 

Definition at line 107 of file eggGroupNode.h.

typedef pmap<PT_EggVertex, double> EggGroup::VertexRef
 

Definition at line 49 of file eggGroup.h.


Member Enumeration Documentation

enum EggRenderMode::AlphaMode [inherited]
 

Enumeration values:
AM_unspecified 
AM_off 
AM_on 
AM_blend 
AM_blend_no_occlude 
AM_ms 
AM_ms_mask 
AM_binary 
AM_dual 

Definition at line 64 of file eggRenderMode.h.

enum EggGroup::BillboardType
 

Enumeration values:
BT_none 
BT_axis 
BT_point_camera_relative 
BT_point_world_relative 

Definition at line 73 of file eggGroup.h.

enum EggGroup::CollideFlags
 

Enumeration values:
CF_none 
CF_intangible 
CF_descend 
CF_event 
CF_keep 
CF_solid 
CF_center 
CF_turnstile 

Definition at line 90 of file eggGroup.h.

Referenced by set_collision_name().

enum EggGroup::CollisionSolidType
 

Enumeration values:
CST_none 
CST_plane 
CST_polygon 
CST_polyset 
CST_sphere 
CST_inverse_sphere 
CST_geode 

Definition at line 80 of file eggGroup.h.

Referenced by clear_billboard_center().

enum EggTransform3d::ComponentType [inherited]
 

Enumeration values:
CT_invalid 
CT_translate 
CT_rotx 
CT_roty 
CT_rotz 
CT_rotate 
CT_scale 
CT_uniform_scale 
CT_matrix 

Definition at line 67 of file eggTransform3d.h.

enum EggGroup::DartType
 

Enumeration values:
DT_none 
DT_sync 
DT_nosync 
DT_default 

Definition at line 59 of file eggGroup.h.

enum EggGroup::DCSType
 

Enumeration values:
DC_none 
DC_local 
DC_net 
DC_default 

Definition at line 66 of file eggGroup.h.

Referenced by get_vertex_membership().

enum EggRenderMode::DepthTestMode [inherited]
 

Enumeration values:
DTM_unspecified 
DTM_off 
DTM_on 

Definition at line 80 of file eggRenderMode.h.

Referenced by EggRenderMode::get_depth_write_mode(), and EggLoader::setup_bucket().

enum EggRenderMode::DepthWriteMode [inherited]
 

Enumeration values:
DWM_unspecified 
DWM_off 
DWM_on 

Definition at line 76 of file eggRenderMode.h.

enum EggGroup::Flags [private]
 

Enumeration values:
F_group_type 
F_dart_type 
F_billboard_type 
F_switch_flag 
F_model_flag 
F_texlist_flag 
F_nofog_flag 
F_decal_flag 
F_direct_flag 
F_cs_type 
F_collide_flags 

Definition at line 226 of file eggGroup.h.

enum EggGroup::Flags2 [private]
 

Enumeration values:
F2_collide_mask 
F2_from_collide_mask 
F2_into_collide_mask 
F2_billboard_center 
F2_dcs_type 

Definition at line 240 of file eggGroup.h.

enum EggGroup::GroupType
 

Enumeration values:
GT_invalid 
GT_group 
GT_instance 
GT_joint 

Definition at line 52 of file eggGroup.h.

Referenced by unref_vertex().

enum EggNode::UnderFlags [protected, inherited]
 

Enumeration values:
UF_under_instance 
UF_under_transform 
UF_local_coord 

Definition at line 92 of file eggNode.h.


Constructor & Destructor Documentation

EggGroup::EggGroup const string &  name = ""  ) 
 

Definition at line 43 of file eggGroup.cxx.

EggGroup::EggGroup const EggGroup &  copy  ) 
 

Definition at line 57 of file eggGroup.cxx.

References _collision_name, _flags, _flags2, _fps, _object_types, EggTransform3d::operator=(), and unref_all_vertices().

EggGroup::~EggGroup  ) 
 

Definition at line 111 of file eggGroup.cxx.

References _flags, F_group_type, nassertv, and EggGroupNode::update_under().


Member Function Documentation

PointerTo< EggNode > EggGroupNode::add_child PointerTo< 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.

Definition at line 269 of file eggGroupNode.cxx.

Referenced by EggPolygon::decomp_concave().

void EggTransform3d::add_matrix const LMatrix4d &  mat  )  [inline, inherited]
 

Appends an arbitrary 4x4 matrix to the current transform.

Definition at line 133 of file eggTransform3d.I.

References INLINE, EggTransform3d::internal_set_transform(), and EggTransform3d::transform_changed().

void EggGroup::add_object_type const string &  object_type  )  [inline]
 

Definition at line 391 of file eggGroup.I.

References _flags, F_texlist_flag, and INLINE.

void EggTransform3d::add_rotate const LQuaterniond &  quat  )  [inherited]
 

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

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

Definition at line 186 of file eggTransform3d.cxx.

References EggTransform3d::CT_rotx, EggTransform3d::CT_roty, and EggTransform3d::CT_translate.

void EggTransform3d::add_rotate double  angle,
const LVector3d &  axis
[inherited]
 

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

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

Definition at line 165 of file eggTransform3d.cxx.

References EggTransform3d::_components, EggTransform3d::_transform, EggTransform3d::CT_uniform_scale, and EggTransform3d::transform_changed().

Referenced by EggTransform3d::add_rotz().

void EggTransform3d::add_rotx 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.

Definition at line 108 of file eggTransform3d.cxx.

References EggTransform3d::_components, EggTransform3d::_transform, EggTransform3d::CT_rotz, and EggTransform3d::transform_changed().

void EggTransform3d::add_roty 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.

Definition at line 127 of file eggTransform3d.cxx.

References EggTransform3d::_components, EggTransform3d::_transform, EggTransform3d::CT_rotate, and EggTransform3d::transform_changed().

void EggTransform3d::add_rotz 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.

Definition at line 146 of file eggTransform3d.cxx.

References EggTransform3d::add_rotate(), and EggTransform3d::transform_changed().

void EggTransform3d::add_scale const LVecBase3d &  scale  )  [inherited]
 

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

Definition at line 202 of file eggTransform3d.cxx.

References EggTransform3d::CT_rotate, EggTransform3d::CT_rotz, and EggTransform3d::CT_scale.

void EggTransform3d::add_translate const LVector3d &  translate  )  [inherited]
 

Appends a translation operation to the current transform.

Definition at line 88 of file eggTransform3d.cxx.

References EggTransform3d::_components, EggTransform3d::_transform, EggTransform3d::CT_rotx, and EggTransform3d::transform_changed().

void EggTransform3d::add_uniform_scale double  scale  )  [inherited]
 

Appends a uniform scale to the current transform.

Definition at line 218 of file eggTransform3d.cxx.

References EggTransform3d::CT_invalid, EggTransform3d::CT_matrix, and EggTransform3d::CT_uniform_scale.

void EggGroup::adjust_under  )  [protected, virtual]
 

This is called within update_under() after all the various under settings have been inherited directly from the parent node.

It is responsible for adjusting these settings to reflect states local to the current node; for instance, an node will force the UF_under_instance bit on.

Reimplemented from EggNode.

Definition at line 877 of file eggGroup.cxx.

void EggNode::apply_texmats  )  [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.

Definition at line 49 of file eggNode.cxx.

References EggNode::_parent, EggNode::determine_alpha_mode(), and NULL.

EggGroupNode::iterator EggGroupNode::begin  )  const [inherited]
 

Definition at line 115 of file eggGroupNode.cxx.

References EggGroupNode::_children, and EggGroupNode::reverse_iterator.

Referenced by EggMaterialCollection::collapse_equivalent_materials(), EggTextureCollection::collapse_equivalent_textures(), AnimBundleMaker::create_xfm_channel(), EggNode::determine_bin(), EggGroupNode::erase(), EggMaterialCollection::insert_materials(), EggTextureCollection::insert_textures(), EggLoader::make_collision_plane(), EggLoader::make_node(), AnimBundleMaker::make_node(), EggGroupNode::replace(), EggBinMaker::sorts_less(), and EggGroupNode::~EggGroupNode().

void EggGroupNode::clear  )  [inherited]
 

Definition at line 251 of file eggGroupNode.cxx.

void EggGroup::clear_billboard_center  )  [inline]
 

Definition at line 148 of file eggGroup.I.

References _flags, CollisionSolidType, F_cs_type, and INLINE.

void EggRenderMode::clear_bin  )  [inline, inherited]
 

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

See set_bin().

Definition at line 326 of file eggRenderMode.I.

void EggGroup::clear_collide_mask  )  [inline]
 

Definition at line 594 of file eggGroup.I.

References _lod, INLINE, and EggSwitchCondition::make_copy().

void EggGroup::clear_collision_name  )  [inline]
 

Definition at line 225 of file eggGroup.I.

References _flags2, F2_dcs_type, and nassertv.

void EggRenderMode::clear_draw_order  )  [inline, inherited]
 

Removes the draw-order flag from this particular object.

See set_draw_order().

Definition at line 254 of file eggRenderMode.I.

void EggGroup::clear_from_collide_mask  )  [inline]
 

Definition at line 644 of file eggGroup.I.

References _vref, and INLINE.

void EggGroup::clear_into_collide_mask  )  [inline]
 

Definition at line 694 of file eggGroup.I.

void EggGroup::clear_lod  )  [inline]
 

Definition at line 743 of file eggGroup.I.

void Namable::clear_name  )  [inline, inherited]
 

Resets the Namable's name to empty.

Definition at line 82 of file namable.I.

References Namable::_name, and INLINE.

void EggGroup::clear_object_types  )  [inline]
 

Definition at line 403 of file eggGroup.I.

References _flags, and F_nofog_flag.

Referenced by EggLoader::create_collision_polygons().

void EggTransform3d::clear_transform  )  [inline, inherited]
 

Resets the transform to empty, identity.

Definition at line 117 of file eggTransform3d.I.

References EggTransform3d::_components, and INLINE.

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 341 of file eggGroup.cxx.

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

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 437 of file eggGroup.cxx.

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 an 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 389 of file eggGroup.cxx.

References EggVertex::_gref, _vref, and unref_vertex().

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 an 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 365 of file eggGroup.cxx.

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

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 413 of file eggGroup.cxx.

bool EggGroup::egg_start_parse_body  )  [protected, virtual]
 

This function is called within parse_egg().

It should call the appropriate function on the lexer to initialize the parser into the state associated with this object. If the object cannot be parsed into directly, it should return false.

Reimplemented from EggNode.

Definition at line 853 of file eggGroup.cxx.

References GT_group, GT_instance, and set_group_type().

bool EggGroupNode::empty  )  const [inherited]
 

Definition at line 163 of file eggGroupNode.cxx.

EggGroupNode::iterator EggGroupNode::end  )  const [inherited]
 

Definition at line 127 of file eggGroupNode.cxx.

References EggGroupNode::_children, and EggGroupNode::reverse_iterator.

Referenced by EggMaterialCollection::collapse_equivalent_materials(), EggTextureCollection::collapse_equivalent_textures(), AnimBundleMaker::create_xfm_channel(), EggNode::determine_bin(), EggGroupNode::erase(), EggMaterialCollection::insert_materials(), EggTextureCollection::insert_textures(), EggLoader::make_collision_plane(), EggLoader::make_node(), AnimBundleMaker::make_node(), EggGroupNode::replace(), EggBinMaker::sorts_less(), and EggGroupNode::~EggGroupNode().

EggGroupNode::iterator EggGroupNode::erase iterator  first,
iterator  last
[inherited]
 

Definition at line 213 of file eggGroupNode.cxx.

References EggGroupNode::begin(), EggGroupNode::end(), and EggGroupNode::erase().

EggGroupNode::iterator EggGroupNode::erase iterator  position  )  [inherited]
 

Definition at line 200 of file eggGroupNode.cxx.

References x.

Referenced by EggGroupNode::erase(), and EggGroupNode::replace().

CoordinateSystem EggGroupNode::find_coordsys_entry  )  [protected, inherited]
 

Walks the tree, looking for an EggCoordinateSystem entry.

If one is found, extracts it and returns its value. If multiple entries are found, extracts all of them and returns CS_invalid if they disagree.

Definition at line 956 of file eggGroupNode.cxx.

int EggGroupNode::find_materials EggMaterialCollection collection  )  [protected, inherited]
 

Walks the tree, looking for EggMaterials.

Each EggMaterial that is found is removed from the hierarchy and added to the EggMaterialCollection. Returns the number of EggMaterials found.

Definition at line 1072 of file eggGroupNode.cxx.

Referenced by EggMaterialCollection::clear().

int EggGroupNode::find_textures EggTextureCollection collection  )  [protected, inherited]
 

Walks the tree, looking for EggTextures.

Each EggTexture that is found is removed from the hierarchy and added to the EggTextureCollection. Returns the number of EggTextures found.

Definition at line 1020 of file eggGroupNode.cxx.

References EggGroupNode::_children, EggGroupNode::NVertexReference::_normal, EggGroupNode::NVertexReference::_polygon, EggGroupNode::NVertexReference::_vertex, EggPolygon::calculate_normal(), EggAttributes::clear_normal(), cs, DCAST, EggGroupNode::get_class_type(), EggPolygon::get_class_type(), EggVertex::get_pos3(), EggPrimitive::get_vertex(), TypedObject::is_of_type(), EggNode::is_under_instance(), EggGroupNode::prepare_remove_child(), EggGroupNode::r_collect_vertex_normals(), EggGroupNode::recompute_vertex_normals(), ReferenceCount::ref(), EggPrimitive::size(), and size_t.

Referenced by EggTextureCollection::clear().

void EggNode::flatten_transforms  )  [inline, 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.

Definition at line 381 of file eggNode.I.

virtual TypeHandle EggGroup::force_init_type void   )  [inline, virtual]
 

Reimplemented from EggGroupNode.

Reimplemented in EggBin.

Definition at line 275 of file eggGroup.h.

EggRenderMode::AlphaMode EggRenderMode::get_alpha_mode  )  const [inline, inherited]
 

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

See set_alpha_mode().

Definition at line 186 of file eggRenderMode.I.

References EggRenderMode::_has_draw_order, and INLINE.

const LPoint3d & EggGroup::get_billboard_center  )  const [inline]
 

Definition at line 174 of file eggGroup.I.

References _collision_name.

EggGroup::BillboardType EggGroup::get_billboard_type  )  const [inline]
 

Definition at line 88 of file eggGroup.I.

References _billboard_center, _flags2, F2_billboard_center, INLINE, and EggGroupNode::update_under().

Referenced by get_group_type().

string EggRenderMode::get_bin  )  const [inline, inherited]
 

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

See set_bin().

Definition at line 296 of file eggRenderMode.I.

TypeHandle EggGroup::get_class_type void   )  [inline, static]
 

Reimplemented from EggGroupNode.

Reimplemented in EggBin.

Definition at line 262 of file eggGroup.h.

Referenced by CharacterMaker::create_slider(), and EggGroupUniquifier::EggGroupUniquifier().

EggGroup::CollideFlags EggGroup::get_collide_flags  )  const [inline]
 

Definition at line 275 of file eggGroup.I.

Referenced by EggLoader::make_node().

CollideMask EggGroup::get_collide_mask  )  const [inline]
 

Definition at line 618 of file eggGroup.I.

References _lod, INLINE, and NULL.

const string & EggGroup::get_collision_name  )  const [inline]
 

Definition at line 249 of file eggGroup.I.

References _flags, and F_dart_type.

const LMatrix4d & EggTransform3d::get_component_matrix int  n  )  const [inline, inherited]
 

Returns the 4x4 matrix associated with the nth component.

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

Definition at line 289 of file eggTransform3d.I.

double EggTransform3d::get_component_number int  n  )  const [inline, 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.

Definition at line 248 of file eggTransform3d.I.

EggTransform3d::ComponentType EggTransform3d::get_component_type int  n  )  const [inline, inherited]
 

Returns the type of the nth component.

Definition at line 226 of file eggTransform3d.I.

References EggTransform3d::_components.

const LVector3d & EggTransform3d::get_component_vector int  n  )  const [inline, 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 vector property.

Definition at line 270 of file eggTransform3d.I.

EggGroup::CollisionSolidType EggGroup::get_cs_type  )  const [inline]
 

Definition at line 201 of file eggGroup.I.

References _flags, F_collide_flags, INLINE, and nassertv.

Referenced by EggLoader::make_node().

EggGroup::DartType EggGroup::get_dart_type  )  const [inline]
 

Definition at line 327 of file eggGroup.I.

References _object_types, and INLINE.

Referenced by EggLoader::make_node().

EggGroup::DCSType EggGroup::get_dcs_type  )  const [inline]
 

Definition at line 301 of file eggGroup.I.

References _fps, and INLINE.

bool EggGroup::get_decal_flag  )  const [inline]
 

Definition at line 540 of file eggGroup.I.

int EggNode::get_depth  )  const [inline, inherited]
 

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

Definition at line 90 of file eggNode.I.

EggRenderMode::DepthTestMode EggRenderMode::get_depth_test_mode  )  const [inline, inherited]
 

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

See set_depth_test_mode().

Definition at line 138 of file eggRenderMode.I.

References EggRenderMode::_alpha_mode.

Referenced by determine_alpha_mode(), and EggPrimitive::determine_depth_write_mode().

EggRenderMode::DepthWriteMode EggRenderMode::get_depth_write_mode  )  const [inline, inherited]
 

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

See set_depth_write_mode().

Definition at line 100 of file eggRenderMode.I.

References EggRenderMode::_depth_test_mode, EggRenderMode::DepthTestMode, and INLINE.

bool EggGroup::get_direct_flag  )  const [inline]
 

Definition at line 568 of file eggGroup.I.

References _flags2, F2_into_collide_mask, and INLINE.

int EggRenderMode::get_draw_order  )  const [inline, inherited]
 

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

See set_draw_order().

Definition at line 224 of file eggRenderMode.I.

References EggRenderMode::_bin, and INLINE.

CollideMask EggGroup::get_from_collide_mask  )  const [inline]
 

Definition at line 668 of file eggGroup.I.

References _vref, and INLINE.

EggGroup::GroupType EggGroup::get_group_type  )  const [inline]
 

Definition at line 31 of file eggGroup.I.

References BT_none, get_billboard_type(), GT_instance, has_billboard_center(), and INLINE.

Referenced by CharacterMaker::create_slider().

CollideMask EggGroup::get_into_collide_mask  )  const [inline]
 

Definition at line 718 of file eggGroup.I.

const EggSwitchCondition & EggGroup::get_lod  )  const [inline]
 

Definition at line 767 of file eggGroup.I.

bool EggGroup::get_model_flag  )  const [inline]
 

Definition at line 456 of file eggGroup.I.

const string & Namable::get_name  )  const [inline, inherited]
 

Definition at line 109 of file namable.I.

Referenced by ComputedVerticesMaker::add_normal(), GLGraphicsStateGuardian::begin_bind_clip_planes(), GLGraphicsStateGuardian::begin_bind_lights(), BuilderBucket::BuilderBucket(), EggVertex::clear_grefs(), AnimBundleMaker::create_xfm_channel(), SceneGraphReducer::do_flatten_siblings(), BuilderBucket::done_geom(), DXTextureContext8::DXTextureContext8(), PartGroup::find_child(), EggLoader::find_collision_geometry(), EggGroupUniquifier::get_category(), PartBundle::get_control_effect(), PartGroup::get_num_children(), EggMorph< Parameter >::get_offset(), AnimChannelBase::has_changed(), Namable::has_name(), EggMaterial::is_equivalent_to(), Texture::load(), EggLoader::make_node(), AnimBundleMaker::make_node(), FindApproxPath::Component::matches(), LineSegs::move_to(), MovingPartBase::MovingPartBase(), NodeMap::NodeMap(), EggMorph< Parameter >::operator<(), operator<<(), MouseWatcherRegion::output(), AnimGroup::output(), EggXfmSAnim::r_transform(), Texture::read(), MouseWatcherGroup::remove_region(), EggLoader::reparent_decals(), CRGraphicsStateGuardian::set_blend_mode(), NodePath::set_color(), GLGraphicsStateGuardian::set_draw_buffer(), AnimChannelScalarTable::set_table(), NodePath::set_transparency(), NodePathComponent::uncollapse(), Texture::unprepare(), TextNode::wordwrap_to(), MovingPartBase::write(), CollisionNode::xform(), and EggVertex::~EggVertex().

const LMatrix4d & EggNode::get_node_frame  )  const [inline, inherited]
 

Returns the coordinate frame of the node itself.

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

Definition at line 210 of file eggNode.I.

Referenced by string_collide_flags().

const LMatrix4d & EggNode::get_node_frame_inv  )  const [inline, inherited]
 

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

See get_node_frame().

Definition at line 249 of file eggNode.I.

Referenced by string_collide_flags().

const LMatrix4d & EggNode::get_node_to_vertex  )  const [inline, 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()

Definition at line 307 of file eggNode.I.

bool EggGroup::get_nofog_flag  )  const [inline]
 

Definition at line 512 of file eggGroup.I.

References _flags2, _from_collide_mask, F2_from_collide_mask, and INLINE.

int EggTransform3d::get_num_components  )  const [inline, inherited]
 

Returns the number of components that make up the transform.

Definition at line 213 of file eggTransform3d.I.

References EggTransform3d::_components.

int EggGroup::get_num_object_types  )  const [inline]
 

Definition at line 415 of file eggGroup.I.

References _flags, F_nofog_flag, and INLINE.

Referenced by EggLoader::create_collision_polygons(), and EggLoader::make_node().

string EggGroup::get_object_type int  index  )  const [inline]
 

Definition at line 427 of file eggGroup.I.

References _flags, and F_decal_flag.

Referenced by EggLoader::create_collision_polygons().

EggGroupNode * EggNode::get_parent  )  const [inline, inherited]
 

Definition at line 75 of file eggNode.I.

References EggNode::_depth.

Referenced by EggNode::determine_draw_order(), and CharacterMaker::make_dynamic_primitive().

int ReferenceCount::get_ref_count  )  const [inline, inherited]
 

Returns the current reference count.

Definition at line 183 of file referenceCount.I.

Referenced by RenderState::determine_bin_index(), RenderEffects::determine_show_bounds(), FontPool::ns_garbage_collect(), TexturePool::ns_garbage_collect(), MaterialPool::ns_get_material(), and TexturePool::ns_release_texture().

bool EggGroup::get_switch_flag  )  const [inline]
 

Definition at line 355 of file eggGroup.I.

References _flags, and F_model_flag.

Referenced by EggLoader::make_node().

double EggGroup::get_switch_fps  )  const [inline]
 

Definition at line 379 of file eggGroup.I.

References _flags, and F_texlist_flag.

Referenced by EggLoader::make_node().

bool EggGroup::get_texlist_flag  )  const [inline]
 

Definition at line 484 of file eggGroup.I.

References _flags2, F2_collide_mask, and INLINE.

const LMatrix4d & EggTransform3d::get_transform  )  const [inline, inherited]
 

Returns the overall transform as a 4x4 matrix.

Definition at line 182 of file eggTransform3d.I.

References EggTransform3d::_components.

Referenced by CharacterMaker::make_bundle(), and string_collide_flags().

virtual TypeHandle EggGroup::get_type void   )  const [inline, virtual]
 

Reimplemented from EggGroupNode.

Reimplemented in EggBin.

Definition at line 272 of file eggGroup.h.

int TypedObject::get_type_index  )  const [inline, inherited]
 

Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.

This is equivalent to get_type().get_index().

Definition at line 71 of file typedObject.I.

References TypeHandle::get_name(), TypedObject::get_type(), and INLINE.

const LMatrix4d & EggNode::get_vertex_frame  )  const [inline, 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 entry reference their vertices in the coordinate system under effect at the time of the . Thus, nodes under an entry may return this non-identity matrix.

Specifically, this may return a non-identity matrix only if is_local_coord() is true.

Definition at line 188 of file eggNode.I.

References EggNode::_node_frame_inv, and NULL.

Referenced by string_collide_flags().

const LMatrix4d & EggNode::get_vertex_frame_inv  )  const [inline, inherited]
 

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

See get_vertex_frame().

Definition at line 229 of file eggNode.I.

Referenced by string_collide_flags().

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 550 of file eggGroup.cxx.

References cmp_nocase_uh(), DC_default, DC_local, DC_net, DC_none, and DCSType.

Referenced by split_vertex().

const LMatrix4d & EggNode::get_vertex_to_node  )  const [inline, 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()

Definition at line 278 of file eggNode.I.

References INLINE, EggNode::r_flatten_transforms(), and EggNode::update_under().

Referenced by EggLoader::find_collision_geometry().

bool EggGroup::has_billboard_center  )  const [inline]
 

Definition at line 162 of file eggGroup.I.

References _collision_name, and INLINE.

Referenced by get_group_type().

bool EggRenderMode::has_bin  )  const [inline, inherited]
 

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

See set_bin().

Definition at line 311 of file eggRenderMode.I.

Referenced by determine_depth_write_mode().

bool EggGroup::has_collide_mask  )  const [inline]
 

Definition at line 606 of file eggGroup.I.

References _lod, INLINE, and NULL.

bool EggGroup::has_collision_name  )  const [inline]
 

Definition at line 237 of file eggGroup.I.

References _flags2, and F2_dcs_type.

bool EggRenderMode::has_draw_order  )  const [inline, inherited]
 

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

See set_draw_order().

Definition at line 239 of file eggRenderMode.I.

Referenced by EggPrimitive::determine_depth_test_mode().

bool EggGroup::has_from_collide_mask  )  const [inline]
 

Definition at line 656 of file eggGroup.I.

References _vref, and INLINE.

bool EggGroup::has_into_collide_mask  )  const [inline]
 

Definition at line 706 of file eggGroup.I.

bool EggGroup::has_lod  )  const [inline]
 

Definition at line 755 of file eggGroup.I.

bool Namable::has_name  )  const [inline, inherited]
 

Returns true if the Namable has a nonempty name set, false if the name is empty.

Definition at line 97 of file namable.I.

References Namable::get_name(), and INLINE.

Referenced by EggGroupUniquifier::EggGroupUniquifier(), Texture::read(), and Texture::Texture().

bool EggGroup::has_object_type const string &  object_type  )  const
 

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

Definition at line 146 of file eggGroup.cxx.

References _object_types, and cmp_nocase_uh().

bool EggTransform3d::has_transform  )  const [inline, inherited]
 

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

Definition at line 151 of file eggTransform3d.I.

References EggTransform3d::_components, EggTransform3d::_transform, and INLINE.

void EggGroup::init_type void   )  [inline, static]
 

Reimplemented from EggGroupNode.

Reimplemented in EggBin.

Definition at line 265 of file eggGroup.h.

References EggGroupNode::get_class_type().

EggGroupNode::iterator EggGroupNode::insert iterator  position,
PointerTo< EggNode x
[inherited]
 

Definition at line 187 of file eggGroupNode.cxx.

References EggGroupNode::_children.

Referenced by EggMaterialCollection::extract_materials(), and EggTextureCollection::extract_textures().

void EggTransform3d::internal_add_matrix const LMatrix4d &  mat  )  [protected, inherited]
 

Appends an arbitrary 4x4 matrix to the current transform, without calling transform_changed().

Definition at line 319 of file eggTransform3d.cxx.

void EggTransform3d::internal_clear_transform  )  [protected, inherited]
 

Resets the transform to empty without calling transform_changed().

Definition at line 303 of file eggTransform3d.cxx.

Referenced by EggTransform3d::Component::~Component().

void EggTransform3d::internal_set_transform const LMatrix4d &  mat  )  [inline, protected, inherited]
 

Sets the overall transform without calling transform_changed().

Definition at line 306 of file eggTransform3d.I.

Referenced by EggTransform3d::add_matrix().

bool TypedObject::is_exact_type TypeHandle  handle  )  const [inline, inherited]
 

Returns true if the current object is the indicated type exactly.

Definition at line 101 of file typedObject.I.

Referenced by PT(), and CollisionNode::xform().

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 58 of file eggGroup.I.

References _flags, and F_billboard_type.

bool EggNode::is_local_coord  )  const [inline, inherited]
 

Returns true if this node's vertices are not in the global coordinate space.

This will be the case if there was an node under a transform at or above this node.

Definition at line 144 of file eggNode.I.

Referenced by EggVertex::sorts_less_than().

bool TypedObject::is_of_type TypeHandle  handle  )  const [inline, inherited]
 

Returns true if the current object is or derives from the indicated type.

Definition at line 86 of file typedObject.I.

Referenced by EggMaterialCollection::collapse_equivalent_materials(), EggTextureCollection::collapse_equivalent_textures(), DeferredNodeProperty::compose(), AnimBundleMaker::create_s_channel(), CharacterMaker::create_slider(), ProjectionScreen::cull_callback(), DataNode::define_output(), EggNode::determine_draw_order(), CharacterMaker::egg_to_index(), EggGroupUniquifier::EggGroupUniquifier(), EggPoolUniquifier::EggPoolUniquifier(), EggGroupNode::find_textures(), StaticTextFont::get_glyph(), EggMaterialCollection::insert_materials(), EggTextureCollection::insert_textures(), CharacterJoint::make_copy(), PT(), EggGroupNode::r_flatten_transforms(), EggGroupNode::r_transform_vertices(), EggGroupNode::recompute_polygon_normals(), CollisionLevelState::reserve(), PandaFramework::reset_frame_rate(), PandaFramework::set_texture(), EggGroupNode::steal_children(), and DataGraphTraverser::traverse().

bool EggNode::is_under_instance  )  const [inline, inherited]
 

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

Definition at line 108 of file eggNode.I.

References EggNode::_under_flags, INLINE, and EggNode::UF_local_coord.

Referenced by EggGroupNode::find_textures().

bool EggNode::is_under_transform  )  const [inline, inherited]
 

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

Definition at line 125 of file eggNode.I.

References EggNode::_vertex_frame, INLINE, and NULL.

bool EggRenderMode::operator!= const EggRenderMode other  )  const [inline, inherited]
 

Definition at line 338 of file eggRenderMode.I.

bool EggRenderMode::operator< const EggRenderMode other  )  const [inherited]
 

Definition at line 100 of file eggRenderMode.cxx.

References EggRenderMode::_has_draw_order.

EggGroup & EggGroup::operator= const EggGroup &  copy  ) 
 

Definition at line 69 of file eggGroup.cxx.

References _vref.

bool EggRenderMode::operator== const EggRenderMode other  )  const [inherited]
 

Definition at line 71 of file eggRenderMode.cxx.

References EggRenderMode::_draw_order.

void Namable::output ostream &  out  )  const [inline, inherited]
 

Outputs the Namable.

This function simply writes the name to the output stream; most Namable derivatives will probably redefine this.

Reimplemented in BuilderBucket, AnimBundle, AnimChannelBase, AnimChannelFixed< SwitchType >, AnimGroup, PartBundle, CollisionNode, ButtonNode, HermiteCurve, RopeNode, Fog, GeomNode, LensNode, LightLensNode, LightNode, LODNode, PandaNode, PlaneNode, MouseWatcher, and MouseWatcherRegion.

Definition at line 126 of file namable.I.

bool EggNode::parse_egg const 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.

Definition at line 200 of file eggNode.cxx.

References EggNode::_parent.

void EggGroupNode::r_apply_texmats EggTextureCollection textures  )  [protected, virtual, inherited]
 

The recursive implementation of apply_texmats().

Reimplemented from EggNode.

Definition at line 932 of file eggGroupNode.cxx.

References ReferenceCount::ref().

void EggGroup::r_flatten_transforms  )  [protected, virtual]
 

The recursive implementation of flatten_transforms().

Reimplemented from EggGroupNode.

Definition at line 986 of file eggGroup.cxx.

References CF_center, CF_descend, CF_event, CF_intangible, CF_keep, CF_none, CF_solid, CF_turnstile, and t.

bool EggGroupNode::r_load_externals const DSearchPath searchpath,
CoordinateSystem  coordsys
[protected, inherited]
 

Walks the tree and locates unloaded external reference nodes, which it attempts to locate and load in.

The reference node is replaced with the entire subtree loaded. This is intended to be called from EggData::load_externals().

Definition at line 1126 of file eggGroupNode.cxx.

void EggGroupNode::r_mark_coordsys CoordinateSystem  cs  )  [protected, virtual, inherited]
 

This is only called immediately after loading an egg file from disk, to propagate the value found in the CoordinateSystem entry (or the default Y-up coordinate system) to all nodes that care about what the coordinate system is.

Reimplemented from EggNode.

Reimplemented in EggXfmSAnim.

Definition at line 896 of file eggGroupNode.cxx.

void EggGroup::r_transform const LMatrix4d &  mat,
const LMatrix4d &  inv,
CoordinateSystem  to_cs
[protected, virtual]
 

This is called from within the egg code by transform().

It applies a transformation matrix to the current node in some sensible way, then continues down the tree.

The first matrix is the transformation to apply; the second is its inverse. The third parameter is the coordinate system we are changing to, or CS_default if we are not changing coordinate systems.

Reimplemented from EggGroupNode.

Definition at line 941 of file eggGroup.cxx.

References BT_axis, BT_none, BT_point_camera_relative, BT_point_world_relative, and nassertr.

void EggGroupNode::r_transform_vertices const LMatrix4d &  mat  )  [protected, virtual, inherited]
 

This is called from within the egg code by transform_vertices_only()().

It applies a transformation matrix to the current node in some sensible way (if the current node is a vertex pool with vertices), then continues down the tree.

Reimplemented from EggNode.

Definition at line 870 of file eggGroupNode.cxx.

References EggGroupNode::_children, EggMaterialCollection::add_material(), DCAST, EggMaterial::get_class_type(), TypedObject::is_of_type(), EggGroupNode::prepare_remove_child(), and tex.

EggGroupNode::reverse_iterator EggGroupNode::rbegin  )  const [inherited]
 

Definition at line 139 of file eggGroupNode.cxx.

References EggGroupNode::_children.

void EggGroupNode::recompute_polygon_normals CoordinateSystem  cs = CS_default  )  [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.

Definition at line 532 of file eggGroupNode.cxx.

References EggGroupNode::_children, DCAST, EggGroupNode::get_class_type(), EggPolygon::get_class_type(), TypedObject::is_of_type(), and EggPolygon::triangulate_in_place().

Referenced by EggData::get_egg_filename().

void EggGroupNode::recompute_vertex_normals double  threshold,
CoordinateSystem  cs = CS_default
[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.

Definition at line 442 of file eggGroupNode.cxx.

References EggGroupNode::_children.

Referenced by EggGroupNode::find_textures(), and EggData::set_egg_filename().

int ReferenceCount::ref  )  const [inline, inherited]
 

Explicitly increments the reference count.

User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically.

This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it.

The return value is the new reference count.

Definition at line 225 of file referenceCount.I.

Referenced by ClientDevice::ClientDevice(), EggGroupNode::find_textures(), EggGroupNode::r_apply_texmats(), EggGroupNode::r_flatten_transforms(), and EggGroupNode::reverse_vertex_ordering().

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 459 of file eggGroup.cxx.

References _vref.

Referenced by split_vertex().

PointerTo< EggNode > EggGroupNode::remove_child PointerTo< 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.

Definition at line 291 of file eggGroupNode.cxx.

References DCAST, ImageBuffer::get_alpha_filename(), ImageBuffer::get_filename(), ImageBuffer::has_alpha_filename(), Filename::resolve_filename(), ImageBuffer::set_alpha_filename(), ImageBuffer::set_filename(), and tex.

int EggGroupNode::remove_invalid_primitives  )  [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.

Definition at line 754 of file eggGroupNode.cxx.

bool EggGroup::remove_object_type const 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 171 of file eggGroup.cxx.

References GT_instance, and GT_joint.

int EggGroupNode::remove_unused_vertices  )  [inherited]
 

Removes all vertices from VertexPools within this group or below that are not referenced by at least one primitive.

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

Definition at line 709 of file eggGroupNode.cxx.

References EggGroupNode::_children, and cs.

EggGroupNode::reverse_iterator EggGroupNode::rend  )  const [inherited]
 

Definition at line 151 of file eggGroupNode.cxx.

References EggGroupNode::_children.

void EggGroupNode::replace iterator  position,
PointerTo< EggNode x
[inherited]
 

Replaces the node at the indicated position with the indicated node.

It is an error to call this with an invalid position iterator (e.g. end()).

Definition at line 235 of file eggGroupNode.cxx.

References EggGroupNode::begin(), EggGroupNode::end(), EggGroupNode::erase(), EggGroupNode::iterator, and PT.

void EggGroupNode::resolve_filenames const DSearchPath searchpath  )  [inherited]
 

Walks the tree and attempts to resolve any filenames encountered.

This looks up filenames in the search path, etc. It does not automatically search the egg_path for missing files.

Definition at line 344 of file eggGroupNode.cxx.

References cs, deg_2_rad(), and EggGroupNode::r_collect_vertex_normals().

void EggGroupNode::reverse_vertex_ordering  )  [inherited]
 

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

Does not change the surface normals, if any.

Definition at line 387 of file eggGroupNode.cxx.

References EggGroupNode::NVertexReference::_normal, dot(), and ReferenceCount::ref().

void EggRenderMode::set_alpha_mode AlphaMode  mode  )  [inline, 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.

Definition at line 169 of file eggRenderMode.I.

References EggRenderMode::_has_draw_order, and INLINE.

void EggGroup::set_billboard_center const LPoint3d &  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 , and the billboard rotates around the origin. If, however, a billboard_center is specified, then the group node is *not* treated as an , 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 somewhere above. Specifically, this is the coordinate system defined by get_vertex_frame().

Definition at line 133 of file eggGroup.I.

void EggGroup::set_billboard_type BillboardType  type  )  [inline]
 

Definition at line 72 of file eggGroup.I.

void EggRenderMode::set_bin const string &  bin  )  [inline, 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().

Definition at line 281 of file eggRenderMode.I.

void EggGroup::set_collide_flags int  flags  )  [inline]
 

Definition at line 261 of file eggGroup.I.

void EggGroup::set_collide_mask CollideMask  mask  )  [inline]
 

Definition at line 581 of file eggGroup.I.

References _flags2, and F2_into_collide_mask.

void EggGroup::set_collision_name const string &  collision_name  )  [inline]
 

Definition at line 213 of file eggGroup.I.

References _flags, CollideFlags, F_collide_flags, and INLINE.

void EggGroup::set_cs_type CollisionSolidType  type  )  [inline]
 

Definition at line 187 of file eggGroup.I.

References _collision_name, and INLINE.

void EggGroup::set_dart_type EggGroup::DartType  type  )  [inline]
 

Definition at line 313 of file eggGroup.I.

References _object_types.

void EggGroup::set_dcs_type EggGroup::DCSType  type  )  [inline]
 

Definition at line 287 of file eggGroup.I.

References _fps, and INLINE.

void EggGroup::set_decal_flag bool  flag  )  [inline]
 

Definition at line 524 of file eggGroup.I.

References _flags2, F2_from_collide_mask, and INLINE.

void EggRenderMode::set_depth_test_mode DepthTestMode  mode  )  [inline, 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.

Definition at line 121 of file eggRenderMode.I.

References EggRenderMode::_alpha_mode, and INLINE.

void EggRenderMode::set_depth_write_mode DepthWriteMode  mode  )  [inline, inherited]
 

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

Definition at line 83 of file eggRenderMode.I.

void EggGroup::set_direct_flag bool  flag  )  [inline]
 

Definition at line 552 of file eggGroup.I.

References _flags2, _into_collide_mask, F2_into_collide_mask, and INLINE.

void EggRenderMode::set_draw_order int  order  )  [inline, 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().

Definition at line 208 of file eggRenderMode.I.

References EggRenderMode::_bin, and INLINE.

void EggGroup::set_from_collide_mask CollideMask  mask  )  [inline]
 

Definition at line 631 of file eggGroup.I.

References _lod.

void EggGroup::set_group_type GroupType  type  ) 
 

Definition at line 123 of file eggGroup.cxx.

References _object_types, and cmp_nocase_uh().

Referenced by egg_start_parse_body().

void EggGroup::set_into_collide_mask CollideMask  mask  )  [inline]
 

Definition at line 681 of file eggGroup.I.

void EggGroup::set_lod const EggSwitchCondition lod  )  [inline]
 

Definition at line 731 of file eggGroup.I.

void EggGroup::set_model_flag bool  flag  )  [inline]
 

Definition at line 440 of file eggGroup.I.

References _flags, and F_decal_flag.

void Namable::set_name const string &  name  )  [inline, inherited]
 

Definition at line 69 of file namable.I.

References Namable::_name.

Referenced by BuilderBucket::BuilderBucket(), SceneGraphReducer::do_flatten_siblings(), Texture::read(), PandaNode::reparent(), and Texture::Texture().

void EggGroup::set_nofog_flag bool  flag  )  [inline]
 

Definition at line 496 of file eggGroup.I.

References _flags2, and F2_collide_mask.

void EggGroup::set_switch_flag bool  flag  )  [inline]
 

Definition at line 339 of file eggGroup.I.

References _object_types, INLINE, and nassertr.

void EggGroup::set_switch_fps double  fps  )  [inline]
 

Definition at line 367 of file eggGroup.I.

References _flags, F_model_flag, and INLINE.

void EggGroup::set_texlist_flag bool  flag  )  [inline]
 

Definition at line 468 of file eggGroup.I.

References _collide_mask, _flags2, F2_collide_mask, and INLINE.

void EggTransform3d::set_transform const LMatrix4d &  mat  )  [inline, inherited]
 

Sets the overall transform as a 4x4 matrix.

This completely replaces whatever componentwise transform may have been defined.

Definition at line 168 of file eggTransform3d.I.

References EggTransform3d::_components, and INLINE.

EggGroupNode::size_type EggGroupNode::size  )  const [inherited]
 

Definition at line 175 of file eggGroupNode.cxx.

References EggGroupNode::iterator, and EggGroupNode::prepare_remove_child().

void EggGroupNode::steal_children 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.

Definition at line 316 of file eggGroupNode.cxx.

References EggGroupNode::_children, DCAST, EggGroupNode::get_class_type(), EggPrimitive::get_class_type(), TypedObject::is_of_type(), and EggPrimitive::reverse_vertex_ordering().

Referenced by EggXfmSAnim::add_data().

EggRenderMode::AlphaMode EggRenderMode::string_alpha_mode const 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.

Definition at line 141 of file eggRenderMode.cxx.

References EggRenderMode::AM_dual.

EggGroup::BillboardType EggGroup::string_billboard_type const string &  string  )  [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 679 of file eggGroup.cxx.

EggGroup::CollideFlags EggGroup::string_collide_flags const string &  string  )  [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 741 of file eggGroup.cxx.

References EggNode::_node_frame, EggNode::_node_frame_inv, EggNode::_node_to_vertex, EggNode::_under_flags, EggNode::_vertex_to_node, EggNode::get_node_frame(), EggNode::get_node_frame_inv(), EggTransform3d::get_transform(), EggNode::get_vertex_frame(), EggNode::get_vertex_frame_inv(), EggNode::MatrixFrame, and EggNode::UF_under_transform.

EggGroup::CollisionSolidType EggGroup::string_cs_type const string &  string  )  [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 706 of file eggGroup.cxx.

EggGroup::DartType EggGroup::string_dart_type const string &  string  )  [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 629 of file eggGroup.cxx.

EggGroup::DCSType EggGroup::string_dcs_type const string &  string  )  [static]
 

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

Definition at line 654 of file eggGroup.cxx.

References _vref, EggVertex::get_index(), and EggVertex::get_pool().

EggRenderMode::DepthTestMode EggRenderMode::string_depth_test_mode const string &  string  )  [static, inherited]
 

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

Definition at line 203 of file eggRenderMode.cxx.

References EggRenderMode::AM_binary, EggRenderMode::AM_dual, and EggRenderMode::AM_ms_mask.

EggRenderMode::DepthWriteMode EggRenderMode::string_depth_write_mode const 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.

Definition at line 178 of file eggRenderMode.cxx.

EggGroup::GroupType EggGroup::string_group_type const string &  string  )  [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 604 of file eggGroup.cxx.

References CST_sphere.

void EggGroupNode::strip_normals  )  [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.

Definition at line 595 of file eggGroupNode.cxx.

void ReferenceCount::test_ref_count_integrity  )  const [inline, inherited]
 

Does some easy checks to make sure that the reference count isn't completely bogus.

Definition at line 328 of file referenceCount.I.

References INLINE.

Referenced by EggNode::determine_bin(), and ReferenceCount::~ReferenceCount().

void EggNode::test_under_integrity  )  const [inherited]
 

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

Definition at line 235 of file eggNode.cxx.

References EggNode::_depth, EggNode::_node_frame, EggNode::_node_frame_inv, EggNode::_node_to_vertex, EggNode::_parent, EggNode::_under_flags, EggNode::_vertex_frame, EggNode::_vertex_frame_inv, EggNode::_vertex_to_node, EggNode::adjust_under(), and NULL.

void EggGroup::test_vref_integrity  )  const
 

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

Definition at line 574 of file eggGroup.cxx.

References BT_axis, BT_none, BT_point_camera_relative, BT_point_world_relative, and cmp_nocase_uh().

void EggNode::transform const LMatrix4d &  mat  )  [inline, inherited]
 

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

Reimplemented in EggVertexPool.

Definition at line 327 of file eggNode.I.

void EggGroup::transform_changed  )  [protected, virtual]
 

This virtual method is inherited by EggTransform3d; it is called whenever the transform is changed.

Reimplemented from EggTransform3d.

Definition at line 1026 of file eggGroup.cxx.

bool EggTransform3d::transform_is_identity  )  const [inline, inherited]
 

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

Definition at line 197 of file eggTransform3d.I.

References EggTransform3d::_components.

void EggNode::transform_vertices_only const LMatrix4d &  mat  )  [inline, 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.

Definition at line 352 of file eggNode.I.

int EggGroupNode::triangulate_polygons bool  convex_also  )  [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 convex_also is true, both concave and convex polygons will be subdivided into triangles; otherwise, only concave polygons will be subdivided, and convex polygons will be largely unchanged.

Definition at line 651 of file eggGroupNode.cxx.

References EggGroupNode::_children, nassertv, and EggNode::update_under().

int ReferenceCount::unref  )  const [inline, inherited]
 

Explicitly decrements the reference count.

Note that the object will not be implicitly deleted by unref() simply because the reference count drops to zero. (Having a member function delete itself is problematic; plus, we don't have a virtual destructor anyway.) However, see the helper function unref_delete().

User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically.

This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it.

The return value is the new reference count.

Definition at line 293 of file referenceCount.I.

References INLINE.

Referenced by RenderState::determine_bin_index(), and RenderEffects::determine_show_bounds().

void EggGroup::unref_all_vertices  ) 
 

Removes all vertices from the reference list.

Definition at line 521 of file eggGroup.cxx.

Referenced by EggGroup().

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 500 of file eggGroup.cxx.

References cmp_nocase_uh(), GroupType, GT_group, GT_instance, and GT_joint.

Referenced by determine_depth_test_mode().

void EggGroupNode::update_under int  depth_offset  )  [protected, virtual, inherited]
 

This function is called from within EggGroupNode whenever the parentage of the node has changed.

It should update the depth and under_instance flags accordingly.

Offset is the difference between the old depth value and the new value. It should be consistent with the supplied depth value. If it is not, we have some error.

Reimplemented from EggNode.

Definition at line 806 of file eggGroupNode.cxx.

Referenced by get_billboard_type(), and ~EggGroup().

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 793 of file eggGroup.I.

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 818 of file eggGroup.I.

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 839 of file eggGroup.I.

void EggGroup::write 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 193 of file eggGroup.cxx.

void EggNamedObject::write_header ostream &  out,
int  indent_level,
const char *  egg_keyword
const [inherited]
 

Writes the first line of the egg object, e.g.

"<Group> group_name {" or some such. It automatically enquotes the name if it contains any special characters. egg_keyword is the keyword that begins the line, e.g. "<Group>".

Definition at line 46 of file eggNamedObject.cxx.

Referenced by EggPoint::cleanup(), EggNurbsSurface::is_closed_u(), and EggExternalReference::operator=().

void EggGroup::write_vertex_ref ostream &  out,
int  indent_level
const [protected]
 

Writes out the vertex ref component of the group body only.

This may consist of a number of entries, each with its own membership value.

Definition at line 776 of file eggGroup.cxx.


Member Data Documentation

LPoint3d EggGroup::_billboard_center [private]
 

Definition at line 252 of file eggGroup.h.

Referenced by get_billboard_type().

CollideMask EggGroup::_collide_mask [private]
 

Definition at line 251 of file eggGroup.h.

Referenced by set_texlist_flag().

string EggGroup::_collision_name [private]
 

Definition at line 254 of file eggGroup.h.

Referenced by EggGroup(), get_billboard_center(), has_billboard_center(), and set_cs_type().

int EggNode::_depth [protected, inherited]
 

Definition at line 115 of file eggNode.h.

Referenced by EggNode::determine_bin(), EggNode::EggNode(), EggNode::get_parent(), and EggNode::test_under_integrity().

int EggGroup::_flags [private]
 

Definition at line 249 of file eggGroup.h.

Referenced by add_object_type(), clear_billboard_center(), clear_object_types(), EggGroup(), get_collision_name(), get_cs_type(), get_num_object_types(), get_object_type(), get_switch_flag(), get_switch_fps(), is_instance_type(), set_collision_name(), set_model_flag(), set_switch_fps(), and ~EggGroup().

int EggGroup::_flags2 [private]
 

Definition at line 250 of file eggGroup.h.

Referenced by clear_collision_name(), EggGroup(), get_billboard_type(), get_direct_flag(), get_nofog_flag(), get_texlist_flag(), has_collision_name(), set_collide_mask(), set_decal_flag(), set_direct_flag(), set_nofog_flag(), and set_texlist_flag().

double EggGroup::_fps [private]
 

Definition at line 255 of file eggGroup.h.

Referenced by EggGroup(), get_dcs_type(), and set_dcs_type().

CollideMask EggGroup::_from_collide_mask [private]
 

Definition at line 251 of file eggGroup.h.

Referenced by get_nofog_flag().

CollideMask EggGroup::_into_collide_mask [private]
 

Definition at line 251 of file eggGroup.h.

Referenced by set_direct_flag().

PointerTo< EggSwitchCondition > EggGroup::_lod [private]
 

Definition at line 256 of file eggGroup.h.

Referenced by clear_collide_mask(), get_collide_mask(), has_collide_mask(), and set_from_collide_mask().

PointerTo< MatrixFrame > EggNode::_node_frame [protected, inherited]
 

Definition at line 121 of file eggNode.h.

Referenced by string_collide_flags(), and EggNode::test_under_integrity().

PointerTo< MatrixFrame > EggNode::_node_frame_inv [protected, inherited]
 

Definition at line 123 of file eggNode.h.

Referenced by EggNode::get_vertex_frame(), string_collide_flags(), and EggNode::test_under_integrity().

PointerTo< MatrixFrame > EggNode::_node_to_vertex [protected, inherited]
 

Definition at line 125 of file eggNode.h.

Referenced by string_collide_flags(), and EggNode::test_under_integrity().

vector_string EggGroup::_object_types [private]
 

Definition at line 253 of file eggGroup.h.

Referenced by EggGroup(), get_dart_type(), has_object_type(), set_dart_type(), set_group_type(), and set_switch_flag().

EggGroupNode* EggNode::_parent [protected, inherited]
 

Definition at line 114 of file eggNode.h.

Referenced by EggNode::apply_texmats(), EggNode::determine_alpha_mode(), EggNode::determine_bin(), EggNode::determine_depth_test_mode(), EggNode::EggNode(), EggNode::operator=(), EggNode::parse_egg(), and EggNode::test_under_integrity().

TypeHandle EggGroup::_type_handle [static, private]
 

Reimplemented from EggGroupNode.

Reimplemented in EggBin.

Definition at line 33 of file eggGroup.cxx.

int EggNode::_under_flags [protected, inherited]
 

Definition at line 116 of file eggNode.h.

Referenced by EggNode::determine_bin(), EggNode::EggNode(), EggNode::is_under_instance(), string_collide_flags(), and EggNode::test_under_integrity().

PointerTo< MatrixFrame > EggNode::_vertex_frame [protected, inherited]
 

Definition at line 120 of file eggNode.h.

Referenced by EggNode::is_under_transform(), and EggNode::test_under_integrity().

PointerTo< MatrixFrame > EggNode::_vertex_frame_inv [protected, inherited]
 

Definition at line 122 of file eggNode.h.

Referenced by EggNode::test_under_integrity().

PointerTo< MatrixFrame > EggNode::_vertex_to_node [protected, inherited]
 

Definition at line 124 of file eggNode.h.

Referenced by string_collide_flags(), and EggNode::test_under_integrity().

VertexRef EggGroup::_vref [private]
 

Definition at line 257 of file eggGroup.h.

Referenced by clear_from_collide_mask(), determine_depth_test_mode(), get_from_collide_mask(), has_from_collide_mask(), operator=(), ref_vertex(), and string_dcs_type().


The documentation for this class was generated from the following files:
Generated on Fri May 2 00:50:01 2003 for Panda by doxygen1.3