9 #ifndef CMZN_SCENE_HPP__ 10 #define CMZN_SCENE_HPP__ 12 #include "opencmiss/zinc/scene.h" 13 #include "opencmiss/zinc/field.hpp" 14 #include "opencmiss/zinc/graphics.hpp" 15 #include "opencmiss/zinc/light.hpp" 16 #include "opencmiss/zinc/nodeset.hpp" 17 #include "opencmiss/zinc/region.hpp" 18 #include "opencmiss/zinc/scenefilter.hpp" 19 #include "opencmiss/zinc/selection.hpp" 20 #include "opencmiss/zinc/spectrum.hpp" 21 #include "opencmiss/zinc/timekeeper.hpp" 28 class StreaminformationScene;
29 class Sceneviewermodule;
50 explicit Scene(cmzn_scene_id scene_id) : id(scene_id)
53 Scene(
const Scene& scene) : id(cmzn_scene_access(scene.id))
58 cmzn_scene_id temp_id = cmzn_scene_access(scene.id);
61 cmzn_scene_destroy(&
id);
71 cmzn_scene_destroy(&
id);
106 return cmzn_scene_begin_change(
id);
120 return cmzn_scene_end_change(
id);
149 const Field& coordinateField,
double lineDensity,
double lineDensityScaleFactor,
150 double surfaceDensity,
double surfaceDensityScaleFactor)
152 return cmzn_scene_convert_to_point_cloud(
id, filter.
getId(),
154 lineDensity, lineDensityScaleFactor,
155 surfaceDensity, surfaceDensityScaleFactor);
173 const Field& coordinateField)
175 return cmzn_scene_convert_points_to_nodes(
id, filter.
getId(),
187 return Graphics(cmzn_scene_create_graphics(
id,
188 static_cast<cmzn_graphics_type>(graphicsType)));
281 return Graphics(cmzn_scene_find_graphics_by_name(
id, name));
297 double *maximumValuesOut3)
299 return cmzn_scene_get_coordinates_range(
id, filter.
getId(),
300 minimumValuesOut3, maximumValuesOut3);
310 return Graphics(cmzn_scene_get_first_graphics(
id));
321 return Graphics(cmzn_scene_get_next_graphics(
id, refGraphics.
getId()));
332 return Graphics(cmzn_scene_get_previous_graphics(
id, refGraphics.
getId()));
342 return cmzn_scene_get_number_of_graphics(
id);
352 return Region(cmzn_scene_get_region(
id));
362 return Fontmodule(cmzn_scene_get_fontmodule(
id));
374 return Glyphmodule(cmzn_scene_get_glyphmodule(
id));
386 return Lightmodule(cmzn_scene_get_lightmodule(
id));
461 return Field(cmzn_scene_get_selection_field(
id));
476 return cmzn_scene_set_selection_field(
id, selectionField.
getId());
500 int valuesCount,
double *minimumValuesOut,
double *maximumValuesOut)
502 return cmzn_scene_get_spectrum_data_range(
id, filter.
getId(),
503 spectrum.
getId(), valuesCount, minimumValuesOut, maximumValuesOut);
513 return cmzn_scene_clear_transformation(
id);
523 return cmzn_scene_has_transformation(
id);
536 return Field(cmzn_scene_get_transformation_field(
id));
557 return cmzn_scene_set_transformation_field(
id, transformationField.
getId());
576 return cmzn_scene_get_transformation_matrix(this->
getId(), valuesOut16);
604 return cmzn_scene_set_transformation_matrix(this->
getId(), valuesIn16);
614 return cmzn_scene_get_visibility_flag(
id);
626 return cmzn_scene_set_visibility_flag(
id, visibilityFlag);
642 return cmzn_scene_move_graphics_before(
id, graphics.
getId(), refGraphics.
getId());
652 return cmzn_scene_remove_all_graphics(
id);
663 return cmzn_scene_remove_graphics(
id, graphics.
getId());
674 return cmzn_scene_write_description(
id);
688 return cmzn_scene_read_description(
id, description, overwrite);
732 inline bool operator==(
const Scene& a,
const Scene& b)
739 return Scene(cmzn_region_get_scene(
id));
744 return Scene(cmzn_graphics_get_scene(
id));
749 return cmzn_spectrum_autorange(
id, scene.
getId(), scenefilter.
getId());
Graphics getFirstGraphics()
Definition: scene.hpp:308
int autorange(const Scene &scene, const Scenefilter &scenefilter)
Definition: scene.hpp:747
Graphics getNextGraphics(const Graphics &refGraphics)
Definition: scene.hpp:319
cmzn_scenefilter_id getId() const
Definition: scenefilter.hpp:86
Lines visualise 1-D elements in the model.
Definition: graphics.hpp:848
int setVisibilityFlag(bool visibilityFlag)
Definition: scene.hpp:624
Materialmodule getMaterialmodule()
Definition: scene.hpp:397
Utility object for picking graphics and model objects.
Definition: scenepicker.hpp:32
int endChange()
Definition: scene.hpp:118
Module managing all light objects.
Definition: light.hpp:484
int removeGraphics(const Graphics &graphics)
Definition: scene.hpp:661
Surfaces visualise 2-D elements in the model.
Definition: graphics.hpp:1067
Scenepicker createScenepicker()
Definition: scenepicker.hpp:252
Glyphmodule getGlyphmodule()
Definition: scene.hpp:372
Base field type: an abstraction of a mathematical field.
Definition: field.hpp:51
Graphics createGraphics(Graphics::Type graphicsType)
Definition: scene.hpp:185
int readDescription(const char *description, bool overwrite)
Definition: scene.hpp:686
Module managing all fonts.
Definition: font.hpp:273
cmzn_nodeset_id getId() const
Definition: nodeset.hpp:82
bool isValid() const
Definition: scene.hpp:80
Container/manager for graphics visualising a region.
Definition: scene.hpp:38
int getSpectrumDataRange(const Scenefilter &filter, const Spectrum &spectrum, int valuesCount, double *minimumValuesOut, double *maximumValuesOut)
Definition: scene.hpp:499
Points graphics visualise discrete locations in the model.
Definition: graphics.hpp:875
Lightmodule getLightmodule()
Definition: scene.hpp:384
Tessellationmodule getTessellationmodule()
Definition: scene.hpp:438
char * writeDescription()
Definition: scene.hpp:672
Manages individual user notification of changes to the selection group.
Definition: selection.hpp:158
A hierarchical block/namespace owning domains and fields.
Definition: region.hpp:33
int setSelectionField(const Field &selectionField)
Definition: scene.hpp:474
Base graphics type: produces 3-D graphics visualising domains and fields.
Definition: graphics.hpp:45
cmzn_spectrum_id getId() const
Definition: spectrum.hpp:741
Module managing all scene filters.
Definition: scenefilter.hpp:313
GraphicsPoints createGraphicsPoints()
Definition: scene.hpp:222
int convertToPointCloud(const Scenefilter &filter, const Nodeset &nodeset, const Field &coordinateField, double lineDensity, double lineDensityScaleFactor, double surfaceDensity, double surfaceDensityScaleFactor)
Definition: scene.hpp:148
cmzn_field_id getId() const
Definition: field.hpp:103
Field getTransformationField() const
Definition: scene.hpp:534
bool getVisibilityFlag()
Definition: scene.hpp:612
int setTransformationField(const Field &transformationField)
Definition: scene.hpp:555
GraphicsLines createGraphicsLines()
Definition: scene.hpp:209
int setTransformationMatrix(const double *valuesIn16)
Definition: scene.hpp:602
Module object for creating and managing scene viewers.
Definition: sceneviewer.hpp:1271
Field getSelectionField()
Definition: scene.hpp:459
GraphicsContours createGraphicsContours()
Definition: scene.hpp:198
cmzn_scene_id getId() const
Definition: scene.hpp:90
int read(const StreaminformationScene &streaminformationScene)
Definition: streamscene.hpp:324
GraphicsStreamlines createGraphicsStreamlines()
Definition: scene.hpp:232
Module managing all spectrums.
Definition: spectrum.hpp:1037
Module managing all materials.
Definition: material.hpp:350
Zinc Spectrum maps values of graphics data fields to colours.
Definition: spectrum.hpp:656
Scene getScene()
Definition: scene.hpp:737
Module managing all glyphs.
Definition: glyph.hpp:714
int moveGraphicsBefore(const Graphics &graphics, const Graphics &refGraphics)
Definition: scene.hpp:640
Sceneviewermodule getSceneviewermodule()
Definition: sceneviewer.hpp:1414
int write(const StreaminformationScene &streaminformationScene)
Definition: streamscene.hpp:319
Scenefiltermodule getScenefiltermodule()
Definition: scene.hpp:408
Graphics findGraphicsByName(const char *name)
Definition: scene.hpp:279
Fontmodule getFontmodule()
Definition: scene.hpp:360
Module managing all tessellation objects.
Definition: tessellation.hpp:354
Streamlines visualise the path of a fluid particle tracking along a vector field. ...
Definition: graphics.hpp:904
Spectrummodule getSpectrummodule()
Definition: scene.hpp:427
bool hasTransformation() const
Definition: scene.hpp:521
int removeAllGraphics()
Definition: scene.hpp:650
Module for finding and managing timekeepers.
Definition: timekeeper.hpp:222
int convertPointsToNodes(const Scenefilter &filter, const Nodeset &nodeset, const Field &coordinateField)
Definition: scene.hpp:172
Type
Definition: graphics.hpp:131
The OpenCMISS namespace.
Definition: context.hpp:20
int getCoordinatesRange(const Scenefilter &filter, double *minimumValuesOut3, double *maximumValuesOut3)
Definition: scene.hpp:296
int getTransformationMatrix(double *valuesOut16) const
Definition: scene.hpp:574
StreaminformationScene createStreaminformationScene()
Definition: streamscene.hpp:313
Scene filters determines which graphics are drawn.
Definition: scenefilter.hpp:33
Timekeepermodule getTimekeepermodule()
Definition: scene.hpp:449
int beginChange()
Definition: scene.hpp:104
The contours derived graphics type.
Definition: graphics.hpp:708
Scene getScene()
Definition: scene.hpp:742
cmzn_graphics_id getId() const
Definition: graphics.hpp:153
Region getRegion() const
Definition: scene.hpp:350
Graphics getPreviousGraphics(const Graphics &refGraphics)
Definition: scene.hpp:330
Selectionnotifier createSelectionnotifier()
Definition: scene.hpp:256
int getNumberOfGraphics()
Definition: scene.hpp:340
A set of nodes or points.
Definition: nodeset.hpp:29
GraphicsSurfaces createGraphicsSurfaces()
Definition: scene.hpp:243
int clearTransformation()
Definition: scene.hpp:511