Panda3D

eggUtilities.h
Go to the documentation of this file.
1 /**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file eggUtilities.h
10 * @author drose
11 * @date 1999-01-28
12 */
13
14 #ifndef EGGUTILITIES_H
15 #define EGGUTILITIES_H
16
17 // eggUtilities.h Handy functions that operate on egg structures, but don't
18 // necessarily belong in any one class.
19
20 #include "pandabase.h"
21
22 #include "eggTexture.h"
23 #include "pt_EggTexture.h"
24
25 #include "filename.h"
26 #include "pointerTo.h"
27
28 #include "pset.h"
29 #include "pmap.h"
30
31 class EggNode;
32 class EggVertex;
33
34 typedef pset< PT_EggTexture > EggTextures;
35 typedef pmap<Filename, EggTextures> EggTextureFilenames;
36
37
38 /**
39 * Extracts from the egg subgraph beginning at the indicated node a set of all
40 * the texture objects referenced, grouped together by filename. Texture
41 * objects that share a common filename (but possibly differ in other
42 * properties) are returned together in the same element of the map.
43 */
44 void
45 get_textures_by_filename(const EggNode *node, EggTextureFilenames &result);
46
47
48 /**
49 * Splits a vertex into two or more vertices, each an exact copy of the
50 * original and in the same vertex pool. See the more detailed comments in
51 * eggUtilities.I.
52 */
53 template<class FunctionObject>
54 void
55 split_vertex(EggVertex *vert, const FunctionObject &sequence);
56
57
58 #include "eggUtilities.I"
59
60 #endif
EggNode
A base class for things that may be directly added into the egg hierarchy.
Definition: eggNode.h:36
EggVertex
Any one-, two-, three-, or four-component vertex, possibly with attributes such as a normal.
Definition: eggVertex.h:39
pmap
This is our own Panda specialization on the default STL map.
Definition: pmap.h:49
pset
This is our own Panda specialization on the default STL set.
Definition: pset.h:49
eggTexture.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
eggUtilities.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
split_vertex
void split_vertex(EggVertex *vert, const FunctionObject &sequence)
Splits a vertex into two or more vertices, each an exact copy of the original and in the same vertex ...
Definition: eggUtilities.I:43
get_textures_by_filename
void get_textures_by_filename(const EggNode *node, EggTextureFilenames &result)
Extracts from the egg subgraph beginning at the indicated node a set of all the texture objects refer...
Definition: eggUtilities.cxx:28
filename.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pmap.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pointerTo.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pset.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pt_EggTexture.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.