SceneManager Class Reference
Last update: 16.07.2025A manager class for 3D visualization of a structure. More...
Public Types | |
| typedef std::list< SceneListener * > | SceneListenerList |
| a list of More... | |
Public Member Functions | |
| activateElementValues () | |
| activateNodeValues () | |
| virtual Scene | activeScene () |
| virtual Scene | activeSceneRef () |
| virtual | addScene () |
| Destructor. More... | |
| clearSelection () | |
| clearSelection unselect all nodes and elements in active scene. Does not perform an automatic redraw | |
| eraseScene (number index) | |
| deletes a scene More... | |
| eraseScenes (bool all=false) | |
| deletes all scenes More... | |
| exportTNG (string file) | |
| export scene data to slangTNG More... | |
| virtual | extractMaximumScalarsFromSelectedElements (bool, string user_ident="") |
| virtual | extractMaximumScalarsFromSelectedNodes (bool, string user_ident="") |
| virtual | extractMinimumScalarsFromSelectedElements (bool, string user_ident="") |
| virtual | extractMinimumScalarsFromSelectedNodes (bool, string user_ident="") |
| virtual | extractScalarsFromSelectedElements (bool) |
| virtual | extractScalarsFromSelectedNodes (bool) |
| file (string filename) | |
| : Render the scene into a QImage More... | |
| file (string filename, number width, number height) | |
| fit () | |
| Adjust scaling such that the entire structure fills the viewport when viewed from current angle. | |
| virtual | font (QFont font) |
| int | getActiveScene () |
| bool | getAutoRedraw () |
| getAutoRedraw set automatic redraw mode More... | |
| bool | getHiliteReferenceSet () |
| float | getIsoSurfaceAlpha () |
| virtual | getPaletteRange (number xmin, number xmax) |
| Gets minimum and maximum values of palette. More... | |
| getPan (float x, float y) | |
| get the current pan values More... | |
| getRotation (float angle, float x, float y, float z) | |
| get current rotation expressed in angle/axis form More... | |
| std::vector< boost::shared_ptr< graphics::Scene > > | getScenes () |
| float | getStructureAlpha () |
| getValueRange (number xmin, number xmax) | |
| Gets minimum and maximum data values. More... | |
| Matrix | getVisibleCoordinates () |
| get coordinates of all vertices in the active scene More... | |
| Matrix | getVisibleTetCoordinates () |
| get coordinates of all tet vertices in the active scene More... | |
| float | getZoom () |
| get current zoom factor More... | |
| initSlice () | |
| Defines a slicing plane in the active scene, using the body coordinate system. The plane will be defined in Hessian normal form Only points with coordinates satisfying $ax+by+cz+d > 0$ are shown, the rest is suppressed. More... | |
| bool | isElementSelected (number part_idx, number element_idx) |
| isSelected More... | |
| bool | isGraphicsEnabled () |
| bool | isGraphicsSlicingEnabled () |
| bool | isNodeSelected (number part_idx, number node_idx) |
| isSelected More... | |
| virtual std::vector< string > | listPaletteIDs () |
| Returns an order list of all known palette IDs including user defined ones. More... | |
| redraw (bool sync) | |
| redraw the active scene | |
| removeSlice () | |
| Removes the slicing plane of the active scene. | |
| virtual string | rendererInfo () |
| get the graphics renderer information creates its own openGL context locally, to call glGetString() More... | |
| resetScene () | |
| applies an empty data set to the active scene (resetting it to structure plot) | |
| scale () | |
| Adjust scaling such that the entire structure fits into the viewport when viewed from any angle. | |
| SceneManager (boost::shared_ptr< Structure > dataBase, bool is_graphics_enabled=true) | |
| Initializes the manager and adds a first scene provided that the database has a reference mesh defined. Adds a first scene without any data -> calls addSene only. More... | |
| Matrix | selectedElementIndices () |
| Matrix | selectedNodeIndices () |
| selectElement (number part_idx, number element_idx, number value, bool showLabel) | |
| select a single element in the active scene. Does not perform an automatic redraw More... | |
| selectElements (Matrix indices) | |
| selects the given elements More... | |
| selectMaximumValues (bool add_selection, number max_selectable) | |
| Selects max_selectable largest data values of the active quantity among the whole FEM structure in the active scene. More... | |
| selectMinimumValues (bool add_selection, number max_selectable) | |
| Selects max_selectable smallest data values of the active quantity among the whole FEM structure in the active scene. More... | |
| selectNode (number part_idx, number node_idx, number value, bool showLabel) | |
| select a single node in the active scene. Does not perform an automatic redraw More... | |
| selectNodes (Matrix indices) | |
| selects the given nodes More... | |
| selectRelativeMaximumValues (bool add_selection, number max_selectable) | |
| Calls selectRelativeMaximumValuesWeak(...). Selects max_selectable local maxima data values of the active quantity among the whole FEM structure in the active scene. More... | |
| selectRelativeMaximumValuesStrict (bool add_selection, number max_selectable) | |
| Selects max_selectable local maxima data values of the active quantity among the whole FEM structure in the active scene Will only select nodes with all adjacent nodes having a SMALLER value. More... | |
| selectRelativeMaximumValuesWeak (bool add_selection, number max_selectable) | |
| Selects max_selectable local maxima data values of the active quantity among the whole FEM structure in the active scene Will only select nodes with all adjacent nodes having a SMALLER OR EQUAL value. More... | |
| selectRelativeMinimumValues (bool add_selection, number max_selectable) | |
| Calls selectRelativeMinimumValuesWeak(...). Selects max_selectable local minima data values of the active quantity among the whole FEM structure in the active scene. More... | |
| selectRelativeMinimumValuesStrict (bool add_selection, number max_selectable) | |
| Selects max_selectable local minima data values of the active quantity among the whole FEM structure in the active scene Will only select nodes with all adjacent nodes having a LARGER value. More... | |
| selectRelativeMinimumValuesWeak (bool add_selection, number max_selectable) | |
| Selects max_selectable local minima data values of the active quantity among the whole FEM structure in the active scene Will only select nodes with all adjacent nodes having a LARGER OR EQUAL value. More... | |
| setActiveScene (number act) | |
| sets the active scene More... | |
| setAutoRedraw (bool t) | |
| setAutoRedraw set automatic redraw mode if scene settings are changed More... | |
| setBackgroundBottom (unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha) | |
| sets the bottom background color More... | |
| setBackgroundTop (unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha) | |
| sets the top background color More... | |
| setClipBorder (float border) | |
| set clip border rotation | |
| setContour (number c) | |
| set single contour of contour plot More... | |
| setContourType (string cont="") | |
| setContourType define the type of contour plot More... | |
| setCoordinateAxes (bool value) | |
| enable/disable coordinate axes More... | |
| setCoordinateAxesLabels (string x, string y, string z) | |
| labels coordinate axes More... | |
| setCoordinates (Matrix coordinates) | |
| set coordinates of all vertices in the active scene More... | |
| setCoorSystemPosition (string pos="") | |
| setCoorSystemPosition More... | |
| setDefaultCamera () | |
| set default rotation/zoom/pan | |
| setDefaultRotation () | |
| set default rotation | |
| setDrawMissing (string how) | |
| define how to draw missing data More... | |
| setFont (string font, number fontsize) | |
| Sets the font for all text to be shown in the active scene. More... | |
| setGeometricScaling (number scaling, Structure database) | |
| defines the scaling factor for geometric variations More... | |
| setGeometricScaling (number scaling) | |
| defines the scaling factor for geometric variations More... | |
| setGeometricStabilization (bool enable, Structure database) | |
| enables/disables mesh smoothening for geometric imperfections More... | |
| setGeometricStabilization (bool enable) | |
| enables/disables mesh smoothening for geometric imperfections More... | |
| bool | setGraphicsEnabled (bool enabled) |
| Enables or disables graphics. More... | |
| bool | setGraphicsSlicingEnabled (bool enabled) |
| Enables or disables slicing in graphics (only relevant for volume elements) More... | |
| setHiliteReferenceSet (bool t) | |
| setIsoSurfaceAlpha (float a) | |
| setLegend (string text) | |
| set the legend in the active scene More... | |
| setLegendPosition (string pos="") | |
| setLegendPosition More... | |
| setMarkPosition (string pos="") | |
| setMarkPosition More... | |
| setMeshFeature (string feat) | |
| set mesh features to be drawn More... | |
| virtual | setPaletteColoringType (string palette_id) |
| setPalettePosition (string pos="") | |
| setPalettePosition More... | |
| virtual | setPaletteRange (string how) |
| Sets minimum and maximum values of palette according to the algorithm defined by how. More... | |
| setPaletteRange (number xmin, number xmax) | |
| Sets minimum and maximum values of palette. More... | |
| setPan (float x, float y) | |
| set the current pan values More... | |
| setPerspective (bool persp) | |
| enable/disable perspective view More... | |
| setPointSize (float size) | |
| set the size of points relative to model size More... | |
| setRotation (float angle, float x, float y, float z) | |
| set current rotation expressed in angle/axis form More... | |
| setRulerVisibility (bool on) | |
| changes visibility of the ruler More... | |
| setScale (float z) | |
| set scale factor More... | |
| setSceneData (RenderData::DataType type, string design, string quantity) | |
| a convenience function which assigns a constant contour plot to the active scene More... | |
| setSceneData (AllRenderData render_data) | |
| assigns the visible data to the active scene More... | |
| setSceneData (Matrix inputs) | |
| changes the data of the input parameters for the currently set field data model and assigns them to the active scene More... | |
| setSceneScaleRelative (float x, float y, float z) | |
| set different scaling for all three axes | |
| virtual | setSelection (int scene_widht, int scene_height, int x, int y, int width, int height, bool add_selection, number max_selectable, bool show_label) |
| Selects all elements of the active Scene within the rectangle defined by x, y, width and height given. More... | |
| setShowInvisibleLabels (bool t) | |
| setSize (number w, number h) | |
| setSize Sets the size of the active scene More... | |
| setSlice (float a, float b, float c, float d) | |
| Defines a slicing plane in the active scene, using the body coordinate system. The plane will be defined in Hessian normal form by normalizing the paramters $a$, $b$, $c$, and $d$ given Only points with coordinates satisfying $ax+by+cz+d > 0$ are shown, the rest is suppressed. More... | |
| setStructureAlpha (float a) | |
| setSyncCamera (bool sync) | |
| defines if the scenes are synchronized in camera positioning More... | |
| setTetCoordinates (Matrix coordinates) | |
| set coordinates of all tet vertices in the active scene More... | |
| setZoom (float z) | |
| set current zoom factor More... | |
| number | size () |
| bool | syncCamera () const |
| returns if the camera settings are synchronized for all scenes | |
| virtual | syncCamera () |
| Sets the camera and slicing settings of the active scene to all other scenes. More... | |
| virtual | syncDeco () |
| Sets the decoration settings of the current, active view to all other views. | |
| virtual | syncPalette () |
| Sets the palette settings of the active scene to all other scenes. | |
| virtual | syncSelection () |
| Mirrors the selection of the current view to all other views. | |
Detailed Description
A manager class for 3D visualization of a structure.
The SceneManager contains a Structure, extracts the reference-mesh and adds it as a first scene via addScene. Since there is no data selected in the beginning, this will result in a structure-plot without contour or palette. After the first call of addSceneData(...) contour or palette are added.
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 SceneManagerQt, part of the sos_qt_extensions module. Class SceneManager is NO QObject, but SceneManagerQt is. Instances of SceneManager or SceneManagerQt are created with application_makeSceneManager(), implemented in the sos_qt_extensions or sos_noqt_extensions module respectively.
Member Typedef Documentation
◆ SceneListenerList
| typedef std::list<SceneListener*> SceneListenerList |
a list of
- See also
- SceneListener pointers
Constructor & Destructor Documentation
◆ SceneManager()
| SceneManager | ( | boost::shared_ptr< Structure > | dataBase, |
| bool | is_graphics_enabled = true |
||
| ) |
Initializes the manager and adds a first scene provided that the database has a reference mesh defined. Adds a first scene without any data -> calls addSene only.
- Parameters
-
dataBase The database is_graphics_enabled if true then the graphics will be enabled, else disabled
Member Function Documentation
◆ activeScene()
|
virtual |
- Returns
- a const-reference to the currently active scene
◆ activeSceneRef()
|
virtual |
- Returns
- a reference to the currently active scene
◆ addScene()
|
virtual |
Destructor.
Adds a default scene to the scene manager
Initializes a new scene without any data and sets its index active. Sets the title to 'Structure' and generates a legend displaying some structure related information (i.e. mesh type, number of parts/elements/nodes, ...) only. Finally calls on all manager known listeners the ...AddScene method.
◆ eraseScene()
| eraseScene | ( | number | index | ) |
deletes a scene
- Parameters
-
index the index of the scene to be deleted.
◆ eraseScenes()
| eraseScenes | ( | bool | all = false | ) |
deletes all scenes
- Parameters
-
all if true, then all scenes are deleted, if false: the structural scene (index 0) is kept.
◆ exportTNG()
| exportTNG | ( | string | file | ) |
export scene data to slangTNG
- Parameters
-
output file (txt)
◆ file()
| file | ( | string | filename | ) |
: Render the scene into a QImage
- Returns
- a QImage : Render the scene into a file.
- Parameters
-
filename File name. File type is determined by its extension (.png, .jpg, etc.)
◆ font()
|
virtual |
- Returns
- a reference to the font for all text to be shown in the active scene
◆ getActiveScene()
| int getActiveScene | ( | ) |
- Returns
- the index of the active scene
◆ getAutoRedraw()
| bool getAutoRedraw | ( | ) |
getAutoRedraw set automatic redraw mode
- Returns
- automatic redraw mode
◆ getPaletteRange()
|
virtual |
Gets minimum and maximum values of palette.
- Parameters
-
xmin minimum value of palette xmax maximum value of palette
◆ getPan()
| getPan | ( | float | x, |
| float | y | ||
| ) |
get the current pan values
- Parameters
-
x x value of pan y y value of pan
◆ getRotation()
| getRotation | ( | float | angle, |
| float | x, | ||
| float | y, | ||
| float | z | ||
| ) |
get current rotation expressed in angle/axis form
- Parameters
-
angle Angle of rotation x x-component of rotation axis y y-component of rotation axis z z-component of rotation axis
◆ getValueRange()
| getValueRange | ( | number | xmin, |
| number | xmax | ||
| ) |
Gets minimum and maximum data values.
- Parameters
-
xmin minimum data value xmax maximum data value
◆ getVisibleCoordinates()
| Matrix getVisibleCoordinates | ( | ) |
get coordinates of all vertices in the active scene
- Returns
- Matrix containing the coordinates of size (3,n) in which n is the number of vertices
◆ getVisibleTetCoordinates()
| Matrix getVisibleTetCoordinates | ( | ) |
get coordinates of all tet vertices in the active scene
- Returns
- Matrix containing the coordinates of size (3,n) in which n is the number of vertices
◆ getZoom()
| float getZoom | ( | ) |
get current zoom factor
- Returns
- current zoom factor
◆ initSlice()
| initSlice | ( | ) |
Defines a slicing plane in the active scene, using the body coordinate system. The plane will be defined in Hessian normal form Only points with coordinates satisfying $ax+by+cz+d > 0$ are shown, the rest is suppressed.
- Note
- Refer to Wolfram: Plane for an explanation of the plane definition
◆ isElementSelected()
| bool isElementSelected | ( | number | part_idx, |
| number | element_idx | ||
| ) |
isSelected
- Parameters
-
part_idx the index of the part in FEM kernel element_idx the index of the element in part of the FEM kernel
- Returns
- bool indicating if chosen element is selected
◆ isGraphicsEnabled()
| bool isGraphicsEnabled | ( | ) |
- Returns
- The current graphics enabled state
◆ isGraphicsSlicingEnabled()
| bool isGraphicsSlicingEnabled | ( | ) |
- Returns
- The current graphics slicing enabled state
◆ isNodeSelected()
| bool isNodeSelected | ( | number | part_idx, |
| number | node_idx | ||
| ) |
isSelected
- Parameters
-
part_idx the index of the part in FEM kernel node_idx the index of the node in part of the FEM kernel
- Returns
- bool indicating if chosen node is selected
◆ listPaletteIDs()
|
virtual |
Returns an order list of all known palette IDs including user defined ones.
- Returns
- A vector of alphabetical ordered strings listing all palettes known by m_palette_manager
◆ rendererInfo()
|
virtual |
get the graphics renderer information creates its own openGL context locally, to call glGetString()
- Returns
- text formated to print in about dialog
◆ selectedElementIndices()
| Matrix selectedElementIndices | ( | ) |
- Returns
- a vector of indices of all selected elements (if any). The indices refer to the active index mapper
◆ selectedNodeIndices()
| Matrix selectedNodeIndices | ( | ) |
- Returns
- a vector of indices of all selected nodes (if any). The indices refer to the active index mapper
◆ selectElement()
| selectElement | ( | number | part_idx, |
| number | element_idx, | ||
| number | value, | ||
| bool | showLabel | ||
| ) |
select a single element in the active scene. Does not perform an automatic redraw
- Parameters
-
part_idx the index of the part in FEM kernel element_idx the index of the element in part of the FEM kernel
◆ selectElements()
| selectElements | ( | Matrix | indices | ) |
selects the given elements
- Parameters
-
indices the global indices (with respect to index mapper) of the elements to be selected
◆ selectMaximumValues()
| selectMaximumValues | ( | bool | add_selection, |
| number | max_selectable | ||
| ) |
Selects max_selectable largest data values of the active quantity among the whole FEM structure in the active scene.
- Parameters
-
add_selection True if the selection should be added to previously selected data. False otherwise. max_selectable Limits the maximum amount of automatically selected data on the structure.
◆ selectMinimumValues()
| selectMinimumValues | ( | bool | add_selection, |
| number | max_selectable | ||
| ) |
Selects max_selectable smallest data values of the active quantity among the whole FEM structure in the active scene.
- Parameters
-
add_selection True if the selection should be added to previously selected data. False otherwise. max_selectable Limits the maximum amount of automatically selected data on the structure.
◆ selectNode()
| selectNode | ( | number | part_idx, |
| number | node_idx, | ||
| number | value, | ||
| bool | showLabel | ||
| ) |
select a single node in the active scene. Does not perform an automatic redraw
- Parameters
-
part_idx the index of the part in FEM kernel node_idx the index of the node in part of the FEM kernel
◆ selectNodes()
| selectNodes | ( | Matrix | indices | ) |
selects the given nodes
- Parameters
-
indices the global indices (with respect to index mapper) of the nodes to be selected
◆ selectRelativeMaximumValues()
| selectRelativeMaximumValues | ( | bool | add_selection, |
| number | max_selectable | ||
| ) |
Calls selectRelativeMaximumValuesWeak(...). Selects max_selectable local maxima data values of the active quantity among the whole FEM structure in the active scene.
- Parameters
-
add_selection True if the selection should be added to previously selected data. False otherwise. max_selectable Limits the maximum amount of automatically selected data on the structure.
◆ selectRelativeMaximumValuesStrict()
| selectRelativeMaximumValuesStrict | ( | bool | add_selection, |
| number | max_selectable | ||
| ) |
Selects max_selectable local maxima data values of the active quantity among the whole FEM structure in the active scene Will only select nodes with all adjacent nodes having a SMALLER value.
- Parameters
-
add_selection True if the selection should be added to previously selected data. False otherwise. max_selectable Limits the maximum amount of automatically selected data on the structure.
◆ selectRelativeMaximumValuesWeak()
| selectRelativeMaximumValuesWeak | ( | bool | add_selection, |
| number | max_selectable | ||
| ) |
Selects max_selectable local maxima data values of the active quantity among the whole FEM structure in the active scene Will only select nodes with all adjacent nodes having a SMALLER OR EQUAL value.
- Parameters
-
add_selection True if the selection should be added to previously selected data. False otherwise. max_selectable Limits the maximum amount of automatically selected data on the structure.
◆ selectRelativeMinimumValues()
| selectRelativeMinimumValues | ( | bool | add_selection, |
| number | max_selectable | ||
| ) |
Calls selectRelativeMinimumValuesWeak(...). Selects max_selectable local minima data values of the active quantity among the whole FEM structure in the active scene.
- Parameters
-
add_selection True if the selection should be added to previously selected data. False otherwise. max_selectable Limits the maximum amount of automatically selected data on the structure.
◆ selectRelativeMinimumValuesStrict()
| selectRelativeMinimumValuesStrict | ( | bool | add_selection, |
| number | max_selectable | ||
| ) |
Selects max_selectable local minima data values of the active quantity among the whole FEM structure in the active scene Will only select nodes with all adjacent nodes having a LARGER value.
- Parameters
-
add_selection True if the selection should be added to previously selected data. False otherwise. max_selectable Limits the maximum amount of automatically selected data on the structure.
◆ selectRelativeMinimumValuesWeak()
| selectRelativeMinimumValuesWeak | ( | bool | add_selection, |
| number | max_selectable | ||
| ) |
Selects max_selectable local minima data values of the active quantity among the whole FEM structure in the active scene Will only select nodes with all adjacent nodes having a LARGER OR EQUAL value.
- Parameters
-
add_selection True if the selection should be added to previously selected data. False otherwise. max_selectable Limits the maximum amount of automatically selected data on the structure.
◆ setActiveScene()
| setActiveScene | ( | number | act | ) |
sets the active scene
- Parameters
-
act the index of the scene to become active
◆ setAutoRedraw()
| setAutoRedraw | ( | bool | t | ) |
setAutoRedraw set automatic redraw mode if scene settings are changed
- Parameters
-
t bool defining if automatic redraw should be done
◆ setBackgroundBottom()
| setBackgroundBottom | ( | unsigned char | red, |
| unsigned char | green, | ||
| unsigned char | blue, | ||
| unsigned char | alpha | ||
| ) |
sets the bottom background color
- Parameters
-
red red channel (0..255) in RGB color mode green green channel (0..255) in RGB color mode blue blue channel (0..255) in RGB color mode alpha alpha channel; 0 = transparent, 1 = opaque
◆ setBackgroundTop()
| setBackgroundTop | ( | unsigned char | red, |
| unsigned char | green, | ||
| unsigned char | blue, | ||
| unsigned char | alpha | ||
| ) |
sets the top background color
- Parameters
-
red red channel (0..255) in RGB color mode green green channel (0..255) in RGB color mode blue blue channel (0..255) in RGB color mode alpha alpha channel; 0 = transparent, 1 = opaque
◆ setContour()
| setContour | ( | number | c | ) |
set single contour of contour plot
- Parameters
-
c number defining the
◆ setContourType()
| setContourType | ( | string | cont = "" | ) |
setContourType define the type of contour plot
- Parameters
-
cont string defining the type of plot. Permissible values are "NONE", "LINE", and "SURFACE"
◆ setCoordinateAxes()
| setCoordinateAxes | ( | bool | value | ) |
enable/disable coordinate axes
- Parameters
-
axes bool defining if perspective is enabled
◆ setCoordinateAxesLabels()
| setCoordinateAxesLabels | ( | string | x, |
| string | y, | ||
| string | z | ||
| ) |
labels coordinate axes
- Parameters
-
x string labels defining y string labels defining z string labels defining
◆ setCoordinates()
| setCoordinates | ( | Matrix | coordinates | ) |
set coordinates of all vertices in the active scene
- Parameters
-
coordinates Matrix containing the coordinates, must have size (3,n) in which n is the number of vertices
◆ setCoorSystemPosition()
| setCoorSystemPosition | ( | string | pos = "" | ) |
setCoorSystemPosition
- Parameters
-
pos defines the position of the coordinate system, recognized values are "", "NE", "SE", "SW", and "NW"
◆ setDrawMissing()
| setDrawMissing | ( | string | how | ) |
define how to draw missing data
- Parameters
-
draw definition how to draw missing data
◆ setFont()
| setFont | ( | string | font, |
| number | fontsize | ||
| ) |
Sets the font for all text to be shown in the active scene.
- Parameters
-
font the font name fontsize the size of the font in points
◆ setGeometricScaling() [1/2]
| setGeometricScaling | ( | number | scaling, |
| Structure | database | ||
| ) |
defines the scaling factor for geometric variations
- Parameters
-
scaling the scaling factor database the database with mesh
◆ setGeometricScaling() [2/2]
| setGeometricScaling | ( | number | scaling | ) |
defines the scaling factor for geometric variations
- Parameters
-
scaling the scaling factor
◆ setGeometricStabilization() [1/2]
| setGeometricStabilization | ( | bool | enable, |
| Structure | database | ||
| ) |
enables/disables mesh smoothening for geometric imperfections
- Parameters
-
enable the enable state database the database with mesh
◆ setGeometricStabilization() [2/2]
| setGeometricStabilization | ( | bool | enable | ) |
enables/disables mesh smoothening for geometric imperfections
- Parameters
-
enable the enable state
◆ setGraphicsEnabled()
| bool setGraphicsEnabled | ( | bool | enabled | ) |
Enables or disables graphics.
- Parameters
-
enabled if true then the graphics will be enabled, else disabled
- Returns
- the previous state
- Note
- This function can only be called if the database has no mesh.
- The intention of this method is to reduce CPU time while loading FEM meshes in SIMULATION mode and other batch applications.
◆ setGraphicsSlicingEnabled()
| bool setGraphicsSlicingEnabled | ( | bool | enabled | ) |
Enables or disables slicing in graphics (only relevant for volume elements)
- Parameters
-
enabled if true then the slicing will be enabled, else disabled
- Returns
- the previous state
- Note
- This function can only be called if the database has no mesh.
- The intention of this method is to reduce CPU time while loading FEM meshes and speed up visualization.
◆ setLegend()
| setLegend | ( | string | text | ) |
set the legend in the active scene
- Parameters
-
text defines the legend text (rich text coded as html)
◆ setLegendPosition()
| setLegendPosition | ( | string | pos = "" | ) |
setLegendPosition
- Parameters
-
pos defines the position of the legend, recognized values are "", "NE", "SE", "SW", and "NW"
◆ setMarkPosition()
| setMarkPosition | ( | string | pos = "" | ) |
setMarkPosition
- Parameters
-
pos defines the position of the watermark recognized values are "NE", "SE", "SW", and "NW"
◆ setMeshFeature()
| setMeshFeature | ( | string | feat | ) |
set mesh features to be drawn
- Parameters
-
feat describes the features. Admissible values are "ALL", "SURFACES", "OUTLINE"
◆ setPalettePosition()
| setPalettePosition | ( | string | pos = "" | ) |
setPalettePosition
- Parameters
-
pos defines palette position, recognized values are "", "NE", "SE", "SW", and "NW"
◆ setPaletteRange() [1/2]
|
virtual |
Sets minimum and maximum values of palette according to the algorithm defined by how.
- Parameters
-
how The string determining the algorithm for choosing the palette ranges. Accepted values are: - CURRENT
- RANGE
◆ setPaletteRange() [2/2]
| setPaletteRange | ( | number | xmin, |
| number | xmax | ||
| ) |
Sets minimum and maximum values of palette.
- Parameters
-
xmin Minimum value of palette xmax Maximum value of palette
◆ setPan()
| setPan | ( | float | x, |
| float | y | ||
| ) |
set the current pan values
- Parameters
-
x x value of pan y y value of pan
◆ setPerspective()
| setPerspective | ( | bool | persp | ) |
enable/disable perspective view
- Parameters
-
persp bool defining if perspective is enabled
◆ setPointSize()
| setPointSize | ( | float | size | ) |
set the size of points relative to model size
- Parameters
-
size the size of points
◆ setRotation()
| setRotation | ( | float | angle, |
| float | x, | ||
| float | y, | ||
| float | z | ||
| ) |
set current rotation expressed in angle/axis form
- Parameters
-
angle Angle of rotation x x-component of rotation axis y y-component of rotation axis z z-component of rotation axis
◆ setRulerVisibility()
| setRulerVisibility | ( | bool | on | ) |
changes visibility of the ruler
- Parameters
-
on if true, the the ruler will be shown
◆ setScale()
| setScale | ( | float | z | ) |
set scale factor
- Parameters
-
scale factor
◆ setSceneData() [1/3]
| setSceneData | ( | RenderData::DataType | type, |
| string | design, | ||
| string | quantity | ||
| ) |
a convenience function which assigns a constant contour plot to the active scene
- Parameters
-
type data type design design ident quantity quantity ident
◆ setSceneData() [2/3]
| setSceneData | ( | AllRenderData | render_data | ) |
assigns the visible data to the active scene
- Parameters
-
render_data the definition of the data to be rendered
◆ setSceneData() [3/3]
| setSceneData | ( | Matrix | inputs | ) |
changes the data of the input parameters for the currently set field data model and assigns them to the active scene
- Parameters
-
inputs the new values of the field data model.
◆ setSelection()
|
virtual |
Selects all elements of the active Scene within the rectangle defined by x, y, width and height given.
- Parameters
-
scene_widht The scene width the rectangle definition is based on. scene_height The scene height the rectangle definition is based on. x The x coordinate of the top-left rectangle corner wihthin the scene given. y The y coordinate of the top-left rectangle corner wihthin the scene given. width The width of the rectangle corner. height The height of the rectangle corner. add_selection True if the selection should be added to previously selected elements. False otherwise. max_selectable Limits the maximum amount of automatically selected entities within the rectangle given. show_label If set to true, selected items will be label. Otherwise selected items will be only highlighted by color
◆ setSize()
| setSize | ( | number | w, |
| number | h | ||
| ) |
setSize Sets the size of the active scene
- Parameters
-
w new width of the scene h new height of the scene
◆ setSlice()
| setSlice | ( | float | a, |
| float | b, | ||
| float | c, | ||
| float | d | ||
| ) |
Defines a slicing plane in the active scene, using the body coordinate system. The plane will be defined in Hessian normal form by normalizing the paramters $a$, $b$, $c$, and $d$ given Only points with coordinates satisfying $ax+by+cz+d > 0$ are shown, the rest is suppressed.
- Parameters
-
a coeffcient $a$ in the plane equation b coeffcient $b$ in the plane equation c coeffcient $c$ in the plane equation d coeffcient $d$ in the plane equation
- Note
- Refer to Wolfram: Plane for an explanation of the plane definition
◆ setSyncCamera()
| setSyncCamera | ( | bool | sync | ) |
defines if the scenes are synchronized in camera positioning
- Parameters
-
sync if true then the camera settings apply to all scenes, else only to the active scene
◆ setTetCoordinates()
| setTetCoordinates | ( | Matrix | coordinates | ) |
set coordinates of all tet vertices in the active scene
- Parameters
-
coordinates Matrix containing the coordinates, must have size (3,n) in which n is the number of vertices
◆ setZoom()
| setZoom | ( | float | z | ) |
set current zoom factor
- Parameters
-
current zoom factor
◆ size()
| number size | ( | ) |
- Returns
- the number of scenes
◆ syncCamera()
|
virtual |
Sets the camera and slicing settings of the active scene to all other scenes.
- Note
- An empty slicing plane means that the slicing plane shall be removed