46 return new DXFToEggConverter(*
this);
83 if (_egg_data->get_coordinate_system() == CS_default) {
84 _egg_data->set_coordinate_system(CS_zup_right);
95new_layer(
const std::string &name) {
102void DXFToEggConverter::
104 if (_entity == EN_polyline) {
108 if ((_flags & PF_3d) == 0) {
113 if (_flags & PF_closed) {
115 nassertv(_layer!=
nullptr);
116 ((DXFToEggLayer *)_layer)->add_polygon(
this);
119 nassertv(_layer!=
nullptr);
120 ((DXFToEggLayer *)_layer)->add_line(
this);
123 }
else if (_entity == EN_3dface) {
128 _verts.push_back(DXFVertex(_s));
129 _verts.push_back(DXFVertex(_r));
130 _verts.push_back(DXFVertex(_q));
131 _verts.push_back(DXFVertex(_p));
133 nassertv(_layer!=
nullptr);
134 ((DXFToEggLayer *)_layer)->add_polygon(
this);
142void DXFToEggConverter::
void process(Filename filename)
Opens the indicated filename and reads it as a DXF file.
void ocs_2_wcs()
Assuming the current entity is a planar-based entity, for instance, a 2-d polygon (as opposed to a 3-...
This represents a "layer" as read from the DXF file.
This class supervises the construction of an EggData structure from a DXF file.
virtual std::string get_name() const
Returns the English name of the file type this converter supports.
virtual bool supports_compressed() const
Returns true if this file type can transparently load compressed files (with a .pz extension),...
virtual std::string get_extension() const
Returns the common extension of the file type this converter supports.
virtual SomethingToEggConverter * make_copy()
Allocates and returns a new copy of the converter.
virtual bool convert_file(const Filename &filename)
Handles the reading of the input file and converting it to egg.
The specialization of DXFLayer used by DXFToEggConverter.
The name of a file, such as a texture file or an Egg file.
This is a base class for a family of converter classes that manage a conversion from some file type t...
bool had_error() const
Returns true if an error was detected during the conversion process (unless _allow_errors is true),...
EggData * get_egg_data()
Returns the EggData structure.
void clear_error()
Resets the error flag to the no-error state.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.