#include <eggLoader.h>
Public Member Functions | |
EggLoader () | |
EggLoader (const EggData &data) | |
void | build_graph () |
void | reparent_decals () |
For each node representing a decal base geometry (i.e. | |
void | make_nonindexed_primitive (EggPrimitive *egg_prim, PandaNode *parent, const LMatrix4d *transform=NULL) |
void | make_indexed_primitive (EggPrimitive *egg_prim, PandaNode *parent, const LMatrix4d *transform, ComputedVerticesMaker &_comp_verts_maker) |
Public Attributes | |
PointerTo< PandaNode > | _root |
EggData | _data |
bool | _error |
Private Types | |
typedef pmap< PT_EggTexture, TextureDef > | Textures |
typedef pmap< CPT_EggMaterial, ConstPointerTo< RenderAttrib > > | Materials |
typedef pset< PandaNode * > | Decals |
Private Member Functions | |
void | load_textures () |
bool | load_texture (TextureDef &def, const EggTexture *egg_tex) |
void | apply_texture_attributes (Texture *tex, const EggTexture *egg_tex) |
ConstPointerTo< RenderAttrib > | get_texture_apply_attributes (const EggTexture *egg_tex) |
ConstPointerTo< RenderAttrib > | get_material_attrib (const EggMaterial *egg_mat, bool bface) |
Returns a RenderAttrib suitable for enabling the material indicated by the given EggMaterial, and with the indicated backface flag. | |
void | setup_bucket (BuilderBucket &bucket, PandaNode *parent, EggPrimitive *egg_prim) |
PandaNode * | make_node (EggNode *egg_node, PandaNode *parent) |
PandaNode * | make_node (EggNurbsCurve *egg_curve, PandaNode *parent) |
PandaNode * | make_node (EggPrimitive *egg_prim, PandaNode *parent) |
PandaNode * | make_node (EggBin *egg_bin, PandaNode *parent) |
PandaNode * | make_node (EggGroup *egg_group, PandaNode *parent) |
PandaNode * | create_group_arc (EggGroup *egg_group, PandaNode *parent, PandaNode *node) |
Creates the arc parenting a new group to the scene graph, and applies any relevant attribs to the arc according to the EggGroup node that inspired the group. | |
PandaNode * | make_node (EggTable *egg_table, PandaNode *parent) |
PandaNode * | make_node (EggGroupNode *egg_group, PandaNode *parent) |
void | make_collision_solids (EggGroup *start_group, EggGroup *egg_group, CollisionNode *cnode) |
Creates CollisionSolids corresponding to the collision geometry indicated at the given node and below. | |
void | make_collision_plane (EggGroup *egg_group, CollisionNode *cnode, EggGroup::CollideFlags flags) |
Creates a single CollisionPlane corresponding to the first polygon associated with this group. | |
void | make_collision_polygon (EggGroup *egg_group, CollisionNode *cnode, EggGroup::CollideFlags flags) |
Creates a single CollisionPolygon corresponding to the first polygon associated with this group. | |
void | make_collision_polyset (EggGroup *egg_group, CollisionNode *cnode, EggGroup::CollideFlags flags) |
Creates a series of CollisionPolygons corresponding to the polygons associated with this group. | |
void | make_collision_sphere (EggGroup *egg_group, CollisionNode *cnode, EggGroup::CollideFlags flags) |
Creates a single CollisionSphere corresponding to the polygons associated with this group. | |
void | apply_collision_flags (CollisionSolid *solid, EggGroup::CollideFlags flags) |
Does funny stuff to the CollisionSolid as appropriate, based on the settings of the given CollideFlags. | |
EggGroup * | find_collision_geometry (EggGroup *egg_group) |
Looks for the node, at or below the indicated node, that contains the associated collision geometry. | |
CollisionPlane * | create_collision_plane (EggPolygon *egg_poly, EggGroup *parent_group) |
Creates a single CollisionPlane from the indicated EggPolygon. | |
void | create_collision_polygons (CollisionNode *cnode, EggPolygon *egg_poly, EggGroup *parent_group, EggGroup::CollideFlags flags) |
Creates one or more CollisionPolygons from the indicated EggPolygon, and adds them to the indicated CollisionNode. | |
void | apply_deferred_nodes (PandaNode *node, const DeferredNodeProperty &prop) |
Walks back over the tree and applies the DeferredNodeProperties that were saved up along the way. | |
bool | expand_object_types (EggGroup *egg_group, const pset< string > &expanded, const pvector< string > &expanded_history) |
Recursively expands the group's ObjectType string(s). | |
bool | do_expand_object_type (EggGroup *egg_group, const pset< string > &expanded, const pvector< string > &expanded_history, const string &object_type) |
Further implementation of expand_object_types(). | |
ConstPointerTo< TransformState > | make_transform (const EggTransform3d *egg_transform) |
Walks back over the tree and applies the DeferredNodeProperties that were saved up along the way. | |
Private Attributes | |
Builder | _builder |
Textures | _textures |
Materials | _materials |
Materials | _materials_bface |
Decals | _decals |
DeferredNodes | _deferred_nodes |
This class isn't exported from this package.
Definition at line 72 of file eggLoader.h.
|
Definition at line 152 of file eggLoader.h. |
|
Definition at line 148 of file eggLoader.h. |
|
Definition at line 145 of file eggLoader.h. |
|
Definition at line 114 of file eggLoader.cxx. References _error. |
|
Definition at line 128 of file eggLoader.cxx. References _data, _deferred_nodes, load_textures(), and EggBinMaker::make_bins(). |
|
Does funny stuff to the CollisionSolid as appropriate, based on the settings of the given CollideFlags.
Definition at line 1829 of file eggLoader.cxx. |
|
Walks back over the tree and applies the DeferredNodeProperties that were saved up along the way.
Definition at line 2013 of file eggLoader.cxx. |
|
Definition at line 585 of file eggLoader.cxx. References EggTexture::determine_wrap_v(), Texture::set_wrapv(), tex, Texture::WM_clamp, EggTexture::WM_clamp, Texture::WM_repeat, EggTexture::WM_repeat, and EggTexture::WM_unspecified. |
|
Definition at line 143 of file eggLoader.cxx. |
|
Creates a single CollisionPlane from the indicated EggPolygon.
Definition at line 1889 of file eggLoader.cxx. |
|
Creates one or more CollisionPolygons from the indicated EggPolygon, and adds them to the indicated CollisionNode.
Definition at line 1941 of file eggLoader.cxx. References _error, EggGroup::clear_object_types(), do_expand_object_type(), EggGroup::get_num_object_types(), and EggGroup::get_object_type(). |
|
Creates the arc parenting a new group to the scene graph, and applies any relevant attribs to the arc according to the EggGroup node that inspired the group.
Definition at line 1480 of file eggLoader.cxx. Referenced by make_node(). |
|
Further implementation of expand_object_types().
Definition at line 2113 of file eggLoader.cxx. Referenced by create_collision_polygons(). |
|
Recursively expands the group's ObjectType string(s). It's recursive because an ObjectType string might itself expand to another ObjectType string, which is allowed; but we don't want to get caught in a cycle. The return value is true if the object type is expanded and the node is valid, or false if the node should be ignored (e.g. ObjectType "backstage"). Definition at line 2057 of file eggLoader.cxx. Referenced by make_node(). |
|
Looks for the node, at or below the indicated node, that contains the associated collision geometry.
Definition at line 1847 of file eggLoader.cxx. References _error, EggPrimitive::begin(), EggPrimitive::const_iterator, DCAST, EggPrimitive::empty(), EggPrimitive::end(), Namable::get_name(), EggNode::get_vertex_to_node(), EggGroupNode::iterator, LCAST, PT, EggPolygon::triangulate_into(), and Vertexd. Referenced by make_collision_plane(). |
|
Returns a RenderAttrib suitable for enabling the material indicated by the given EggMaterial, and with the indicated backface flag.
Definition at line 918 of file eggLoader.cxx. |
|
|
Definition at line 501 of file eggLoader.cxx. References EggTexture::F_rgb332, EggTexture::F_rgb5, EggTexture::F_rgb8, EggTexture::F_rgba, EggTexture::F_rgba12, EggTexture::F_rgba4, EggTexture::F_rgba5, EggTexture::F_rgba8, EggTexture::F_rgbm, and EggTexture::F_unspecified. |
|
Definition at line 458 of file eggLoader.cxx. Referenced by EggLoader(). |
|
Creates a single CollisionPlane corresponding to the first polygon associated with this group.
Definition at line 1663 of file eggLoader.cxx. References EggPrimitive::begin(), EggGroupNode::begin(), EggPrimitive::const_iterator, EggGroupNode::const_iterator, DCAST, EggPrimitive::end(), EggGroupNode::end(), find_collision_geometry(), EggPrimitive::get_class_type(), and NULL. |
|
Creates a single CollisionPolygon corresponding to the first polygon associated with this group.
Definition at line 1693 of file eggLoader.cxx. References EggVertex::get_pos3(). |
|
Creates a series of CollisionPolygons corresponding to the polygons associated with this group.
Definition at line 1719 of file eggLoader.cxx. |
|
Creates CollisionSolids corresponding to the collision geometry indicated at the given node and below.
Definition at line 1604 of file eggLoader.cxx. References EggGroupNode::const_iterator, and NULL. Referenced by make_node(). |
|
Creates a single CollisionSphere corresponding to the polygons associated with this group.
Definition at line 1744 of file eggLoader.cxx. References EggGroup::CF_intangible, and CollisionSolid::set_tangible(). |
|
Definition at line 326 of file eggLoader.cxx. |
|
Definition at line 1579 of file eggLoader.cxx. |
|
Definition at line 1555 of file eggLoader.cxx. References _error, EggGroup::CST_inverse_sphere, EggGroup::CST_plane, EggGroup::CST_polygon, EggGroup::CST_polyset, and EggGroup::CST_sphere. |
|
Definition at line 1373 of file eggLoader.cxx. |
|
|
Definition at line 1289 of file eggLoader.cxx. References EggGroupNode::const_iterator. |
|
Definition at line 1208 of file eggLoader.cxx. |
|
Definition at line 1182 of file eggLoader.cxx. Referenced by make_node(). |
|
Definition at line 243 of file eggLoader.cxx. |
|
Walks back over the tree and applies the DeferredNodeProperties that were saved up along the way.
Definition at line 2204 of file eggLoader.cxx. |
|
For each node representing a decal base geometry (i.e. a node corresponding to an EggGroup with the decal flag set), move all of its nested geometry directly below the GeomNode representing the group. Definition at line 179 of file eggLoader.cxx. References _error, Namable::get_name(), NodePath::is_empty(), and NodePath::node(). |
|
Definition at line 974 of file eggLoader.cxx. References EggRenderMode::DepthTestMode, EggRenderMode::DTM_unspecified, and NULL. |
|
Definition at line 143 of file eggLoader.h. Referenced by build_graph(). |
|
Definition at line 159 of file eggLoader.h. Referenced by build_graph(), and EggLoader(). |
|
Definition at line 153 of file eggLoader.h. |
|
Definition at line 155 of file eggLoader.h. Referenced by EggLoader(). |
|
Definition at line 160 of file eggLoader.h. Referenced by create_collision_polygons(), EggLoader(), find_collision_geometry(), make_node(), and reparent_decals(). |
|
Definition at line 149 of file eggLoader.h. Referenced by get_texture_apply_attributes(). |
|
Definition at line 150 of file eggLoader.h. Referenced by get_texture_apply_attributes(). |
|
Definition at line 158 of file eggLoader.h. Referenced by build_graph(). |
|
Definition at line 146 of file eggLoader.h. |