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

Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
dimeLayer Class Reference

The dimeLayer class handles layers. More...

`#include <dime/Layer.h>`

## Public Types

enum | Flags { FROZEN = 0x1, FROZEN_NEW_VIEWPORTS = 0x2, LOCKED = 0x4 }

## Public Member Functions

const char * | getLayerName () const
int | getLayerNum () const
int16 | getColorNumber () const
void | setColorNumber (const int16 num)
int16 | getFlags () const
void | setFlags (const int16 &flags)
bool | isDefaultLayer () const

## Static Public Member Functions

static const dimeLayer * | getDefaultLayer ()
static void | colorToRGB (const int colornum, dxfdouble &r, dxfdouble &g, dxfdouble &b)

## Friends

class | dimeModel

## Detailed Description

The dimeLayer class handles layers.

Each entity will have a pointer to a dimeLayer class. If no layer is specified by the user, a pointer to a default layer will be used. An instance of this class can only be constructed by the dimeModel class.

To add new layers to your model, you must use the dimeLayerTable class, and add them to a dimeTablesSection.

See also
  dimeModel::addLayer()

## Member Function Documentation

## ◆ getColorNumber()

int16 dimeLayer::getColorNumber | ( |  | ) | const

inline

Returns the color number for this layer. A negative value means that this layer is off.

See also
  dimeLayer::setColorNumber()

Referenced by dxfConverter::getColorIndex().

## ◆ getDefaultLayer()

const dimeLayer * dimeLayer::getDefaultLayer | ( |  | ) |

static

Returns a pointer to the default layer.

Referenced by dimeEntity::dimeEntity(), isDefaultLayer(), dimeEntity::read(), and dimeEntity::setLayer().

## ◆ getFlags()

int16 dimeLayer::getFlags | ( |  | ) | const

inline

Returns the flags for this layer.

## ◆ getLayerName()

const char * dimeLayer::getLayerName | ( |  | ) | const

inline

Returns the layer name.

Referenced by dimeEntity::copyRecords(), dimeEntity::getLayerName(), dimeEntity::getRecord(), and dimeEntity::preWrite().

## ◆ getLayerNum()

int dimeLayer::getLayerNum | ( |  | ) | const

inline

Returns the layer number. This will be a unique number for this layer. The default layer will have number 0, and all other layer will get running number from 1 and up. This can be useful when extracting geometry from a DXF model, and you need to group the geometry by layer.

See also
  dimeModel::getNumLayers().

## ◆ isDefaultLayer()

bool dimeLayer::isDefaultLayer | ( |  | ) | const

inline

Returns true if this is the default layer.

References getDefaultLayer().

## ◆ setColorNumber()

void dimeLayer::setColorNumber | ( | const int16 | num | ) |

inline

Sets the color number for this layer.

See also
  dimeLayer::getColorNumber()

Referenced by dimeLayerTable::setColorNumber().

## ◆ setFlags()

void dimeLayer::setFlags | ( | const int16 & | flags | ) |

inline

Sets the flags for this layer.

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

- Layer.h
- Layer.cpp

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