9 #ifndef CMZN_SCENE_HPP__
10 #define CMZN_SCENE_HPP__
12 #include "zinc/scene.h"
13 #include "zinc/field.hpp"
14 #include "zinc/graphics.hpp"
15 #include "zinc/region.hpp"
16 #include "zinc/scenefilter.hpp"
17 #include "zinc/selection.hpp"
18 #include "zinc/timekeeper.hpp"
25 class Sceneviewermodule;
46 explicit Scene(cmzn_scene_id scene_id) : id(scene_id)
49 Scene(
const Scene& scene) : id(cmzn_scene_access(scene.id))
54 cmzn_scene_id temp_id = cmzn_scene_access(scene.id);
57 cmzn_scene_destroy(&
id);
67 cmzn_scene_destroy(&
id);
102 return cmzn_scene_begin_change(
id);
116 return cmzn_scene_end_change(
id);
145 const Field& coordinateField,
double lineDensity,
double lineDensityScaleFactor,
146 double surfaceDensity,
double surfaceDensityScaleFactor)
148 return cmzn_scene_convert_to_point_cloud(
id, filter.
getId(),
150 lineDensity, lineDensityScaleFactor,
151 surfaceDensity, surfaceDensityScaleFactor);
156 return Graphics(cmzn_scene_create_graphics(
id,
157 static_cast<cmzn_graphics_type>(graphicsType)));
250 return Graphics(cmzn_scene_find_graphics_by_name(
id, name));
260 return Graphics(cmzn_scene_get_first_graphics(
id));
271 return Graphics(cmzn_scene_get_next_graphics(
id, refGraphics.
getId()));
282 return Graphics(cmzn_scene_get_previous_graphics(
id, refGraphics.
getId()));
292 return cmzn_scene_get_number_of_graphics(
id);
302 return Region(cmzn_scene_get_region(
id));
312 return Fontmodule(cmzn_scene_get_fontmodule(
id));
324 return Glyphmodule(cmzn_scene_get_glyphmodule(
id));
399 return Field(cmzn_scene_get_selection_field(
id));
414 return cmzn_scene_set_selection_field(
id, selectionField.
getId());
438 int valuesCount,
double *minimumValuesOut,
double *maximumValuesOut)
440 return cmzn_scene_get_spectrum_data_range(
id, filter.
getId(),
441 spectrum.
getId(), valuesCount, minimumValuesOut, maximumValuesOut);
451 return cmzn_scene_get_visibility_flag(
id);
463 return cmzn_scene_set_visibility_flag(
id, visibilityFlag);
479 return cmzn_scene_move_graphics_before(
id, graphics.
getId(), refGraphics.
getId());
489 return cmzn_scene_remove_all_graphics(
id);
500 return cmzn_scene_remove_graphics(
id, graphics.
getId());
507 inline bool operator==(
const Scene& a,
const Scene& b)
509 return a.getId() == b.getId();
514 return Scene(cmzn_region_get_scene(
id));
519 return Scene(cmzn_graphics_get_scene(
id));
Graphics getFirstGraphics()
Definition: scene.hpp:258
Graphics getNextGraphics(const Graphics &refGraphics)
Definition: scene.hpp:269
cmzn_scenefilter_id getId() const
Definition: scenefilter.hpp:86
Lines visualise 1-D elements in the model.
Definition: graphics.hpp:796
int setVisibilityFlag(bool visibilityFlag)
Definition: scene.hpp:461
Materialmodule getMaterialmodule()
Definition: scene.hpp:335
Utility object for picking graphics and model objects.
Definition: scenepicker.hpp:32
int endChange()
Definition: scene.hpp:114
int removeGraphics(const Graphics &graphics)
Definition: scene.hpp:498
Surfaces visualise 2-D elements in the model.
Definition: graphics.hpp:964
Glyphmodule getGlyphmodule()
Definition: scene.hpp:322
Base field type: an abstraction of a mathematical field.
Definition: field.hpp:46
Module managing all fonts.
Definition: font.hpp:268
cmzn_nodeset_id getId() const
Definition: node.hpp:474
bool isValid() const
Definition: scene.hpp:76
Container/manager for graphics visualising a region.
Definition: scene.hpp:34
int getSpectrumDataRange(const Scenefilter &filter, const Spectrum &spectrum, int valuesCount, double *minimumValuesOut, double *maximumValuesOut)
Definition: scene.hpp:437
Points graphics visualise discrete locations in the model.
Definition: graphics.hpp:823
Tessellationmodule getTessellationmodule()
Definition: scene.hpp:376
Manages individual user notification of changes to the selection group.
Definition: selection.hpp:160
A hierarchical block/namespace owning domains and fields.
Definition: region.hpp:33
int setSelectionField(const Field &selectionField)
Definition: scene.hpp:412
Base graphics type: produces 3-D graphics visualising domains and fields.
Definition: graphics.hpp:45
cmzn_spectrum_id getId() const
Definition: spectrum.hpp:638
Module managing all scene filters.
Definition: scenefilter.hpp:308
GraphicsPoints createGraphicsPoints()
Definition: scene.hpp:191
int convertToPointCloud(const Scenefilter &filter, const Nodeset &nodeset, const Field &coordinateField, double lineDensity, double lineDensityScaleFactor, double surfaceDensity, double surfaceDensityScaleFactor)
Definition: scene.hpp:144
cmzn_field_id getId() const
Definition: field.hpp:98
bool getVisibilityFlag()
Definition: scene.hpp:449
GraphicsLines createGraphicsLines()
Definition: scene.hpp:178
Module object for creating and managing scene viewers.
Definition: sceneviewer.hpp:1086
Field getSelectionField()
Definition: scene.hpp:397
GraphicsContours createGraphicsContours()
Definition: scene.hpp:167
cmzn_scene_id getId() const
Definition: scene.hpp:86
GraphicsStreamlines createGraphicsStreamlines()
Definition: scene.hpp:201
Module managing all spectrums.
Definition: spectrum.hpp:847
Module managing all materials.
Definition: material.hpp:278
Zinc Spectrum maps values of graphics data fields to colours.
Definition: spectrum.hpp:581
Scene getScene()
Definition: scene.hpp:512
Module managing all glyphs.
Definition: glyph.hpp:602
int moveGraphicsBefore(const Graphics &graphics, const Graphics &refGraphics)
Definition: scene.hpp:477
Sceneviewermodule getSceneviewermodule()
Definition: sceneviewer.hpp:1158
Scenefiltermodule getScenefiltermodule()
Definition: scene.hpp:346
Graphics findGraphicsByName(const char *name)
Definition: scene.hpp:248
Fontmodule getFontmodule()
Definition: scene.hpp:310
Module managing all tessellation objects.
Definition: tessellation.hpp:247
Streamlines visualise the path of a fluid particle tracking along a vector field. ...
Definition: graphics.hpp:852
Spectrummodule getSpectrummodule()
Definition: scene.hpp:365
int removeAllGraphics()
Definition: scene.hpp:487
Module for finding and managing timekeepers.
Definition: timekeeper.hpp:222
Type
Definition: graphics.hpp:131
Scene filters determines which graphics are drawn.
Definition: scenefilter.hpp:33
Timekeepermodule getTimekeepermodule()
Definition: scene.hpp:387
int beginChange()
Definition: scene.hpp:100
The contours derived graphics type.
Definition: graphics.hpp:663
Scene getScene()
Definition: scene.hpp:517
cmzn_graphics_id getId() const
Definition: graphics.hpp:153
Region getRegion() const
Definition: scene.hpp:300
Graphics getPreviousGraphics(const Graphics &refGraphics)
Definition: scene.hpp:280
Selectionnotifier createSelectionnotifier()
Definition: scene.hpp:225
int getNumberOfGraphics()
Definition: scene.hpp:290
A set of nodes or points.
Definition: node.hpp:421
GraphicsSurfaces createGraphicsSurfaces()
Definition: scene.hpp:212