Panda3D
dxfToEggLayer.h
1 // Filename: dxfToEggLayer.h
2 // Created by: drose (04May04)
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 DXFTOEGGLAYER_H
16 #define DXFTOEGGLAYER_H
17 
18 #include "pandatoolbase.h"
19 
20 #include "dxfLayer.h"
21 #include "eggVertexPool.h"
22 #include "eggGroup.h"
23 #include "pointerTo.h"
24 
25 class EggGroupNode;
26 class EggVertex;
27 class DXFVertex;
28 class DXFToEggConverter;
29 
30 ////////////////////////////////////////////////////////////////////
31 // Class : DXFToEggLayer
32 // Description : The specialization of DXFLayer used by
33 // DXFToEggConverter. It contains a pointer to an
34 // EggGroup and a vertex pool; these are used to build
35 // up polygons grouped by layer in the egg file as each
36 // polygon is read from the DXF file.
37 ////////////////////////////////////////////////////////////////////
38 class DXFToEggLayer : public DXFLayer {
39 public:
40  DXFToEggLayer(const string &name, EggGroupNode *parent);
41 
42  void add_polygon(const DXFToEggConverter *entity);
43  void add_line(const DXFToEggConverter *entity);
44  EggVertex *add_vertex(const DXFVertex &vertex);
45 
46  PT(EggVertexPool) _vpool;
47  PT(EggGroup) _group;
48 };
49 
50 
51 #endif
void add_line(const DXFToEggConverter *entity)
Similar to add_polygon(), but adds a set of point lights instead.
This represents a "layer" as read from the DXF file.
Definition: dxfLayer.h:31
A base class for nodes in the hierarchy that are not leaf nodes.
Definition: eggGroupNode.h:51
EggVertex * add_vertex(const DXFVertex &vertex)
Adds a unique vertex to the layer's vertex pool and returns it.
void add_polygon(const DXFToEggConverter *entity)
Given that done_entity() has just been called and that the current entity represents a polygon...
The main glue of the egg hierarchy, this corresponds to the <Group>, <Instance>, and <Joint> type nod...
Definition: eggGroup.h:36
The specialization of DXFLayer used by DXFToEggConverter.
Definition: dxfToEggLayer.h:38
Any one-, two-, three-, or four-component vertex, possibly with attributes such as a normal...
Definition: eggVertex.h:41
Stored within DXFFile, this is the basic Vertex data of a DXF file.
Definition: dxfVertex.h:30
A collection of vertices.
Definition: eggVertexPool.h:46
This class supervises the construction of an EggData structure from a DXF file.