Panda3D
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Friends | List of all members
EggLoader Class Reference

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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ EggLoader() [1/2]

EggLoader::EggLoader ( )

Definition at line 139 of file eggLoader.cxx.

◆ EggLoader() [2/2]

EggLoader::EggLoader ( const EggData * data)

The EggLoader constructor makes a copy of the EggData passed in.

Definition at line 152 of file eggLoader.cxx.

Member Function Documentation

◆ build_graph()

void EggLoader::build_graph ( )

Definition at line 165 of file eggLoader.cxx.

◆ make_polyset()

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

◆ reparent_decals()

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

◆ start_sequences()

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

Friends And Related Symbol Documentation

◆ EggRenderState

friend class EggRenderState
friend

Definition at line 268 of file eggLoader.h.

◆ PandaNode

friend class PandaNode
friend

Definition at line 269 of file eggLoader.h.

Member Data Documentation

◆ _dynamic_override

bool EggLoader::_dynamic_override

Definition at line 265 of file eggLoader.h.

◆ _dynamic_override_char_maker

CharacterMaker* EggLoader::_dynamic_override_char_maker

Definition at line 264 of file eggLoader.h.

◆ _error

bool EggLoader::_error

Definition at line 262 of file eggLoader.h.


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