Panda3D
cLwoPoints.h
1 // Filename: cLwoPoints.h
2 // Created by: drose (25Apr01)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef CLWOPOINTS_H
16 #define CLWOPOINTS_H
17 
18 #include "pandatoolbase.h"
19 
20 #include "lwoPoints.h"
21 #include "eggVertexPool.h"
22 #include "pointerTo.h"
23 
24 #include "pmap.h"
25 
26 class LwoToEggConverter;
27 class LwoVertexMap;
28 class CLwoLayer;
29 
30 ////////////////////////////////////////////////////////////////////
31 // Class : CLwoPoints
32 // Description : This class is a wrapper around LwoPoints and stores
33 // additional information useful during the
34 // conversion-to-egg process.
35 ////////////////////////////////////////////////////////////////////
36 class CLwoPoints {
37 public:
38  INLINE CLwoPoints(LwoToEggConverter *converter, const LwoPoints *points,
39  CLwoLayer *layer);
40 
41  void add_vmap(const LwoVertexMap *lwo_vmap);
42  bool get_uv(const string &uv_name, int n, LPoint2 &uv) const;
43 
44  void make_egg();
45  void connect_egg();
46 
47  LwoToEggConverter *_converter;
48  CPT(LwoPoints) _points;
49  CLwoLayer *_layer;
50  PT(EggVertexPool) _egg_vpool;
51 
52  // A number of vertex maps of different types may be associated, but
53  // we only care about some of the types here.
55  VMap _txuv;
56  VMap _pick;
57 };
58 
59 #include "cLwoPoints.I"
60 
61 #endif
62 
63 
void make_egg()
Creates the egg structures associated with this Lightwave object.
Definition: cLwoPoints.cxx:92
void add_vmap(const LwoVertexMap *lwo_vmap)
Associates the indicated VertexMap with the points set.
Definition: cLwoPoints.cxx:31
This class is a wrapper around LwoLayer and stores additional information useful during the conversio...
Definition: cLwoLayer.h:32
A mapping of floating-point values per integer index.
Definition: lwoVertexMap.h:30
void connect_egg()
Connects all the egg structures together.
Definition: cLwoPoints.cxx:105
This class supervises the construction of an EggData structure from the data represented by the LwoHe...
bool get_uv(const string &uv_name, int n, LPoint2 &uv) const
Returns true if there is a UV of the indicated name associated with the given vertex, false otherwise.
Definition: cLwoPoints.cxx:62
This class is a wrapper around LwoPoints and stores additional information useful during the conversi...
Definition: cLwoPoints.h:36
This is a two-component point in space.
Definition: lpoint2.h:92
A collection of vertices.
Definition: eggVertexPool.h:46
An array of points that will be referenced by later chunks.
Definition: lwoPoints.h:29