| http://www.coin3d.org/ http://www.kongsberg.com/kogt/

Public Member Functions | Public Attributes | Friends | List of all members
dxfLayerData Class Reference

The dxfLayerData class handles all geometry for a given color index. DXF geometry is grouped into different colors, as this is a normal way to group geometry data, and especially vrml data. More...

`#include <layerdata.h>`

## Public Member Functions

| dxfLayerData (const int colidx)
| ~dxfLayerData ()
void | setFillmode (const bool fillmode)
void | addLine (const dimeVec3f &v0, const dimeVec3f &v1, const dimeMatrix *const matrix=NULL)
void | addPoint (const dimeVec3f &v, const dimeMatrix *const matrix=NULL)
void | addTriangle (const dimeVec3f &v0, const dimeVec3f &v1, const dimeVec3f &v2, const dimeMatrix *const matrix=NULL)
void | addQuad (const dimeVec3f &v0, const dimeVec3f &v1, const dimeVec3f &v2, const dimeVec3f &v3, const dimeMatrix *const matrix=NULL)
void | writeWrl (FILE *fp, int indent, const bool vrml1, const bool only2d)

## Public Attributes

bool | fillmode
int | colidx
dimeBSPTree | facebsp
dimeArray< int > | faceindices
dimeBSPTree | linebsp
dimeArray< int > | lineindices
dimeArray< dimeVec3f > | points

## Friends

class | dime2So
class | dime2Profit

## Detailed Description

The dxfLayerData class handles all geometry for a given color index. DXF geometry is grouped into different colors, as this is a normal way to group geometry data, and especially vrml data.

The geometry can be either points, lines or polygons.

## Constructor & Destructor Documentation

## ◆ dxfLayerData()

dxfLayerData::dxfLayerData | ( | const int | colidx | ) |

Constructor

## ◆ ~dxfLayerData()

dxfLayerData::~dxfLayerData | ( |  | ) |

Destructor.

## Member Function Documentation

## ◆ addLine()

void dxfLayerData::addLine | ( | const dimeVec3f & | v0,
|  | const dimeVec3f & | v1,
|  | const dimeMatrix *const | matrix = `NULL`
| ) |  |

Adds a line to this layer's geometry. If matrix != NULL, the points will be transformed by this matrix before they are added.

References dimeBSPTree::addPoint(), and dimeArray< T >::count().

Referenced by addQuad(), addTriangle(), and dxfLineSegment::convert().

## ◆ addPoint()

void dxfLayerData::addPoint | ( | const dimeVec3f & | v,
|  | const dimeMatrix *const | matrix = `NULL`
| ) |  |

Adds a point to this layer's geometry. If matrix != NULL, the point will be transformed by this matrix before they are added.

## ◆ addQuad()

void dxfLayerData::addQuad | ( | const dimeVec3f & | v0,
|  | const dimeVec3f & | v1,
|  | const dimeVec3f & | v2,
|  | const dimeVec3f & | v3,
|  | const dimeMatrix *const | matrix = `NULL`
| ) |  |

Adds a quad to this layer's geometry. If matrix != NULL, the points will be transformed by this matrix before they are added.

References addLine(), and dimeBSPTree::addPoint().

Referenced by dxfLineSegment::convert().

## ◆ addTriangle()

void dxfLayerData::addTriangle | ( | const dimeVec3f & | v0,
|  | const dimeVec3f & | v1,
|  | const dimeVec3f & | v2,
|  | const dimeMatrix *const | matrix = `NULL`
| ) |  |

Adds a triangle to this layer's geometry. If matrix != NULL, the points will be transformed by this matrix before they are added.

References addLine(), and dimeBSPTree::addPoint().

## ◆ setFillmode()

void dxfLayerData::setFillmode | ( | const bool | fillmode | ) |

Sets the fillmode for this layer. If fillmode is set (the default) polylines with width and/or height will be converter to polygons and not lines. The same goes for the SOLID and TRACE entities.

Referenced by dxfConverter::getColorIndex().

## ◆ writeWrl()

void dxfLayerData::writeWrl | ( | FILE * | fp,
|  | int | indent,
|  | const bool | vrml1,
|  | const bool | only2d
| ) |  |

Exports this layer's geometry as vrml nodes.

References dimeArray< T >::count(), dimeBSPTree::getPoint(), and dimeBSPTree::numPoints().

Referenced by dxfConverter::writeVrml().

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

- layerdata.h
- layerdata.cpp

Copyright © by Kongsberg Oil & Gas Technologies. All rights reserved.