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"
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 (BamCacheRecord) _record | |
PT (EggData) _data | |
PT (PandaNode) _root | |
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 67 of file eggLoader.h.
EggLoader::EggLoader | ( | ) |
Definition at line 139 of file eggLoader.cxx.
EggLoader::EggLoader | ( | const EggData * | data | ) |
The EggLoader constructor makes a copy of the EggData passed in.
Definition at line 152 of file eggLoader.cxx.
void EggLoader::build_graph | ( | ) |
Definition at line 165 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 301 of file eggLoader.cxx.
References EggRenderState::add_attrib(), PandaNode::add_stashed(), 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 226 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 286 of file eggLoader.cxx.
References AnimInterface::loop().
|
friend |
Definition at line 268 of file eggLoader.h.
|
friend |
Definition at line 269 of file eggLoader.h.
bool EggLoader::_dynamic_override |
Definition at line 265 of file eggLoader.h.
CharacterMaker* EggLoader::_dynamic_override_char_maker |
Definition at line 264 of file eggLoader.h.
bool EggLoader::_error |
Definition at line 262 of file eggLoader.h.