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

A single layer in the DXF file to be written by EggToDXF. More...

#include "eggToDXFLayer.h"

Public Member Functions

 EggToDXFLayer (const EggToDXFLayer &copy)
 
 EggToDXFLayer (EggToDXF *egg2dxf, EggGroupNode *group)
 
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 layer color.
 
void operator= (const EggToDXFLayer &copy)
 
void write_3d_face (EggPolygon *poly, std::ostream &out)
 Writes a polygon as a 3DFACE entity.
 
void write_entities (std::ostream &out)
 Writes out the "entities", e.g.
 
void write_layer (std::ostream &out)
 Writes the layer definition into the table at the beginning of the DXF file.
 
void write_polyline (EggPolygon *poly, std::ostream &out)
 Writes a polygon as a POLYLINE entity.
 

Detailed Description

A single layer in the DXF file to be written by EggToDXF.

Definition at line 29 of file eggToDXFLayer.h.

Constructor & Destructor Documentation

◆ EggToDXFLayer() [1/2]

EggToDXFLayer::EggToDXFLayer ( EggToDXF * egg2dxf,
EggGroupNode * group )

Definition at line 27 of file eggToDXFLayer.cxx.

◆ EggToDXFLayer() [2/2]

EggToDXFLayer::EggToDXFLayer ( const EggToDXFLayer & copy)

Definition at line 37 of file eggToDXFLayer.cxx.

Member Function Documentation

◆ add_color()

void EggToDXFLayer::add_color ( const LColor & color)

Records that one polygon is defined using the indicated color.

This will get accumulated; the color used by the majority of polygons will become the layer color.

Definition at line 63 of file eggToDXFLayer.cxx.

◆ choose_overall_color()

void EggToDXFLayer::choose_overall_color ( )

After all polygons have been accounted for, chooses the polygon color that occurred most often as the layer color.

Definition at line 83 of file eggToDXFLayer.cxx.

◆ operator=()

void EggToDXFLayer::operator= ( const EggToDXFLayer & copy)

Definition at line 49 of file eggToDXFLayer.cxx.

◆ write_3d_face()

void EggToDXFLayer::write_3d_face ( EggPolygon * poly,
std::ostream & out )

Writes a polygon as a 3DFACE entity.

Definition at line 140 of file eggToDXFLayer.cxx.

References EggVertex::get_pos3(), EggNode::get_vertex_frame(), TypedObject::is_of_type(), EggPolygon::triangulate_into(), and write_3d_face().

Referenced by write_3d_face(), and write_entities().

◆ write_entities()

void EggToDXFLayer::write_entities ( std::ostream & out)

Writes out the "entities", e.g.

polygons, defined for the current layer.

Definition at line 185 of file eggToDXFLayer.cxx.

References TypedObject::is_of_type(), write_3d_face(), and write_polyline().

◆ write_layer()

void EggToDXFLayer::write_layer ( std::ostream & out)

Writes the layer definition into the table at the beginning of the DXF file.

This does not write the actual geometry; that gets done later by write_entities().

Definition at line 103 of file eggToDXFLayer.cxx.

◆ write_polyline()

void EggToDXFLayer::write_polyline ( EggPolygon * poly,
std::ostream & out )

Writes a polygon as a POLYLINE entity.

Definition at line 115 of file eggToDXFLayer.cxx.

References EggAttributes::get_color(), EggVertex::get_pos3(), and EggNode::get_vertex_frame().

Referenced by write_entities().


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