Skip to main content
Part of Graphics A class for 3D visualization of a structure Additionally, it can display palettes and text annotations as well as rich text labels. Internally, a representation in terms of triangles only is used. Qt separation: This class contains no functionality relying on Qt classes. All methods using Qt classes are virtual and have no implementation, calling DYNARDO_LOG_WARN instead. Their implementation is done in SceneQt, part of the sos_qt_extensions module. Class Scene is NO QObject, but SceneQt is. Instances of Scene or SceneQt are created with application_makeScene(), implemented in the sos_qt_extensions or sos_noqt_extensions module respectively.

Public Types

Public Member Functions

Control OpenGL

RENDER

font

coloring

ruler

VIEW

SLICING

SELECTION

Miscellaneous

Detailed Description

A class for 3D visualization of a structure Additionally, it can display palettes and text annotations as well as rich text labels. Internally, a representation in terms of triangles only is used. Qt separation: This class contains no functionality relying on Qt classes. All methods using Qt classes are virtual and have no implementation, calling DYNARDO_LOG_WARN instead. Their implementation is done in SceneQt, part of the sos_qt_extensions module. Class Scene is NO QObject, but SceneQt is. Instances of Scene or SceneQt are created with application_makeScene(), implemented in the sos_qt_extensions or sos_noqt_extensions module respectively.

Constructor & Destructor Documentation

Scene()

Constructor, requires the description of the structure in terms of a VerticesNormalsVisibility object. Initializes some defaults. Parameters

Member Function Documentation

ActivateNodeValues()

Render the scene into a QPaintDevice. Parameters

AddRotation() [1/2]

Adds the given angle to the actual rotation The rotation axis is determined by GetRotation. Parameters

AddRotation() [2/2]

Adds the given angle to the actual rotation. Parameters

addVal2String()

adds a value pair to the container storing information on mapping discrete number values into strings Parameters

AssignValues()

defines data to be rendered Parameters

currentCoordinates()

Returns a const-reference to m_current_scene_coordinates

currentNormals()

Returns a const-reference to m_current_scene_normals

currentOutlineCoordinates()

Returns a const-reference to m_current_scene_outline_coordinates

currentTetCoordinates()

Returns a const-reference to m_current_scene_tet_coordinates

databaseImage()

virtual Get the small mesh image to save with the database header, without Qt: returns empty image! Parameters

exportIsosurface_STL()

exports the curent isosurface to STL file Parameters

exportTNG()

to Matrix for use in slangTNG Parameters

File() [1/2]

Renders the scene into a QImage of current size. Returns a QImage Renders the scene into a QImage of given size Parameters Returns a QImage Renders the finite element model of a scene into a QImage of given size a QImage
Renders the contents of the scene to an image file using current size of the scene
Parameters

File() [2/2]

virtual Renders the contents of the scene to an image file of given size. Parameters

font()

virtual Returns a reference to See also m_font

GetBackground()

Gets the first background color for the scene. Parameters

GetBackground2()

Gets the second background color for the scene. This defines a vertical color gradient together with the first background color. Parameters

getContours()

get contour levels Returns contour levels

getContourSize()

get numnber of contour levels Returns number of contour levels

GetContourType()

GetContourType. Returns contour type of scene

getCoordinateAxes()

Returns the state of rendering coordinate axes Returns True if drawing of axes is activated, false otherwise

getElementDistance()

virtual Returns the distance between the mapped mean value of the elements nodal coordinates and the midpoint of the selection rectangle given Maps the mean value of the elements nodal coordinates components given to window coordinates and returns the distance between this point and the midpoint of the window selection rectangle given. Parameters Returns The distance between the mapped mean value of the elements nodal coordinates given and the midpoint of the selection rectangle given if the mapped point is inside or on the edge of the selection rectangle given. 1e33 otherwise.

getMaxValue()

Returns the the maximum data value of m_val_[node,element].dataobject_value. Returns The maximum data value of the total scene dataobject or 1 if m_val_[node,element].dataobect_value is empty

getMinValue()

Returns the the minimum data value of m_val_[node,element].dataobject_value. Returns The minimum data value of the total scene dataobject or 0 if m_val_[node,element].dataobect_value is empty

getNodeDistance() [1/2]

virtual Returns the distance between the mapped nodal coordinates and the midpoint of the selection rectangle given. Maps the nodal coordinates given to window coordinates and returns the distance between this point and the midpoint of the window selection rectangle given. Parameters Returns The distance between the mapped nodal coordinates and the midpoint of the rectangle given if the mapped point is inside or on the edge of the selection rectangle given. 1e33 otherwise.

getNodeDistance() [2/2]

virtual Returns the distance between the mapped nodal coordinates and the midpoint of the selection rectangle given. Maps the nodal coordinates given to window coordinates and returns the distance between this point and the midpoint of the window selection rectangle given. Parameters Returns The distance between the mapped nodal coordinates and the midpoint of the rectangle given if the mapped point is inside or on the edge of the selection rectangle given. 1e33 otherwise.

getNumPoints()

get the number points Returns number of points

GetPan()

get the current pan values Parameters

getPointColors()

get the colors of all points Returns colors

getPointSize()

set the size of points relative to model size Returns point size

GetRichLabel()

