27 static const int DXF_max_line = 256;
28 static const int DXF_num_colors = 256;
41 void process(std::istream *in,
bool owns_in);
60 virtual DXFLayer *new_layer(
const std::string &name) {
96 PF_continuous_linetype = 0x80,
104 static Color _colors[DXF_num_colors];
108 static int find_color(
double r,
double g,
double b);
126 LPoint3d _p, _q, _r, _s;
140 bool _vertices_follow;
152 void change_state(State new_state);
153 void change_section(Section new_section);
154 void change_layer(
const std::string &layer_name);
155 void change_entity(Entity new_entity);
159 void state_section();
164 std::ostream &operator << (std::ostream &out,
const DXFFile::State &state);
165 std::ostream &operator << (std::ostream &out,
const DXFFile::Section §ion);
166 std::ostream &operator << (std::ostream &out,
const DXFFile::Entity &entity);
This represents a "layer" as read from the DXF file.
virtual void end_file()
A hook for user code, if desired.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual void begin_section()
A hook for user code, if desired.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A generic DXF-reading class.
virtual void error()
A hook for user code, if desired.
The name of a file, such as a texture file or an Egg file.
virtual void begin_file()
A hook for user code, if desired.
virtual void done_entity()
This is the primary hook for user code.
This class is intended to be the base class of all objects in Panda that might be allocated and delet...
virtual void end_section()
A hook for user code, if desired.
A map of string (layer name) to DXFLayer: that is, the layers of a file ordered by name.
void ocs_2_wcs()
Assuming the current entity is a planar-based entity, for instance, a 2-d polygon (as opposed to a 3-...
static int find_color(double r, double g, double b)
Returns the index of the closest matching AutoCAD color to the indicated r, g, b.
virtual void done_vertex()
A hook for user code, if desired.
void process(Filename filename)
Opens the indicated filename and reads it as a DXF file.
const Color & get_color() const
This is a convenience function to return the r,g,b color of the current entity (at the time of done_e...