Panda3D
Loading...
Searching...
No Matches
eggToDXFLayer.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 eggToDXFLayer.h
10 * @author drose
11 * @date 2004-05-04
12 */
13
14#ifndef EGGTODXFLAYER_H
15#define EGGTODXFLAYER_H
16
17#include "pandatoolbase.h"
18#include "pmap.h"
19#include "pvector.h"
20#include "luse.h"
21
22class EggToDXF;
23class EggPolygon;
24class EggGroupNode;
25
26/**
27 * A single layer in the DXF file to be written by EggToDXF.
28 */
30public:
31 EggToDXFLayer(EggToDXF *egg2dxf, EggGroupNode *group);
32 EggToDXFLayer(const EggToDXFLayer &copy);
33 void operator = (const EggToDXFLayer &copy);
34
35 void add_color(const LColor &color);
37
38 void write_layer(std::ostream &out);
39 void write_polyline(EggPolygon *poly, std::ostream &out);
40 void write_3d_face(EggPolygon *poly, std::ostream &out);
41 void write_entities(std::ostream &out);
42
43private:
44 int get_autocad_color(const LColor &color);
45
47 ColorCounts _color_counts;
48
49 EggToDXF *_egg2dxf;
50 EggGroupNode *_group;
51 int _layer_color;
52};
53
55
56#endif
A base class for nodes in the hierarchy that are not leaf nodes.
A single polygon.
Definition eggPolygon.h:24
A single layer in the DXF file to be written by EggToDXF.
void write_polyline(EggPolygon *poly, std::ostream &out)
Writes a polygon as a POLYLINE entity.
void write_entities(std::ostream &out)
Writes out the "entities", e.g.
void write_3d_face(EggPolygon *poly, std::ostream &out)
Writes a polygon as a 3DFACE entity.
void write_layer(std::ostream &out)
Writes the layer definition into the table at the beginning of the DXF file.
void add_color(const LColor &color)
Records that one polygon is defined using the indicated color.
void choose_overall_color()
After all polygons have been accounted for, chooses the polygon color that occurred most often as the...
A program to read an egg file and write a DXF file.
Definition eggToDXF.h:27
This is our own Panda specialization on the default STL map.
Definition pmap.h:49
This is our own Panda specialization on the default STL vector.
Definition pvector.h:42
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.