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

panda/src/egg/eggUtilities.h

Go to the documentation of this file.
00001 // Filename: eggUtilities.h
00002 // Created by:  drose (28Jan99)
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 EGGUTILITIES_H
00020 #define EGGUTILITIES_H
00021 
00022 ////////////////////////////////////////////////////////////////////
00023 //
00024 // eggUtilities.h
00025 //
00026 // Handy functions that operate on egg structures, but don't
00027 // necessarily belong in any one class.
00028 //
00029 ////////////////////////////////////////////////////////////////////
00030 
00031 #include <pandabase.h>
00032 
00033 #include "eggTexture.h"
00034 #include "pt_EggTexture.h"
00035 
00036 #include <filename.h>
00037 #include <pointerTo.h>
00038 
00039 #include "pset.h"
00040 #include "pmap.h"
00041 
00042 class EggNode;
00043 class EggVertex;
00044 
00045 typedef pset< PT_EggTexture > EggTextures;
00046 typedef pmap<Filename, EggTextures> EggTextureFilenames;
00047 
00048 
00049 ////////////////////////////////////////////////////////////////////
00050 //     Function: get_textures_by_filename
00051 //  Description: Extracts from the egg subgraph beginning at the
00052 //               indicated node a set of all the texture objects
00053 //               referenced, grouped together by filename.  Texture
00054 //               objects that share a common filename (but possibly
00055 //               differ in other properties) are returned together in
00056 //               the same element of the map.
00057 ////////////////////////////////////////////////////////////////////
00058 void
00059 get_textures_by_filename(const EggNode *node, EggTextureFilenames &result);
00060 
00061 
00062 ////////////////////////////////////////////////////////////////////
00063 //     Function: split_vertex
00064 //  Description: Splits a vertex into two or more vertices, each an
00065 //               exact copy of the original and in the same vertex
00066 //               pool.  See the more detailed comments in
00067 //               eggUtilities.I.
00068 ////////////////////////////////////////////////////////////////////
00069 template<class FunctionObject>
00070 void
00071 split_vertex(EggVertex *vert, const FunctionObject &sequence);
00072 
00073 
00074 #include "eggUtilities.I"
00075 
00076 #endif

Generated on Fri May 2 00:38:02 2003 for Panda by doxygen1.3