open_iA 2024.7
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
iADataSetRenderer Class Referenceabstract

Abstract interface for 3D renderers of a dataset (in an iARenderer). More...

#include <iADataSetRenderer.h>

Inheritance diagram for iADataSetRenderer:
[legend]

Public Member Functions

 iADataSetRenderer (vtkRenderer *renderer)
 Create a dataset renderer.
 
virtual ~iADataSetRenderer ()
 called when dataset renderer is removed from display and destroyed.
 
iAAttributes attributesWithValues () const
 Retrieves the list of attributes, merged with their current values as default values:
 
virtual QVariantMap attributeValues () const
 Retrieve only the current attribute values.
 
virtual iAAABB bounds ()=0
 The coordinates of the axis-aligned bounding box (of the dataset, untransformed to any current position/orientation changes)
 
bool isPickable () const
 whether dataset is currently set to be pickable
 
bool isVisible () const
 Whether dataset is currently visible.
 
virtual double const * orientation () const =0
 Get Orientation of this dataset in scene TODO: make deliver std::array by value to avoid pointer to internal data!
 
virtual double const * position () const =0
 Get Position of this dataset in scene TODO: make deliver std::array by value to avoid pointer to internal data!
 
virtual void removeCuttingPlanes ()
 
void setAttributes (QVariantMap const &values)
 Call to change the attributes of this renderer.
 
void setBoundsVisible (bool visible)
 Set the visibility of the axis-aligned bounding box:
 
virtual void setCuttingPlanes (std::array< vtkPlane *, 3 > p)
 optional additional control widget needed for additional settings in the renderer
 
virtual void setOrientation (double ori[3])=0
 Set orientation of this dataset in scene.
 
void setPickable (bool pickable)
 convenience method for setting the pickable attribute
 
virtual void setPosition (double pos[3])=0
 Set position of this dataset in scene.
 
void setVisible (bool visible)
 Set visibility of dataset.
 
virtual vtkProp3D * vtkProp ()=0
 Retrieve the vtk prop (=root object in the scene) used for rendering this dataset.
 
vtkRenderer * vtkRen () const
 Retrieve the vtk renderer used for rendering this dataset.
 

Static Public Member Functions

static iAAttributesdefaultAttributes ()
 default attributes of the dataset renderer
 

Static Public Attributes

static constexpr const char AmbientLighting [] = "Ambient lighting"
 
static constexpr const char DiffuseLighting [] = "Diffuse lighting"
 
static constexpr const char Orientation [] = "Orientation"
 
static constexpr const char OutlineColor [] = "Box Color"
 
static constexpr const char Pickable [] = "Pickable"
 
static constexpr const char Position [] = "Position"
 
static constexpr const char Shading [] = "Shading"
 
static constexpr const char SpecularLighting [] = "Specular lighting"
 
static constexpr const char SpecularPower [] = "Specular power"
 

Protected Member Functions

virtual iAAttributes const & attributes () const
 attributes of the specific renderer; this is typically the default attributes plus dataset-specific attributes
 
