OpenCMISS-Zinc C++ API Documentation
|
Container/manager for graphics visualising a region. More...
#include <scene.hpp>
Protected Attributes | |
cmzn_scene_id | id |
Container/manager for graphics visualising a region.
Container/manager for the graphics making up the visualisation of the region's domains and fields.
|
inline |
Use this function before making multiple changes on the scene, this will stop scene from executing any immediate changes made in scene. After multiple changes have been made, call the scene end change method to notify clients of changes made up to that point. Can be nested.
|
inline |
Clear transformation field or matrix in scene.
|
inline |
Creates nodal points in the supplied nodeset sampled points that are in the scene tree (filtered by the optional filter), i.e. including all its descendents. Points/nodes are created with the next available identifier.
filter | The filter determining which graphics from the scene tree are converted. If not supplied then all graphics are converted. |
nodeset | The nodeset to add nodes to. |
coordinateField | The coordinate field to be defined and assigned on the new nodes. Must be from the same region as the nodeset. |
|
inline |
Creates a cloud of points (nodes) in the supplied nodeset sampled at random locations according to a Poisson distribution on the lines and surfaces that are in the scene tree (filtered by the optional filter), i.e. including all its descendents. Points/nodes are created with the next available identifier. The density of points is set by supplied arguments and may be scaled by data values stored in each graphics.
filter | The filter determining which graphics from the scene tree are converted. If not supplied then all graphics are converted. |
nodeset | The nodeset to add nodes to. |
coordinateField | The coordinate field to be defined and assigned on the new nodes. Must be from the same region as the nodeset. |
lineDensity | The expected number of points per unit length for lines. |
lineDensity_scale_factor | If a lines graphics has a data field the mean value of its first component multiplied by this factor is added to the expected value. |
surfaceDensity | The expected number of points per unit area of surfaces. |
surfaceDensity_scale_factor | If a surfaces graphics has a data field the mean value of its first component multiplied by this factor is added to the expected value. |
|
inline |
Create a graphics of the given type in the scene.
graphicsType | Enumerator for a specific graphics type. |
|
inline |
Create a contours graphics in the scene. Contours create graphics showing where the isoscalar field has fixed value(s): iso-surfaces for 3-D domains, iso-lines for 2-D domains.
|
inline |
Create a lines graphics in the scene. Used to visualise 1-D elements and lines/faces of elements.
|
inline |
Create a points graphics in the scene. Used to visualise static points, nodes, data and sampled element points. Must set the domain type after creation.
|
inline |
Create a streamlines graphics in the scene.
|
inline |
Create a surfaces graphics in the scene. Used to visualise 2-D elements and faces.
|
inline |
Create a scene picker which user can use to define a picking volume and find the onjects included in this volume.
|
inline |
Return a handle to selection notifier for this scene. User can add and remove callback functions from the selection notifier. The callback functions will be called when selection on the scene has changed. Please see selection.h for more details.
|
inline |
Creates a stream information object for specifying files/resources and options for writing scene data from a scene.
|
inline |
Call the scene begin change method before making multiple changes on the scene, to stop the scene from notifying clients of every change. After changes have been made, call this method to restart notifications and notify clients of changes made since calling begin change.
|
inline |
Returns the graphics of the specified name from the scene. Beware that graphics in the same scene may have the same name and this function will only return the first graphics found with the specified name;
scene | Scene in which to find the graphics. |
name | The name of the graphics to find. |
name | The name of the graphics to find. |
|
inline |
Get the range of world coordinates spanned by graphics in the scene and its sub-scenes, including application of scene transformation matrices.
filter | Optional filter on which graphics to get range from. If omitted, then all graphics within the scene tree contribute. |
minimumValuesOut3 | Array of size 3 to receive the minimum coordinates. |
maximumValuesOut3 | Array of size 3 to receive the maximum coordinates. |
|
inline |
Get the first graphics on the graphics list of <scene>.
|
inline |
Get the font module which manages fonts for rendering text in graphics.
|
inline |
Get the glyph module which stores static graphics for visualising points, vectors, axes etc. Note on startup no glyphs are defined and glyph module functions need to be called to define standard glyphs.
|
inline |
|
inline |
Return the light module which manages light used to control lighting of the scene. Note on startup only light "default" and "default_ambient" are defined. Additional custom lights can be defined using light module functions.
|
inline |
Return the material module which manages materials used to colour, texture and shade graphics. Note on startup only materials "default" and "default_selected" are defined, as white and red, respectively. Additional standard and custom materials can be defined using material module functions.
Get the next graphics after <ref_graphics> on the graphics list of <scene>.
refGraphics | Handle to a graphics object. |
|
inline |
Returns the number of graphics in <scene>.
Get the graphics before <ref_graphics> on the graphics list of <scene>.
refGraphics | Handle to a graphics object. |
|
inline |
Gets the region this scene visualises.
|
inline |
Get the scene filter module which manages scenefilter objects for filtering contents of scenes with scenepicker and sceneviewer etc.
|
inline |
Returns a handle to a sceneviewer module which manages sceneviewer objects for rendering 3-D scenes into rectangular windows or canvases using OpenGL.
|
inline |
Get the selection field for the scene, if any.
|
inline |
Get the range of graphics data field values rendered with the spectrum. Search is limited to the scene and its sub-scenes with an optional filter. Spectrum colour bar glyphs do not contribute to the range.
filter | Optional filter on which graphics to get data range from. If omitted, then all graphics within the scene tree contribute. |
spectrum | The spectrum to get the range for. Only data for graphics using this spectrum contribute to the range. |
valuesCount | The number of data values to get the minimum and maximum range for, at least 1. |
minimumValuesOut | Array to receive the data value minimums. Must be at least as large as valuesCount. |
maximumValuesOut | Array to receive the data value maximums. Must be at least as large as valuesCount. |
|
inline |
Get the spectrum module which manages spectrum objects controlling how graphics data fields are converted into colours.
|
inline |
Get the tessellation module which manages objects controlling how curves are approximated by line segments in graphics.
|
inline |
Get the timekeeper module which manages objects for synchronising time across zinc objects.
|
inline |
Get optional field providing the 4x4 transformation of the scene local coordinates into the parent scene local coordinate system, or world coordinate system if scene is for the root region.
|
inline |
Get 4x4 transformation matrix of the scene local coordinates into the parent scene local coordinate system, or world coordinate system if scene is for the root region. If a transformation field is active, calculates the current transformation matrix from the field, or returns an error if the field cannot be evaluated. If no transformation is active this function returns the 4x4 identity matrix.
valuesOut16 | An array large enough to fill with the 16 components of the transformation matrix. |
|
inline |
Returns the state of the scene's visibility flag.
|
inline |
Query whether scene has either a transformation field or matrix active.
|
inline |
Check if this is a valid Scene object.
|
inline |
Move a graphics to the position before ref_graphics in the scene's graphics list, or last in the list if no reference graphics supplied. Earlier graphics are drawn first and in hardware rendering their pixel fragments are displayed in priority over later graphics at the same depth.
graphics | The graphics to be moved. Must be from scene. |
refGraphics | Another graphics from this scene to insert before, or NULL to move graphics to last position in list. |
|
inline |
Import graphics data to scene described in the stream information object.
streaminformationScene | Handle to the stream information scene containing stream resources. |
|
inline |
Read the json description to the scene and graphics. This will change the settings in scene and its graphics.
The string containing json description old graphics will be replaced when set to true or new graphics will be added to the existing graphics when set to false
|
inline |
Removes all graphics from the scene.
|
inline |
Removes a graphics from scene and decrements the position of all subsequent graphics.
graphics | The graphics to be removed. |
|
inline |
Set the field giving selection and highlighting in the scene. Currently restricted to 'field_group' type fields. This function will also set the selection field for all of its subregion scenes if the a corresponding subregion field_group exists, otherwise the selection group of the child scene will be set to NULL.
selectionField | Group field to be used as the selection. |
|
inline |
Set optional field providing the 4x4 transformation of the scene local coordinates into the parent scene local coordinate system, or world coordinate system if scene is for the root region. Overrides any current scene transformation matrix.
transformationField | A 16 component field whose values give a 4x4 transformation of homogeneous coordinates, or NULL/invalid to clear transformation. This field must be spatially constant, but it may be time-varying in which case scene redraws are automatically triggered when the time changes. Runtime errors will be reported if this field cannot be evaluated given only the current timekeeper time. Field must belong to this scene's owning region. |
|
inline |
Set fixed 4x4 transformation matrix of the scene local coordinates into the parent scene local coordinate system, or world coordinate system if scene is for the root region. Clears any current scene transformation field.
The 16 components give the following matrix transformation:
|x.out| = | c01 c02 c03 c04 | |x.in| |y.out| = | c05 c05 c07 c08 | |y.in| |z.out| = | c09 c10 c11 c12 | |z.in| |h.out| = | c13 c14 c15 c16 | |h.in|
where 'in' coordinates are local coordinates in the scene, and 'out' coordinates are in the parent local or world coordinate system. Homogeneous coordinates are used after division by the h component which gives a perspective effect if not equal to 1. Typical no-perspective usage uses h.in=1 and the bottom row 0 0 0 1 so h.out=1, hence c04, c08, c12 give displacement and the upper-left 3x3 matrix defines basis vectors of local coordinates in terms of parent coordinates.
valuesIn16 | An array of 16 values giving the 4x4 transformation matrix. |
|
inline |
Set the state of the scene's visibility flag. Note this only affects visibility of graphics when a scene filter is acting on it.
visibilityFlag | Boolean true to set, false to clear. |
|
inline |
Writes graphics data in scene to stream resource objects described in the stream information object.
streaminformationScene | Handle to the stream information scene containing information about resources to write to. |
|
inline |
Write the json file describing the scene and its graphics, which can be used to store the current scene settings.