bring bam2egg to new scene graph

This commit is contained in:
David Rose 2003-04-04 18:52:43 +00:00
parent fd2c841ca9
commit e44199d552
3 changed files with 616 additions and 521 deletions

View File

@ -36,14 +36,13 @@
#end bin_target
#if // Temporarily broken until we can bring it into the new scene graph.
#begin bin_target
#define TARGET bam2egg
#define LOCAL_LIBS \
converter eggbase progbase
#define OTHER_LIBS \
egg:c pandaegg:m \
pgraph:cparametrics:c collide:c chan:c char:c \
pgraph:c parametrics:c collide:c chan:c char:c \
gobj:c pnmimagetypes:c pstatclient:c \
putil:c linmath:c event:c express:c panda:m pandaexpress:m \
interrogatedb:c dtoolutil:c dtoolbase:c dconfig:c dtoolconfig:m dtool:m pystub
@ -55,4 +54,3 @@
bamToEgg.cxx bamToEgg.h
#end bin_target
#endif // Temporarily broken until we can bring it into the new scene graph.

File diff suppressed because it is too large Load Diff

View File

@ -26,20 +26,23 @@
#include "eggTextureCollection.h"
#include "eggMaterialCollection.h"
class Node;
class WorkingNodePath;
class EggGroup;
class EggGroupNode;
class EggVertexPool;
class EggTexture;
class LODNode;
class GeomNode;
class ArcChain;
class GeomTri;
class EggVertexPool;
class EggVertex;
class EggPrimitive;
class EggGroup;
class PandaNode;
class RenderState;
class Texture;
////////////////////////////////////////////////////////////////////
// Class : BamToEgg
// Description :
// Description : This program reads a bam file, for instance as
// written out from a real-time interaction session, and
// generates a corresponding egg file.
////////////////////////////////////////////////////////////////////
class BamToEgg : public SomethingToEgg {
public:
@ -48,6 +51,22 @@ public:
void run();
private:
void convert_node(const WorkingNodePath &node_path, EggGroupNode *egg_parent,
bool has_decal);
void convert_lod_node(LODNode *node, const WorkingNodePath &node_path,
EggGroupNode *egg_parent, bool has_decal);
void convert_geom_node(GeomNode *node, const WorkingNodePath &node_path,
EggGroupNode *egg_parent, bool has_decal);
void convert_geom_tri(GeomTri *geom, const RenderState *net_state,
const LMatrix4f &net_mat, EggGroupNode *egg_parent);
void recurse_nodes(const WorkingNodePath &node_path, EggGroupNode *egg_parent,
bool has_decal);
bool apply_node_properties(EggGroup *egg_group, PandaNode *node);
EggTexture *get_egg_texture(Texture *tex);
/*
class GeomState {
public:
GeomState();
@ -78,6 +97,7 @@ private:
void apply_texture(EggPrimitive *egg_prim, Texture *tex);
bool apply_arc_properties(EggGroup *egg_group, ArcChain &chain);
*/
EggVertexPool *_vpool;
EggTextureCollection _textures;