void setDefaultAttributes (iAAttributes const &defaultAttr, QVariantMap const &overrideValues)
 convenience methods for derived classes: to be used at end of constructor to initialize attribute values to default, with the option to override these default values (e.g.
 
void updateOutlineTransform ()
 needs to be called by derived classes whenever the bounds of the dataset change (position, orientation, ...)
 

Protected Attributes

QVariantMap m_attribValues
 
vtkRenderer * m_renderer
 The VTK renderer used for showing this dataset.
 

Detailed Description

Abstract interface for 3D renderers of a dataset (in an iARenderer).

Constructor & Destructor Documentation

◆ iADataSetRenderer()

iADataSetRenderer::iADataSetRenderer ( vtkRenderer * renderer)

Create a dataset renderer.

◆ ~iADataSetRenderer()

iADataSetRenderer::~iADataSetRenderer ( )
virtual

called when dataset renderer is removed from display and destroyed.

Only takes care of removing outline from display; derived classes need to remove their props from renderers themselves!

Member Function Documentation

◆ attributes()

iAAttributes const & iADataSetRenderer::attributes ( ) const
protectedvirtual

attributes of the specific renderer; this is typically the default attributes plus dataset-specific attributes

◆ attributesWithValues()

iAAttributes iADataSetRenderer::attributesWithValues ( ) const

Retrieves the list of attributes, merged with their current values as default values:

◆ attributeValues()

QVariantMap iADataSetRenderer::attributeValues ( ) const
virtual

Retrieve only the current attribute values.

Reimplemented in iAVolumeRenderer.

◆ bounds()

virtual iAAABB iADataSetRenderer::bounds ( )
pure virtual

The coordinates of the axis-aligned bounding box (of the dataset, untransformed to any current position/orientation changes)

Implemented in iAGraphRenderer, iAPolyDataRenderer, iAGeometricObjectRenderer, iAVolumeRenderer, and iAObjectsRenderer.

◆ defaultAttributes()

iAAttributes & iADataSetRenderer::defaultAttributes ( )
static

default attributes of the dataset renderer

◆ isPickable()

bool iADataSetRenderer::isPickable ( ) const

whether dataset is currently set to be pickable

◆ isVisible()

bool iADataSetRenderer::isVisible ( ) const

Whether dataset is currently visible.

◆ orientation()

virtual double const * iADataSetRenderer::orientation ( ) const
pure virtual

Get Orientation of this dataset in scene TODO: make deliver std::array by value to avoid pointer to internal data!

Implemented in iAGraphRenderer, iAPolyActorRenderer, iAVolumeRenderer, and iAObjectsRenderer.

◆ position()

virtual double const * iADataSetRenderer::position ( ) const
pure virtual

Get Position of this dataset in scene TODO: make deliver std::array by value to avoid pointer to internal data!

Implemented in iAGraphRenderer, iAPolyActorRenderer, iAVolumeRenderer, and iAObjectsRenderer.

◆ removeCuttingPlanes()

void iADataSetRenderer::removeCuttingPlanes ( )
virtual

Reimplemented in iAVolumeRenderer.

◆ setAttributes()

void iADataSetRenderer::setAttributes ( QVariantMap const & values)

Call to change the attributes of this renderer.

◆ setBoundsVisible()

void iADataSetRenderer::setBoundsVisible ( bool visible)

Set the visibility of the axis-aligned bounding box:

◆ setCuttingPlanes()

void iADataSetRenderer::setCuttingPlanes ( std::array< vtkPlane *, 3 > p)
virtual

optional additional control widget needed for additional settings in the renderer

Reimplemented in iAVolumeRenderer.

◆ setDefaultAttributes()

void iADataSetRenderer::setDefaultAttributes ( iAAttributes const & defaultAttr,
QVariantMap const & overrideValues )
protected

convenience methods for derived classes: to be used at end of constructor to initialize attribute values to default, with the option to override these default values (e.g.

by ones loaded along with the dataset in a project file)

Parameters
defaultAttrthe list of default attributes to set
overrideValuesthe values overriding the defaults

◆ setOrientation()

virtual void iADataSetRenderer::setOrientation ( double ori[3])
pure virtual

Set orientation of this dataset in scene.

Implemented in iAGraphRenderer, iAPolyActorRenderer, iAVolumeRenderer, and iAObjectsRenderer.

◆ setPickable()

void iADataSetRenderer::setPickable ( bool pickable)

convenience method for setting the pickable attribute

◆ setPosition()

virtual void iADataSetRenderer::setPosition ( double pos[3])
pure virtual

Set position of this dataset in scene.

Implemented in iAGraphRenderer, iAPolyActorRenderer, iAVolumeRenderer, and iAObjectsRenderer.

◆ setVisible()

void iADataSetRenderer::setVisible ( bool visible)

Set visibility of dataset.

◆ updateOutlineTransform()

void iADataSetRenderer::updateOutlineTransform ( )
protected

needs to be called by derived classes whenever the bounds of the dataset change (position, orientation, ...)

◆ vtkProp()

virtual vtkProp3D * iADataSetRenderer::vtkProp ( )
pure virtual

Retrieve the vtk prop (=root object in the scene) used for rendering this dataset.

Implemented in iAGraphRenderer, iAPolyActorRenderer, iAVolumeRenderer, and iAObjectsRenderer.

◆ vtkRen()

vtkRenderer * iADataSetRenderer::vtkRen ( ) const

Retrieve the vtk renderer used for rendering this dataset.

Member Data Documentation

◆ AmbientLighting

constexpr const char iADataSetRenderer::AmbientLighting[] = "Ambient lighting"
staticconstexpr

◆ DiffuseLighting

constexpr const char iADataSetRenderer::DiffuseLighting[] = "Diffuse lighting"
staticconstexpr

◆ m_attribValues

QVariantMap iADataSetRenderer::m_attribValues
mutableprotected

◆ m_renderer

vtkRenderer* iADataSetRenderer::m_renderer
protected

The VTK renderer used for showing this dataset.

Note that this pointer may be set to nullptr if the renderer is deleted before; so in derived classes, one should always check if it is set before accessing it!

◆ Orientation

constexpr const char iADataSetRenderer::Orientation[] = "Orientation"
staticconstexpr

◆ OutlineColor

constexpr const char iADataSetRenderer::OutlineColor[] = "Box Color"
staticconstexpr

◆ Pickable

constexpr const char iADataSetRenderer::Pickable[] = "Pickable"
staticconstexpr

◆ Position

constexpr const char iADataSetRenderer::Position[] = "Position"
staticconstexpr

◆ Shading

constexpr const char iADataSetRenderer::Shading[] = "Shading"
staticconstexpr

◆ SpecularLighting

constexpr const char iADataSetRenderer::SpecularLighting[] = "Specular lighting"
staticconstexpr

◆ SpecularPower

constexpr const char iADataSetRenderer::SpecularPower[] = "Specular power"
staticconstexpr

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