virtual GetRichLabel. Returns the current rich label (legend) from the scene

GetRotation()

get current rotation expressed in angle/axis form Parameters

getSelectedElementIndices()

virtual Returns the indices in index mapper of selected elements as column vector Parameters

getSelectedNodeIndices()

virtual Returns the indices in index mapper of selected nodes as column vector Parameters

getSlice()

Get current slicing plane in Hessian normal form given by the equation \hat{n}x = -p. Parameters

getSphereNormals()

get normals of a unit sphere Returns normals

getSphereVertices()

get vertices of a unit sphere Returns vertices

getValues()

Returns a reference to the original scene data. Returns A reference to the original (node/element) scene data

getVisibleCoordinates()

get the coordinates of all visible vertices Returns coordinates

getVisibleTetCoordinates()

get the coordinates of all visible tet vertices Returns coordinates

GetZoom()

get current zoom factor Returns current zoom factor

haveCurrentCoordinates()

Returns bool to indicated deformed coordinates

importTNG()

virtual from Matrix as used in slangTNG Parameters

isSelected() [1/2]

virtual isSelected Parameters Returns bool indicating if chosen element is selected

isSelected() [2/2]

virtual isSelected Parameters Returns bool indicating if chosen node is selected

isSliced()

Returns true if a slice area is defined

isVertexSelected()

virtual determine if a given vertex is currently selected Parameters Returns boolean idicating if selected

mappedVector()

Maps actual position vector into view space (-32767 - 32767) Parameters Returns Mapped vector

palette()

virtual Get current palette. Returns palette object containing the definition of the palette.

palettePercentageRange()

virtual Returns Returns true if the palette has set relative values. Otherwise false

Prepare()

virtual Clears all OpenGL Vertex Buffers first and re-initializes them afterwards. Parameters

printSelectionInfo()

virtual prints some limited information on the current selection Parameters

removeSlice()

Remove the slicing plane

select() [1/2]

virtual Tests if the given element is in FEM set and if so marks it with value given as selected. Parameters Returns Returns the number of new selected elements, which is at most 1, ignoring the original selection state

select() [2/2]

virtual Tests if the given node is in an active FEM set and if so marks it with value given as selected. Parameters Returns Returns the number of new selected nodes, which is at most 1, ignoring the original selection state

selectEntitiesInRect()

virtual Calls the select method for all visible mapped vertices/nodes and triangles/elements in a selection rectangle on the screen The called select method ensures that only items within an active FEM set will be selectable. See select for further information. Parameters

SetBackground()

Sets the first background color for the scene. Parameters

SetBackground2()

Sets the second background color for the scene. This defines a vertical color gradient together with the first background color. Parameters

SetCoorAxesPosition()

virtual Sets the position for the coordinate axes. Parameters

setCoordinateAxes()

Enable/Disable rendering of coordinate axes Parameters

setCoordinateAxesLabels()

Returns the state of the perspective property in rendering scene Returns True if perspective is activated, false otherwise

SetCoordinates()

Sets all coordinates of vertices. Parameters

SetCoorSystemPosition()

virtual Sets the position for the coordinate system. Parameters

SetFont() [1/2]

virtual Sets the font for all text to be shown in the scene. Parameters

SetFont() [2/2]

virtual Sets the font for all text to be shown in the scene. Parameters

SetGeometricScaling()

defines the scaling factor for geometric variations Parameters

SetGeometricStabilization()

enables/disables mesh smoothening for gemetric imperfections Parameters

SetLegendPosition()

virtual Sets the position for the legend. Parameters

SetMarkPosition()

Sets the position for the watermark. Parameters

setPalettePercentageRange()

virtual Sets a relative, percentage palette range. Parameters

setPalettePosition()

virtual Sets the position for the current palette. Parameters

setPaletteType()

virtual Assign a color/value palette to the scene. Only one palette can be assigned. Parameters

SetPan()

Set the current pan values in (pixel, coordinate system?) Parameters

setPerspective()

Enable/Disable use of perspective in rendering scene Parameters

setPointSize()

set the size of points relative to model size Parameters

SetRotation()

Resetting all rotatation information to its origin setting the new definition afterwards. Parameters

setRuler()

Sets visibility of ruler. Parameters

SetScale()

Sets current length scale and zoom factor accordingly. Parameters

SetSlice() [1/2]

Defines a slicing plane in Hessian normal form in terms of a point and a direction vector. Parameters
This is just a convenience method computing the coefficients for the euclidean plane equation and calling the overloaded version afterwards.
Refer to Wolfram: Plane for an explanation of the plane definition

SetSlice() [2/2]

Defines a slicing plane in Hessian normal form by normalizing the paramters aa, bb, cc, and dd given Only points with coordinates satisfying $ax+by+cz+d > 0$ are shown, the rest is suppressed. Parameters
Refer to Wolfram: Plane for an explanation of the plane definition

SetTetCoordinates()

Sets all coordinates of tet vertices. Parameters

SetUnconnectedPointCoordinates()

Sets morphed coordinates of unconnected points. Parameters

SetValues()

virtual Assign values to the vertices of the structure which are then used for coloring. Parameters

SetZoom()

Sets current zoom factor. Parameters

showRuler()

Returns m_show_ruler