Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
sf::GraphicOverlay Class Reference

Wrapper for drawing 2D overlays into the 3D space using specified offsets. Handles loading of multiple layers and configurable offsets and scaling. More...

#include <GraphicOverlay.h>

Public Types

enum  ELayer : int {
  layFIXTURE = 0 , layOBJECT , layTOOL , laySUB_TOOL ,
  layCOUNT
}
 Enumeration of layers which are available. More...
 

Public Member Functions

 GraphicOverlay ()
 Constructor.
 
 ~GraphicOverlay ()
 Destructor.
 
void clear ()
 Clears the content.
 
bool load (OpenGLRenderer *renderer)
 Loads the overlays into the given OpenGL widget.
 
QStringList getFileNames (const QString &base_dir) const
 Gets the filenames available located in the given directory.
 
void setFilepath (const QString &filepath)
 Sets the filepath to the graphic file.
 
void setOffset (const Vector3D &offset)
 Sets an offset to all layers.
 
void reload ()
 Reloads the DXF file.
 
bool isDirty () const
 Returns true if the assign function was called.
 
void setDirty (bool flag)
 Sets the dirty flag.
 

Static Public Member Functions

static QString getLayerName (ELayer layer)
 Gets the name of the layer.
 

Detailed Description

Wrapper for drawing 2D overlays into the 3D space using specified offsets. Handles loading of multiple layers and configurable offsets and scaling.

Member Enumeration Documentation

◆ ELayer

Enumeration of layers which are available.

Enumerator
layFIXTURE 

Fixture for the object.

layOBJECT 

Object or part on top of the fixture.

layTOOL 

Optional tool.

laySUB_TOOL 

Optional sub tool moving along with an auxiliary axis.

layCOUNT 

Number of available layers.

Constructor & Destructor Documentation

◆ GraphicOverlay()

sf::GraphicOverlay::GraphicOverlay ( )

Constructor.

◆ ~GraphicOverlay()

sf::GraphicOverlay::~GraphicOverlay ( )

Destructor.

Member Function Documentation

◆ clear()

void sf::GraphicOverlay::clear ( )

Clears the content.

◆ getFileNames()

QStringList sf::GraphicOverlay::getFileNames ( const QString &  base_dir) const

Gets the filenames available located in the given directory.

Parameters
base_dirDirectory to search for the files.
Returns
List of available filenames.

◆ getLayerName()

static QString sf::GraphicOverlay::getLayerName ( ELayer  layer)
static

Gets the name of the layer.

Parameters
layerDesignated layer.
Returns
Layer name.

◆ isDirty()

bool sf::GraphicOverlay::isDirty ( ) const

Returns true if the assign function was called.

Returns
bool Dirty flag status.

◆ load()

bool sf::GraphicOverlay::load ( OpenGLRenderer renderer)

Loads the overlays into the given OpenGL widget.

◆ reload()

void sf::GraphicOverlay::reload ( )

Reloads the DXF file.

◆ setDirty()

void sf::GraphicOverlay::setDirty ( bool  flag)

Sets the dirty flag.

Parameters
flagFlag value to set.

◆ setFilepath()

void sf::GraphicOverlay::setFilepath ( const QString &  filepath)

Sets the filepath to the graphic file.

Parameters
filepathFilepath to assign.

◆ setOffset()

void sf::GraphicOverlay::setOffset ( const Vector3D &  offset)

Sets an offset to all layers.

Parameters
offsetVector containing the offset.

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