9 #ifndef CMZN_SCENEPICKER_HPP__ 10 #define CMZN_SCENEPICKER_HPP__ 12 #include "opencmiss/zinc/scenepicker.h" 13 #include "opencmiss/zinc/element.hpp" 14 #include "opencmiss/zinc/fieldgroup.hpp" 15 #include "opencmiss/zinc/graphics.hpp" 16 #include "opencmiss/zinc/node.hpp" 17 #include "opencmiss/zinc/scene.hpp" 18 #include "opencmiss/zinc/scenefilter.hpp" 19 #include "opencmiss/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 107 double y1,
double x2,
double y2)
109 return cmzn_scenepicker_set_sceneviewer_rectangle(
110 id , sceneviewer.
getId(),
111 static_cast<cmzn_scenecoordinatesystem
>(scenecoordinatesystem),
122 return Element(cmzn_scenepicker_get_nearest_element(
id));
132 return Node(cmzn_scenepicker_get_nearest_node(
id));
143 return Graphics(cmzn_scenepicker_get_nearest_element_graphics(
id));
154 return Graphics(cmzn_scenepicker_get_nearest_node_graphics(
id));
164 return Graphics(cmzn_scenepicker_get_nearest_graphics(
id));
177 return cmzn_scenepicker_add_picked_elements_to_field_group(
id,
178 (reinterpret_cast<cmzn_field_group_id>(fieldGroup.
getId())));
191 return cmzn_scenepicker_add_picked_nodes_to_field_group(
id,
192 (reinterpret_cast<cmzn_field_group_id>(fieldGroup.
getId())));
202 return Scene(cmzn_scenepicker_get_scene(
id));
213 return cmzn_scenepicker_set_scene(
id, scene.
getId());
223 return Scenefilter(cmzn_scenepicker_get_scenefilter(
id));
235 return cmzn_scenepicker_set_scenefilter(
id, filter.
getId());
247 return cmzn_scenepicker_get_picking_volume_centre(
id, coordinateValuesOut3);
254 return Scenepicker(cmzn_scene_create_scenepicker(
id));
cmzn_sceneviewer_id getId() const
Definition: sceneviewer.hpp:448
Graphics getNearestNodeGraphics()
Definition: scenepicker.hpp:152
int setSceneviewerRectangle(const Sceneviewer &sceneviewer, Scenecoordinatesystem scenecoordinatesystem, double x1, double y1, double x2, double y2)
Definition: scenepicker.hpp:106
Graphics getNearestGraphics()
Definition: scenepicker.hpp:162
A single finite element from a mesh.
Definition: element.hpp:34
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
Scenepicker createScenepicker()
Definition: scenepicker.hpp:252
Scenecoordinatesystem
Definition: scenecoordinatesystem.hpp:26
Scene getScene()
Definition: scenepicker.hpp:200
Container/manager for graphics visualising a region.
Definition: scene.hpp:38
Scenefilter getScenefilter()
Definition: scenepicker.hpp:221
Base graphics type: produces 3-D graphics visualising domains and fields.
Definition: graphics.hpp:45
cmzn_field_id getId() const
Definition: field.hpp:103
int getPickingVolumeCentre(double *coordinateValuesOut3)
Definition: scenepicker.hpp:245
int addPickedNodesToFieldGroup(const FieldGroup &fieldGroup)
Definition: scenepicker.hpp:189
cmzn_scene_id getId() const
Definition: scene.hpp:90
Graphics getNearestElementGraphics()
Definition: scenepicker.hpp:141
int setScene(const Scene &scene)
Definition: scenepicker.hpp:211
A generic group field used for grouping local subobjects.
Definition: fieldgroup.hpp:35
The OpenCMISS namespace.
Definition: context.hpp:20
Point object used to represent finite element nodes.
Definition: node.hpp:34
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:260
Element getNearestElement()
Definition: scenepicker.hpp:120
int setScenefilter(const Scenefilter &filter)
Definition: scenepicker.hpp:233
Node getNearestNode()
Definition: scenepicker.hpp:130
int addPickedElementsToFieldGroup(const FieldGroup &fieldGroup)
Definition: scenepicker.hpp:175