Panda3D
Loading...
Searching...
No Matches
cLwoPolygons.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 cLwoPolygons.h
10 * @author drose
11 * @date 2001-04-25
12 */
13
14#ifndef CLWOPOLYGONS_H
15#define CLWOPOLYGONS_H
16
17#include "pandatoolbase.h"
18
19#include "lwoPolygons.h"
20#include "eggGroup.h"
21#include "pointerTo.h"
22
23#include "pmap.h"
24
26class CLwoPoints;
27class CLwoSurface;
28class LwoTags;
29class LwoPolygonTags;
31
32/**
33 * This class is a wrapper around LwoPolygons and stores additional
34 * information useful during the conversion-to-egg process.
35 */
37public:
38 INLINE CLwoPolygons(LwoToEggConverter *converter,
39 const LwoPolygons *polygons,
40 CLwoPoints *points);
41
42 void add_ptags(const LwoPolygonTags *lwo_ptags, const LwoTags *tags);
43 void add_vmad(const LwoDiscontinuousVertexMap *lwo_vmad);
44
45 CLwoSurface *get_surface(int polygon_index) const;
46 bool get_uv(const std::string &uv_name, int pi, int vi, LPoint2 &uv) const;
47
48 void make_egg();
49 void connect_egg();
50
51 LwoToEggConverter *_converter;
52 CPT(LwoPolygons) _polygons;
53 CLwoPoints *_points;
54 PT(EggGroup) _egg_group;
55
56 const LwoTags *_tags;
58 PTags _ptags;
59
60 const LwoPolygonTags *_surf_ptags;
61
62 // There might be named maps associated with the polygons to bring a per-
63 // polygon mapping to the UV's.
65 VMad _txuv;
66
67private:
68 void make_faces();
69};
70
71#include "cLwoPolygons.I"
72
73#endif
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This class is a wrapper around LwoPoints and stores additional information useful during the conversi...
Definition cLwoPoints.h:33
This class is a wrapper around LwoPolygons and stores additional information useful during the conver...
void make_egg()
Creates the egg structures associated with this Lightwave object.
bool get_uv(const std::string &uv_name, int pi, int vi, LPoint2 &uv) const
Returns true if there is a UV of the indicated name associated with the given vertex of the indicated...
void connect_egg()
Connects all the egg structures together.
void add_vmad(const LwoDiscontinuousVertexMap *lwo_vmad)
Associates the indicated DiscontinousVertexMap with the polygons.
CLwoSurface * get_surface(int polygon_index) const
Returns the surface associated with the given polygon, or NULL if no surface is associated.
void add_ptags(const LwoPolygonTags *lwo_ptags, const LwoTags *tags)
Associates the indicated PolygonTags and Tags with the polygons in this chunk.
This class is a wrapper around LwoSurface and stores additional information useful during the convers...
Definition cLwoSurface.h:39
The main glue of the egg hierarchy, this corresponds to the <Group>, <Instance>, and <Joint> type nod...
Definition eggGroup.h:34
A mapping of floating-point values per integer index.
An association of polygons defined in the most recent LwoPolygons chunk to tag ids defined in the mos...
An array of polygons that will be referenced by later chunks.
Definition lwoPolygons.h:29
An array of tag strings that will be referenced by later chunks.
Definition lwoTags.h:31
This class supervises the construction of an EggData structure from the data represented by the LwoHe...
This is our own Panda specialization on the default STL map.
Definition pmap.h:49
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.