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