9 #ifndef CMZN_SCENEPICKER_HPP__
10 #define CMZN_SCENEPICKER_HPP__
12 #include "zinc/scenepicker.h"
13 #include "zinc/element.hpp"
14 #include "zinc/fieldgroup.hpp"
15 #include "zinc/graphics.hpp"
16 #include "zinc/node.hpp"
17 #include "zinc/scene.hpp"
18 #include "zinc/scenefilter.hpp"
19 #include "zinc/sceneviewer.hpp"
35 cmzn_scenepicker_id id;
43 explicit Scenepicker(cmzn_scenepicker_id in_scenepicker_id) :
48 id(cmzn_scenepicker_access(scenepicker.id))
53 cmzn_scenepicker_id temp_id = cmzn_scenepicker_access(scenepicker.id);
56 cmzn_scenepicker_destroy(&
id);
66 cmzn_scenepicker_destroy(&
id);
85 cmzn_scenepicker_id
getId()
const
103 double y1,
double x2,
double y2)
105 return cmzn_scenepicker_set_sceneviewer_rectangle(
106 id , sceneviewer.
getId(),
107 static_cast<cmzn_scenecoordinatesystem
>(coordinateSystem),
118 return Element(cmzn_scenepicker_get_nearest_element(
id));
128 return Node(cmzn_scenepicker_get_nearest_node(
id));
139 return Graphics(cmzn_scenepicker_get_nearest_element_graphics(
id));
150 return Graphics(cmzn_scenepicker_get_nearest_node_graphics(
id));
160 return Graphics(cmzn_scenepicker_get_nearest_graphics(
id));
173 return cmzn_scenepicker_add_picked_elements_to_field_group(
id,
174 (reinterpret_cast<cmzn_field_group_id>(fieldGroup.
getId())));
187 return cmzn_scenepicker_add_picked_nodes_to_field_group(
id,
188 (reinterpret_cast<cmzn_field_group_id>(fieldGroup.
getId())));
198 return Scene(cmzn_scenepicker_get_scene(
id));
209 return cmzn_scenepicker_set_scene(
id, scene.
getId());
219 return Scenefilter(cmzn_scenepicker_get_scenefilter(
id));
231 return cmzn_scenepicker_set_scenefilter(
id, filter.
getId());
236 inline Scenepicker Scene::createScenepicker()
238 return Scenepicker(cmzn_scene_create_scenepicker(
id));
cmzn_sceneviewer_id getId() const
Definition: sceneviewer.hpp:449
Graphics getNearestNodeGraphics()
Definition: scenepicker.hpp:148
Graphics getNearestGraphics()
Definition: scenepicker.hpp:158
A single finite element from a mesh.
Definition: element.hpp:205
cmzn_scenefilter_id getId() const
Definition: scenefilter.hpp:86
Utility object for picking graphics and model objects.
Definition: scenepicker.hpp:32
cmzn_scenepicker_id getId() const
Definition: scenepicker.hpp:85
Scenecoordinatesystem
Definition: scenecoordinatesystem.hpp:26
Scene getScene()
Definition: scenepicker.hpp:196
Container/manager for graphics visualising a region.
Definition: scene.hpp:34
Scenefilter getScenefilter()
Definition: scenepicker.hpp:217
Base graphics type: produces 3-D graphics visualising domains and fields.
Definition: graphics.hpp:45
cmzn_field_id getId() const
Definition: field.hpp:98
int addPickedNodesToFieldGroup(const FieldGroup &fieldGroup)
Definition: scenepicker.hpp:185
cmzn_scene_id getId() const
Definition: scene.hpp:86
Graphics getNearestElementGraphics()
Definition: scenepicker.hpp:137
int setScene(const Scene &scene)
Definition: scenepicker.hpp:207
A generic group field used for grouping local subobjects.
Definition: fieldgroup.hpp:35
Point object used to represent finite element nodes.
Definition: node.hpp:37
Scene filters determines which graphics are drawn.
Definition: scenefilter.hpp:33
bool isValid() const
Definition: scenepicker.hpp:75
The Zinc sceneviewer is responsible for rendering the graphical Scene.
Definition: sceneviewer.hpp:261
int setSceneviewerRectangle(const Sceneviewer &sceneviewer, Scenecoordinatesystem coordinateSystem, double x1, double y1, double x2, double y2)
Definition: scenepicker.hpp:102
Element getNearestElement()
Definition: scenepicker.hpp:116
int setScenefilter(const Scenefilter &filter)
Definition: scenepicker.hpp:229
Node getNearestNode()
Definition: scenepicker.hpp:126
int addPickedElementsToFieldGroup(const FieldGroup &fieldGroup)
Definition: scenepicker.hpp:171