9 #ifndef CMZN_SCENEVIEWER_HPP__
10 #define CMZN_SCENEVIEWER_HPP__
12 #include "zinc/sceneviewer.h"
13 #include "zinc/context.hpp"
14 #include "zinc/scene.hpp"
15 #include "zinc/scenefilter.hpp"
22 class Sceneviewerinput;
33 cmzn_sceneviewerevent_id id;
41 explicit Sceneviewerevent(cmzn_sceneviewerevent_id in_sceneviewer_event_id) :
42 id(in_sceneviewer_event_id)
46 id(cmzn_sceneviewerevent_access(sceneviewerEvent.id))
72 cmzn_sceneviewerevent_id temp_id = cmzn_sceneviewerevent_access(sceneviewerEvent.id);
75 cmzn_sceneviewerevent_destroy(&
id);
85 cmzn_sceneviewerevent_destroy(&
id);
104 cmzn_sceneviewerevent_id
getId()
const
120 return static_cast<ChangeFlag>(cmzn_sceneviewerevent_get_change_flags(
id));
140 static void C_callback(cmzn_sceneviewerevent_id sceneviewerevent_id,
void *callbackVoid)
142 Sceneviewerevent sceneviewerevent(cmzn_sceneviewerevent_access(sceneviewerevent_id));
144 (*callback)(sceneviewerevent);
166 cmzn_sceneviewernotifier_id id;
175 id(in_sceneviewernotifier_id)
179 id(cmzn_sceneviewernotifier_access(sceneviewerNotifier.id))
184 cmzn_sceneviewernotifier_id temp_id = cmzn_sceneviewernotifier_access(sceneviewerNotifier.id);
187 cmzn_sceneviewernotifier_destroy(&
id);
197 cmzn_sceneviewernotifier_destroy(&
id);
216 cmzn_sceneviewernotifier_id
getId()
const
233 return cmzn_sceneviewernotifier_set_callback(
234 id, callback.C_callback, static_cast<void*>(&callback));
245 return cmzn_sceneviewernotifier_clear_callback(
id);
264 cmzn_sceneviewer_id id;
407 explicit Sceneviewer(cmzn_sceneviewer_id in_sceneviewer_id) :
408 id(in_sceneviewer_id)
411 Sceneviewer(
const Sceneviewer& sceneviewermodule) :
412 id(cmzn_sceneviewer_access(sceneviewermodule.id))
415 Sceneviewer& operator=(
const Sceneviewer& sceneviewer)
417 cmzn_sceneviewer_id temp_id = cmzn_sceneviewer_access(sceneviewer.id);
420 cmzn_sceneviewer_destroy(&
id);
430 cmzn_sceneviewer_destroy(&
id);
465 return cmzn_sceneviewer_begin_change(
id);
480 return cmzn_sceneviewer_end_change(
id);
488 return cmzn_sceneviewer_render_scene(
id);
501 return cmzn_sceneviewer_set_scene(
id, scene.
getId());
511 return Scene(cmzn_sceneviewer_get_scene(
id));
524 return cmzn_sceneviewer_set_scenefilter(
id, scenefilter.
getId());
534 return Scenefilter(cmzn_sceneviewer_get_scenefilter(
id));
542 return cmzn_sceneviewer_set_viewport_size(
id, width, height);
570 return cmzn_sceneviewer_get_antialias_sampling(
id);
582 return cmzn_sceneviewer_set_antialias_sampling(
id, numberOfSamples);
593 return cmzn_sceneviewer_get_eye_position(
id, eyeValuesOut3);
604 return cmzn_sceneviewer_set_eye_position(
id, eyeValuesIn3);
616 return static_cast<InteractMode>(cmzn_sceneviewer_get_interact_mode(
id));
628 return cmzn_sceneviewer_set_interact_mode(
id,
629 static_cast<cmzn_sceneviewer_interact_mode>(interactMode));
640 return cmzn_sceneviewer_get_lookat_position(
id, lookatValuesOut3);
651 return cmzn_sceneviewer_set_lookat_position(
id, lookatValuesIn3);
662 return cmzn_sceneviewer_get_perturb_lines_flag(
id);
675 return cmzn_sceneviewer_set_perturb_lines_flag(
id, value);
685 return static_cast<ProjectionMode>(cmzn_sceneviewer_get_projection_mode(
id));
696 return cmzn_sceneviewer_set_projection_mode(
id,
697 static_cast<cmzn_sceneviewer_projection_mode>(projectionMode));
708 return cmzn_sceneviewer_get_translation_rate(
id);
720 return cmzn_sceneviewer_set_translation_rate(
id, translationRate);
731 return cmzn_sceneviewer_get_tumble_rate(
id);
743 return cmzn_sceneviewer_set_tumble_rate(
id, tumbleRate);
754 return cmzn_sceneviewer_get_zoom_rate(
id);
766 return cmzn_sceneviewer_set_zoom_rate(
id, zoomRate);
777 return cmzn_sceneviewer_get_up_vector(
id, upVectorValuesOut3);
789 return cmzn_sceneviewer_set_up_vector(
id, upVectorValuesIn3);
806 return cmzn_sceneviewer_get_lookat_parameters(
id,
807 eyeValuesOut3, lookatValuesOut3, upVectorValuesOut3);
827 return cmzn_sceneviewer_set_lookat_parameters_non_skew(
id,
828 eyeValuesIn3, lookatValuesIn3, upVectorValuesIn3);
835 double *near_plane,
double *far_plane)
837 return cmzn_sceneviewer_get_viewing_volume(
id, left, right, bottom, top,
838 near_plane, far_plane);
852 double near_plane,
double far_plane)
854 return cmzn_sceneviewer_set_viewing_volume(
id, left, right, bottom, top,
855 near_plane, far_plane);
869 return cmzn_sceneviewer_set_background_colour_component_rgb(
id, red, green, blue);
882 return cmzn_sceneviewer_set_background_colour_rgb(
id, valuesIn3);
894 return cmzn_sceneviewer_get_background_colour_rgb(
id, valuesOut3);
905 return cmzn_sceneviewer_view_all(
id);
926 return static_cast<TransparencyMode>(cmzn_sceneviewer_get_transparency_mode(
id));
943 return cmzn_sceneviewer_set_transparency_mode(
id,
944 static_cast<cmzn_sceneviewer_transparency_mode>(transparencyMode));
958 return cmzn_sceneviewer_get_transparency_layers(
id);
974 return cmzn_sceneviewer_set_transparency_layers(
id, layers);
986 return cmzn_sceneviewer_get_view_angle(
id);
999 return cmzn_sceneviewer_set_view_angle(
id, viewAngle);
1010 return static_cast<ViewportMode>(cmzn_sceneviewer_get_viewport_mode(
id));
1021 return cmzn_sceneviewer_set_viewport_mode(
id,
1022 static_cast<cmzn_sceneviewer_viewport_mode>(viewportMode));
1033 return cmzn_sceneviewer_get_far_clipping_plane(
id);
1044 return cmzn_sceneviewer_get_near_clipping_plane(
id);
1055 return cmzn_sceneviewer_set_far_clipping_plane(
id, farClippingPlane);
1066 return cmzn_sceneviewer_set_near_clipping_plane(
id, nearClippingPlane);
1089 cmzn_sceneviewermodule_id id;
1098 id(in_sceneviewermodule_id)
1102 id(cmzn_sceneviewermodule_access(sceneviewermodule.id))
1107 cmzn_sceneviewermodule_id temp_id = cmzn_sceneviewermodule_access(sceneviewermodule.id);
1110 cmzn_sceneviewermodule_destroy(&
id);
1120 cmzn_sceneviewermodule_destroy(&
id);
1146 return Sceneviewer(cmzn_sceneviewermodule_create_sceneviewer(
id,
1147 static_cast<cmzn_sceneviewer_buffering_mode>(buffering_mode),
1148 static_cast<cmzn_sceneviewer_stereo_mode>(stereo_mode)));
Scenefilter getScenefilter()
Definition: sceneviewer.hpp:532
cmzn_sceneviewer_id getId() const
Definition: sceneviewer.hpp:449
bool isValid() const
Definition: sceneviewer.hpp:94
int setFarClippingPlane(double farClippingPlane)
Definition: sceneviewer.hpp:1053
double getViewAngle()
Definition: sceneviewer.hpp:984
int setScene(const Scene &scene)
Definition: sceneviewer.hpp:499
Definition: sceneviewer.hpp:390
Definition: sceneviewer.hpp:281
cmzn_scenefilter_id getId() const
Definition: scenefilter.hpp:86
int setViewportMode(ViewportMode viewportMode)
Definition: sceneviewer.hpp:1019
int ChangeFlags
Definition: sceneviewer.hpp:68
Definition: sceneviewer.hpp:283
TransparencyMode getTransparencyMode()
Definition: sceneviewer.hpp:924
Definition: sceneviewer.hpp:313
Definition: sceneviewer.hpp:392
int setAntialiasSampling(int numberOfSamples)
Definition: sceneviewer.hpp:580
Definition: sceneviewer.hpp:60
int renderScene()
Definition: sceneviewer.hpp:486
Definition: sceneviewer.hpp:348
int endChange()
Definition: sceneviewer.hpp:478
Definition: sceneviewer.hpp:359
Definition: sceneviewer.hpp:366
Definition: sceneviewer.hpp:346
Container/manager for graphics visualising a region.
Definition: scene.hpp:34
TransparencyMode
Definition: sceneviewer.hpp:357
Definition: sceneviewer.hpp:361
Sceneviewerinput createSceneviewerinput()
Definition: sceneviewerinput.hpp:194
Definition: sceneviewer.hpp:289
int setTumbleRate(double tumbleRate)
Definition: sceneviewer.hpp:741
bool isValid() const
Definition: sceneviewer.hpp:439
int setProjectionMode(ProjectionMode projectionMode)
Definition: sceneviewer.hpp:694
Definition: sceneviewer.hpp:311
Definition: sceneviewer.hpp:54
ViewportMode
Definition: sceneviewer.hpp:388
Definition: sceneviewer.hpp:350
int setTransparencyMode(TransparencyMode transparencyMode)
Definition: sceneviewer.hpp:941
int processSceneviewerinput(const Sceneviewerinput &input)
Definition: sceneviewerinput.hpp:199
bool isValid() const
Definition: sceneviewer.hpp:1129
Definition: sceneviewer.hpp:332
int setViewportSize(int width, int height)
Definition: sceneviewer.hpp:540
int getLookatParameters(double *eyeValuesOut3, double *lookatValuesOut3, double *upVectorValuesOut3)
Definition: sceneviewer.hpp:804
int viewAll()
Definition: sceneviewer.hpp:903
int setInteractMode(InteractMode interactMode)
Definition: sceneviewer.hpp:626
Definition: sceneviewer.hpp:344
double getNearClippingPlane()
Definition: sceneviewer.hpp:1042
Definition: sceneviewer.hpp:395
Definition: sceneviewer.hpp:299
int setViewAngle(double viewAngle)
Definition: sceneviewer.hpp:997
int clearCallback()
Definition: sceneviewer.hpp:243
cmzn_sceneviewerevent_id getId() const
Definition: sceneviewer.hpp:104
int setBackgroundColourComponentRGB(double red, double green, double blue)
Definition: sceneviewer.hpp:867
BufferingMode
Definition: sceneviewer.hpp:279
ViewportMode getViewportMode()
Definition: sceneviewer.hpp:1008
Module object for creating and managing scene viewers.
Definition: sceneviewer.hpp:1086
int beginChange()
Definition: sceneviewer.hpp:463
StereoMode
Definition: sceneviewer.hpp:342
Sceneviewermodule getSceneviewermodule()
Definition: sceneviewer.hpp:1153
Sceneviewernotifier createSceneviewernotifier()
Definition: sceneviewer.hpp:1074
cmzn_scene_id getId() const
Definition: scene.hpp:86
int setTransparencyLayers(int layers)
Definition: sceneviewer.hpp:972
int getAntialiasSampling()
Definition: sceneviewer.hpp:568
int setViewingVolume(double left, double right, double bottom, double top, double near_plane, double far_plane)
Definition: sceneviewer.hpp:851
int setPerturbLinesFlag(bool value)
Definition: sceneviewer.hpp:673
ProjectionMode getProjectionMode()
Definition: sceneviewer.hpp:683
int setLookatParametersNonSkew(double const *eyeValuesIn3, double const *lookatValuesIn3, double const *upVectorValuesIn3)
Definition: sceneviewer.hpp:825
Definition: sceneviewer.hpp:318
Definition: sceneviewer.hpp:334
ProjectionMode
Definition: sceneviewer.hpp:328
Definition: sceneviewer.hpp:292
cmzn_sceneviewernotifier_id getId() const
Definition: sceneviewer.hpp:216
int getViewingVolume(double *left, double *right, double *bottom, double *top, double *near_plane, double *far_plane)
Definition: sceneviewer.hpp:834
Definition: sceneviewer.hpp:56
Sceneviewermodule getSceneviewermodule()
Definition: sceneviewer.hpp:1158
ChangeFlag
Definition: sceneviewer.hpp:52
int setZoomRate(double zoomRate)
Definition: sceneviewer.hpp:764
Scene getScene()
Definition: sceneviewer.hpp:509
int setCallback(Sceneviewercallback &callback)
Definition: sceneviewer.hpp:231
int setTranslationRate(double translationRate)
Definition: sceneviewer.hpp:718
Definition: sceneviewer.hpp:330
double getTumbleRate()
Definition: sceneviewer.hpp:729
int setNearClippingPlane(double nearClippingPlane)
Definition: sceneviewer.hpp:1064
Definition: sceneviewer.hpp:398
Manages individual user notification of changes with a scene viewer.
Definition: sceneviewer.hpp:163
int getTransparencyLayers()
Definition: sceneviewer.hpp:956
double getTranslationRate()
Definition: sceneviewer.hpp:706
int setLookatPosition(double const *lookatValuesIn3)
Definition: sceneviewer.hpp:649
cmzn_sceneviewermodule_id getId() const
Definition: sceneviewer.hpp:1139
ChangeFlags getChangeFlags() const
Definition: sceneviewer.hpp:118
int getUpVector(double *upVectorValuesOut3)
Definition: sceneviewer.hpp:775
bool isValid() const
Definition: sceneviewer.hpp:206
InteractMode
Definition: sceneviewer.hpp:309
Definition: sceneviewer.hpp:58
double getZoomRate()
Definition: sceneviewer.hpp:752
int setUpVector(double const *upVectorValuesIn3)
Definition: sceneviewer.hpp:787
int getLookatPosition(double *lookatValuesOut3)
Definition: sceneviewer.hpp:638
Scene filters determines which graphics are drawn.
Definition: scenefilter.hpp:33
Information about changes to fields and other objects in the scene viewer.
Definition: sceneviewer.hpp:30
double getFarClippingPlane()
Definition: sceneviewer.hpp:1031
The Zinc sceneviewer is responsible for rendering the graphical Scene.
Definition: sceneviewer.hpp:261
bool getPerturbLinesFlag()
Definition: sceneviewer.hpp:660
int setBackgroundColourRGB(const double *valuesIn3)
Definition: sceneviewer.hpp:880
Base class functor for Sceneviewer notifier callbacks:
Definition: sceneviewer.hpp:133
int getBackgroundColourRGB(double *valuesOut3)
Definition: sceneviewer.hpp:892
InteractMode getInteractMode()
Definition: sceneviewer.hpp:614
Definition: sceneviewer.hpp:286
Definition: sceneviewer.hpp:374
int setScenefilter(const Scenefilter &scenefilter)
Definition: sceneviewer.hpp:522
int getEyePosition(double *eyeValuesOut3)
Definition: sceneviewer.hpp:591
int setEyePosition(double const *eyeValuesIn3)
Definition: sceneviewer.hpp:602