Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

pandatool/src/bam/bamToEgg.h

Go to the documentation of this file.
00001 // Filename: bamToEgg.h
00002 // Created by:  drose (25Jun01)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008 //
00009 // All use of this software is subject to the terms of the Panda 3d
00010 // Software license.  You should have received a copy of this license
00011 // along with this source code; you will also find a current copy of
00012 // the license at http://www.panda3d.org/license.txt .
00013 //
00014 // To contact the maintainers of this program write to
00015 // panda3d@yahoogroups.com .
00016 //
00017 ////////////////////////////////////////////////////////////////////
00018 
00019 #ifndef BAMTOEGG_H
00020 #define BAMTOEGG_H
00021 
00022 #include "pandatoolbase.h"
00023 
00024 #include "somethingToEgg.h"
00025 #include "luse.h"
00026 #include "eggTextureCollection.h"
00027 #include "eggMaterialCollection.h"
00028 
00029 class WorkingNodePath;
00030 class EggGroup;
00031 class EggGroupNode;
00032 class EggVertexPool;
00033 class EggTexture;
00034 class LODNode;
00035 class GeomNode;
00036 class GeomTri;
00037 class PandaNode;
00038 class RenderState;
00039 class Texture;
00040 
00041 ////////////////////////////////////////////////////////////////////
00042 //       Class : BamToEgg
00043 // Description : This program reads a bam file, for instance as
00044 //               written out from a real-time interaction session, and
00045 //               generates a corresponding egg file.
00046 ////////////////////////////////////////////////////////////////////
00047 class BamToEgg : public SomethingToEgg {
00048 public:
00049   BamToEgg();
00050 
00051   void run();
00052 
00053 private:
00054   void convert_node(const WorkingNodePath &node_path, EggGroupNode *egg_parent,
00055                     bool has_decal);
00056   void convert_lod_node(LODNode *node, const WorkingNodePath &node_path,
00057                         EggGroupNode *egg_parent, bool has_decal);
00058   void convert_geom_node(GeomNode *node, const WorkingNodePath &node_path, 
00059                          EggGroupNode *egg_parent, bool has_decal);
00060   void convert_geom_tri(GeomTri *geom, const RenderState *net_state,
00061                         const LMatrix4f &net_mat, EggGroupNode *egg_parent);
00062   void recurse_nodes(const WorkingNodePath &node_path, EggGroupNode *egg_parent,
00063                      bool has_decal);
00064   bool apply_node_properties(EggGroup *egg_group, PandaNode *node);
00065 
00066   EggTexture *get_egg_texture(Texture *tex);
00067 
00068   EggVertexPool *_vpool;
00069   EggTextureCollection _textures;
00070   EggMaterialCollection _materials;
00071 };
00072 
00073 #endif

Generated on Fri May 2 03:16:51 2003 for Panda-Tool by doxygen1.3