Panda3D
|
Converts an egg data structure, possibly read from an egg file but not necessarily, into a scene graph suitable for rendering. More...
#include "eggLoader.h"
Classes | |
class | PrimitiveUnifier |
class | TextureDef |
class | VertexPoolTransform |
Public Member Functions | |
EggLoader (const EggData *data) | |
The EggLoader constructor makes a copy of the EggData passed in. | |
void | build_graph () |
CPT (TransformState) make_transform(const EggTransform *egg_transform) | |
void | make_polyset (EggBin *egg_bin, PandaNode *parent, const LMatrix4d *transform, bool is_dynamic, CharacterMaker *character_maker) |
Creates a polyset--that is, a Geom--from the primitives that have already been grouped into a bin. | |
PT (PandaNode) _root | |
PT (EggData) _data | |
PT (BamCacheRecord) _record | |
void | reparent_decals () |
For each node representing a decal base geometry (i.e. | |
void | start_sequences () |
Starts all of the SequenceNodes we created looping. | |
Public Attributes | |
bool | _dynamic_override |
CharacterMaker * | _dynamic_override_char_maker |
bool | _error |
Friends | |
class | EggRenderState |
class | PandaNode |
Converts an egg data structure, possibly read from an egg file but not necessarily, into a scene graph suitable for rendering.
This class isn't exported from this package.
Definition at line 70 of file eggLoader.h.
EggLoader::EggLoader | ( | const EggData * | data | ) |
The EggLoader constructor makes a copy of the EggData passed in.
Definition at line 153 of file eggLoader.cxx.
void EggLoader::make_polyset | ( | EggBin * | egg_bin, |
PandaNode * | parent, | ||
const LMatrix4d * | transform, | ||
bool | is_dynamic, | ||
CharacterMaker * | character_maker | ||
) |
Creates a polyset--that is, a Geom--from the primitives that have already been grouped into a bin.
If transform is non-NULL, it represents the transform to apply to the vertices (instead of the default transform based on the bin's position within the hierarchy).
Definition at line 314 of file eggLoader.cxx.
References EggRenderState::add_attrib(), PandaNode::add_child(), PandaNode::add_stashed(), LVecBase4f::almost_equal(), EggGroupNode::apply_first_attribute(), EggVertexPool::check_overall_color(), EggPrimitive::get_pool(), EggNode::get_vertex_to_node(), PandaNode::is_geom_node(), EggGroupNode::mesh_triangles(), EggGroupNode::post_apply_flat_attribute(), EggGroupNode::rebuild_vertex_pools(), EggVertexPool::remove_unused_vertices(), EggVertexPool::sort_by_external_index(), and EggGroupNode::triangulate_polygons().
void EggLoader::reparent_decals | ( | ) |
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 230 of file eggLoader.cxx.
References NodePath::get_child(), NodePath::get_num_children(), NodePath::is_empty(), TypedObject::is_of_type(), NodePath::node(), NodePath::reparent_to(), and PandaNode::set_effect().
void EggLoader::start_sequences | ( | ) |
Starts all of the SequenceNodes we created looping.
We have to wait until the entire graph is built up to do this, because the SequenceNode needs its full set of children before it can know how many frames to loop.
Definition at line 295 of file eggLoader.cxx.
References AnimInterface::loop().