18 #include "pandatoolbase.h" 21 #include "dxfLayerMap.h" 22 #include "dxfVertex.h" 28 static const int DXF_max_line = 256;
29 static const int DXF_num_colors = 256;
45 void process(istream *in,
bool owns_in);
64 virtual DXFLayer *new_layer(
const string &name) {
100 PF_continuous_linetype = 0x80,
109 static Color _colors[DXF_num_colors];
113 static int find_color(
double r,
double g,
double b);
146 bool _vertices_follow;
158 void change_state(State new_state);
159 void change_section(Section new_section);
160 void change_layer(
const string &layer_name);
161 void change_entity(Entity new_entity);
165 void state_section();
170 ostream &operator << (ostream &out,
const DXFFile::State &state);
171 ostream &operator << (ostream &out,
const DXFFile::Section §ion);
172 ostream &operator << (ostream &out,
const DXFFile::Entity &entity);
This is a 4-by-4 transform matrix.
This represents a "layer" as read from the DXF file.
virtual void end_file()
A hook for user code, if desired.
virtual void begin_section()
A hook for user code, if desired.
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.
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
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...