Panda3D
Loading...
Searching...
No Matches
Public Member Functions | List of all members
DXFToEggLayer Class Reference

The specialization of DXFLayer used by DXFToEggConverter. More...

#include "dxfToEggLayer.h"

Inheritance diagram for DXFToEggLayer:
DXFLayer Namable MemoryBase

Public Member Functions

 DXFToEggLayer (const std::string &name, EggGroupNode *parent)
 
void add_line (const DXFToEggConverter *entity)
 Similar to add_polygon(), but adds a set of point lights instead.
 
void add_polygon (const DXFToEggConverter *entity)
 Given that done_entity() has just been called and that the current entity represents a polygon, adds the corresponding polygon to the layer's EggGroup and vertex pool.
 
EggVertexadd_vertex (const DXFVertex &vertex)
 Adds a unique vertex to the layer's vertex pool and returns it.
 
 PT (EggGroup) _group
 
 PT (EggVertexPool) _vpool
 
- Public Member Functions inherited from DXFLayer
 DXFLayer (const std::string &name)
 
- Public Member Functions inherited from Namable
 Namable (const std::string &initial_name="")
 
void clear_name ()
 Resets the Namable's name to empty.
 
const std::string & get_name () const
 
bool has_name () const
 Returns true if the Namable has a nonempty name set, false if the name is empty.
 
void output (std::ostream &out) const
 Outputs the Namable.
 
void set_name (const std::string &name)
 
- Public Member Functions inherited from MemoryBase
void operator delete (void *, void *)
 
void operator delete (void *ptr)
 
void operator delete[] (void *, void *)
 
void operator delete[] (void *ptr)
 
void * operator new (size_t size)
 
void * operator new (size_t size, void *ptr)
 
void * operator new[] (size_t size)
 
void * operator new[] (size_t size, void *ptr)
 

Additional Inherited Members

- Static Public Member Functions inherited from Namable
static TypeHandle get_class_type ()
 
static void init_type ()
 
- Public Attributes inherited from Namable
 get_name
 
 set_name
 

Detailed Description

The specialization of DXFLayer used by DXFToEggConverter.

It contains a pointer to an EggGroup and a vertex pool; these are used to build up polygons grouped by layer in the egg file as each polygon is read from the DXF file.

Definition at line 35 of file dxfToEggLayer.h.

Constructor & Destructor Documentation

◆ DXFToEggLayer()

DXFToEggLayer::DXFToEggLayer ( const std::string & name,
EggGroupNode * parent )

Definition at line 28 of file dxfToEggLayer.cxx.

Member Function Documentation

◆ add_line()

void DXFToEggLayer::add_line ( const DXFToEggConverter * entity)

Similar to add_polygon(), but adds a set of point lights instead.

Definition at line 71 of file dxfToEggLayer.cxx.

References add_vertex(), EggPrimitive::add_vertex(), and DXFFile::get_color().

◆ add_polygon()

void DXFToEggLayer::add_polygon ( const DXFToEggConverter * entity)

Given that done_entity() has just been called and that the current entity represents a polygon, adds the corresponding polygon to the layer's EggGroup and vertex pool.

Definition at line 42 of file dxfToEggLayer.cxx.

References add_vertex(), EggPrimitive::add_vertex(), EggPolygon::cleanup(), and DXFFile::get_color().

◆ add_vertex()

EggVertex * DXFToEggLayer::add_vertex ( const DXFVertex & vert)

Adds a unique vertex to the layer's vertex pool and returns it.

If the vertex was already defined previously, returns the original definition. This is designed to share the common vertices within a layer.

Definition at line 93 of file dxfToEggLayer.cxx.

References EggVertex::set_pos().

Referenced by add_line(), and add_polygon().


The documentation for this class was generated from the following files: