Panda3D

eggUtilities.h

00001 // Filename: eggUtilities.h
00002 // Created by:  drose (28Jan99)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #ifndef EGGUTILITIES_H
00016 #define EGGUTILITIES_H
00017 
00018 ////////////////////////////////////////////////////////////////////
00019 //
00020 // eggUtilities.h
00021 //
00022 // Handy functions that operate on egg structures, but don't
00023 // necessarily belong in any one class.
00024 //
00025 ////////////////////////////////////////////////////////////////////
00026 
00027 #include "pandabase.h"
00028 
00029 #include "eggTexture.h"
00030 #include "pt_EggTexture.h"
00031 
00032 #include "filename.h"
00033 #include "pointerTo.h"
00034 
00035 #include "pset.h"
00036 #include "pmap.h"
00037 
00038 class EggNode;
00039 class EggVertex;
00040 
00041 typedef pset< PT_EggTexture > EggTextures;
00042 typedef pmap<Filename, EggTextures> EggTextureFilenames;
00043 
00044 
00045 ////////////////////////////////////////////////////////////////////
00046 //     Function: get_textures_by_filename
00047 //  Description: Extracts from the egg subgraph beginning at the
00048 //               indicated node a set of all the texture objects
00049 //               referenced, grouped together by filename.  Texture
00050 //               objects that share a common filename (but possibly
00051 //               differ in other properties) are returned together in
00052 //               the same element of the map.
00053 ////////////////////////////////////////////////////////////////////
00054 void
00055 get_textures_by_filename(const EggNode *node, EggTextureFilenames &result);
00056 
00057 
00058 ////////////////////////////////////////////////////////////////////
00059 //     Function: split_vertex
00060 //  Description: Splits a vertex into two or more vertices, each an
00061 //               exact copy of the original and in the same vertex
00062 //               pool.  See the more detailed comments in
00063 //               eggUtilities.I.
00064 ////////////////////////////////////////////////////////////////////
00065 template<class FunctionObject>
00066 void
00067 split_vertex(EggVertex *vert, const FunctionObject &sequence);
00068 
00069 
00070 #include "eggUtilities.I"
00071 
00072 #endif
 All Classes Functions Variables Enumerations