OpenCMISS-Zinc C++ API Documentation
sceneviewer.hpp
Go to the documentation of this file.
1 
4 /* OpenCMISS-Zinc Library
5 *
6 * This Source Code Form is subject to the terms of the Mozilla Public
7 * License, v. 2.0. If a copy of the MPL was not distributed with this
8 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
9 #ifndef CMZN_SCENEVIEWER_HPP__
10 #define CMZN_SCENEVIEWER_HPP__
11 
12 #include "opencmiss/zinc/sceneviewer.h"
13 #include "opencmiss/zinc/context.hpp"
14 #include "opencmiss/zinc/light.hpp"
15 #include "opencmiss/zinc/scene.hpp"
16 #include "opencmiss/zinc/scenefilter.hpp"
17 
18 namespace OpenCMISS
19 {
20 namespace Zinc
21 {
22 
23 class Sceneviewerinput;
24 
32 {
33 protected:
34  cmzn_sceneviewerevent_id id;
35 
36 public:
37 
38  Sceneviewerevent() : id(0)
39  { }
40 
41  // takes ownership of C handle, responsibility for destroying it
42  explicit Sceneviewerevent(cmzn_sceneviewerevent_id in_sceneviewer_event_id) :
43  id(in_sceneviewer_event_id)
44  { }
45 
46  Sceneviewerevent(const Sceneviewerevent& sceneviewerEvent) :
47  id(cmzn_sceneviewerevent_access(sceneviewerEvent.id))
48  { }
49 
54  {
55  CHANGE_FLAG_NONE = CMZN_SCENEVIEWEREVENT_CHANGE_FLAG_NONE,
57  CHANGE_FLAG_REPAINT_REQUIRED = CMZN_SCENEVIEWEREVENT_CHANGE_FLAG_REPAINT_REQUIRED,
59  CHANGE_FLAG_TRANSFORM = CMZN_SCENEVIEWEREVENT_CHANGE_FLAG_TRANSFORM,
61  CHANGE_FLAG_FINAL = CMZN_SCENEVIEWEREVENT_CHANGE_FLAG_FINAL
63  };
64 
69  typedef int ChangeFlags;
70 
71  Sceneviewerevent& operator=(const Sceneviewerevent& sceneviewerEvent)
72  {
73  cmzn_sceneviewerevent_id temp_id = cmzn_sceneviewerevent_access(sceneviewerEvent.id);
74  if (0 != id)
75  {
76  cmzn_sceneviewerevent_destroy(&id);
77  }
78  id = temp_id;
79  return *this;
80  }
81 
83  {
84  if (0 != id)
85  {
86  cmzn_sceneviewerevent_destroy(&id);
87  }
88  }
89 
95  bool isValid() const
96  {
97  return (0 != id);
98  }
99 
105  cmzn_sceneviewerevent_id getId() const
106  {
107  return id;
108  }
109 
117  ChangeFlags getChangeFlags() const
118  {
119  return static_cast<ChangeFlag>(cmzn_sceneviewerevent_get_change_flags(id));
120  }
121 
122 };
123 
133 {
134 friend class Sceneviewernotifier;
135 private:
136  Sceneviewercallback(const Sceneviewercallback&); // not implemented
137  Sceneviewercallback& operator=(const Sceneviewercallback&); // not implemented
138 
139  static void C_callback(cmzn_sceneviewerevent_id sceneviewerevent_id, void *callbackVoid)
140  {
141  Sceneviewerevent sceneviewerevent(cmzn_sceneviewerevent_access(sceneviewerevent_id));
142  Sceneviewercallback *callback = reinterpret_cast<Sceneviewercallback *>(callbackVoid);
143  (*callback)(sceneviewerevent);
144  }
145 
146  virtual void operator()(const Sceneviewerevent &sceneviewerevent) = 0;
147 
148 protected:
150  { }
151 
152 public:
153  virtual ~Sceneviewercallback()
154  { }
155 };
156 
163 {
164 protected:
165  cmzn_sceneviewernotifier_id id;
166 
167 public:
168 
169  Sceneviewernotifier() : id(0)
170  { }
171 
172  // takes ownership of C handle, responsibility for destroying it
173  explicit Sceneviewernotifier(cmzn_sceneviewernotifier_id in_sceneviewernotifier_id) :
174  id(in_sceneviewernotifier_id)
175  { }
176 
177  Sceneviewernotifier(const Sceneviewernotifier& sceneviewerNotifier) :
178  id(cmzn_sceneviewernotifier_access(sceneviewerNotifier.id))
179  { }
180 
181  Sceneviewernotifier& operator=(const Sceneviewernotifier& sceneviewerNotifier)
182  {
183  cmzn_sceneviewernotifier_id temp_id = cmzn_sceneviewernotifier_access(sceneviewerNotifier.id);
184  if (0 != id)
185  {
186  cmzn_sceneviewernotifier_destroy(&id);
187  }
188  id = temp_id;
189  return *this;
190  }
191 
193  {
194  if (0 != id)
195  {
196  cmzn_sceneviewernotifier_destroy(&id);
197  }
198  }
199 
205  bool isValid() const
206  {
207  return (0 != id);
208  }
209 
215  cmzn_sceneviewernotifier_id getId() const
216  {
217  return id;
218  }
219 
231  {
232  return cmzn_sceneviewernotifier_set_callback(
233  id, callback.C_callback, static_cast<void*>(&callback));
234  }
235 
243  {
244  return cmzn_sceneviewernotifier_clear_callback(id);
245  }
246 };
247 
261 {
262 protected:
263  cmzn_sceneviewer_id id;
264 
265 public:
266 
279  {
280  BUFFERING_MODE_INVALID = CMZN_SCENEVIEWER_BUFFERING_MODE_INVALID,
282  BUFFERING_MODE_DEFAULT = CMZN_SCENEVIEWER_BUFFERING_MODE_DEFAULT,
285  BUFFERING_MODE_SINGLE = CMZN_SCENEVIEWER_BUFFERING_MODE_SINGLE,
288  BUFFERING_MODE_DOUBLE = CMZN_SCENEVIEWER_BUFFERING_MODE_DOUBLE,
291  BUFFERING_MODE_RENDER_OFFSCREEN_AND_COPY = CMZN_SCENEVIEWER_BUFFERING_MODE_RENDER_OFFSCREEN_AND_COPY,
298  BUFFERING_MODE_RENDER_OFFSCREEN_AND_BLEND = CMZN_SCENEVIEWER_BUFFERING_MODE_RENDER_OFFSCREEN_AND_BLEND
303  };
304 
309  {
310  INTERACT_MODE_INVALID = CMZN_SCENEVIEWER_INTERACT_MODE_INVALID,
312  INTERACT_MODE_STANDARD = CMZN_SCENEVIEWER_INTERACT_MODE_STANDARD,
317  INTERACT_MODE_2D = CMZN_SCENEVIEWER_INTERACT_MODE_2D
322  };
323 
328  {
329  PROJECTION_MODE_INVALID = CMZN_SCENEVIEWER_PROJECTION_MODE_INVALID,
331  PROJECTION_MODE_PARALLEL = CMZN_SCENEVIEWER_PROJECTION_MODE_PARALLEL,
333  PROJECTION_MODE_PERSPECTIVE = CMZN_SCENEVIEWER_PROJECTION_MODE_PERSPECTIVE
335  };
336 
342  {
343  STEREO_MODE_INVALID = CMZN_SCENEVIEWER_STEREO_MODE_INVALID,
345  STEREO_MODE_DEFAULT = CMZN_SCENEVIEWER_STEREO_MODE_DEFAULT,
347  STEREO_MODE_MONO = CMZN_SCENEVIEWER_STEREO_MODE_MONO,
349  STEREO_MODE_STEREO = CMZN_SCENEVIEWER_STEREO_MODE_STEREO
351  };
352 
357  {
358  TRANSPARENCY_MODE_INVALID = CMZN_SCENEVIEWER_TRANSPARENCY_MODE_INVALID,
360  TRANSPARENCY_MODE_FAST = CMZN_SCENEVIEWER_TRANSPARENCY_MODE_FAST,
365  TRANSPARENCY_MODE_SLOW = CMZN_SCENEVIEWER_TRANSPARENCY_MODE_SLOW,
373  TRANSPARENCY_MODE_ORDER_INDEPENDENT = CMZN_SCENEVIEWER_TRANSPARENCY_MODE_ORDER_INDEPENDENT
381  };
382 
388  {
389  VIEWPORT_MODE_INVALID = CMZN_SCENEVIEWER_VIEWPORT_MODE_INVALID,
391  VIEWPORT_MODE_ABSOLUTE = CMZN_SCENEVIEWER_VIEWPORT_MODE_ABSOLUTE,
394  VIEWPORT_MODE_RELATIVE = CMZN_SCENEVIEWER_VIEWPORT_MODE_RELATIVE,
397  VIEWPORT_MODE_DISTORTING_RELATIVE = CMZN_SCENEVIEWER_VIEWPORT_MODE_DISTORTING_RELATIVE
400  };
401 
402  Sceneviewer() : id(0)
403  { }
404 
405  // takes ownership of C-style region reference
406  explicit Sceneviewer(cmzn_sceneviewer_id in_sceneviewer_id) :
407  id(in_sceneviewer_id)
408  { }
409 
410  Sceneviewer(const Sceneviewer& sceneviewermodule) :
411  id(cmzn_sceneviewer_access(sceneviewermodule.id))
412  { }
413 
414  Sceneviewer& operator=(const Sceneviewer& sceneviewer)
415  {
416  cmzn_sceneviewer_id temp_id = cmzn_sceneviewer_access(sceneviewer.id);
417  if (0 != id)
418  {
419  cmzn_sceneviewer_destroy(&id);
420  }
421  id = temp_id;
422  return *this;
423  }
424 
425  ~Sceneviewer()
426  {
427  if (0 != id)
428  {
429  cmzn_sceneviewer_destroy(&id);
430  }
431  }
432 
438  bool isValid() const
439  {
440  return (0 != id);
441  }
442 
448  cmzn_sceneviewer_id getId() const
449  {
450  return id;
451  }
452 
463  {
464  return cmzn_sceneviewer_begin_change(id);
465  }
466 
477  int endChange()
478  {
479  return cmzn_sceneviewer_end_change(id);
480  }
481 
486  {
487  return cmzn_sceneviewer_render_scene(id);
488  }
489 
498  int setScene(const Scene& scene)
499  {
500  return cmzn_sceneviewer_set_scene(id, scene.getId());
501  }
502 
509  {
510  return Scene(cmzn_sceneviewer_get_scene(id));
511  }
512 
521  int setScenefilter(const Scenefilter& scenefilter)
522  {
523  return cmzn_sceneviewer_set_scenefilter(id, scenefilter.getId());
524  }
525 
532  {
533  return Scenefilter(cmzn_sceneviewer_get_scenefilter(id));
534  }
535 
539  int setViewportSize(int width, int height)
540  {
541  return cmzn_sceneviewer_set_viewport_size(id, width, height);
542  }
543 
550  inline Sceneviewerinput createSceneviewerinput();
551 
559  inline int processSceneviewerinput(const Sceneviewerinput& input);
560 
568  {
569  return cmzn_sceneviewer_get_antialias_sampling(id);
570  }
571 
579  int setAntialiasSampling(int numberOfSamples)
580  {
581  return cmzn_sceneviewer_set_antialias_sampling(id, numberOfSamples);
582  }
583 
590  {
591  return cmzn_sceneviewer_get_background_colour_alpha(id);
592  }
593 
602  int setBackgroundColourAlpha(const double alpha)
603  {
604  return cmzn_sceneviewer_set_background_colour_alpha(id, alpha);
605  }
606 
616  int setBackgroundColourComponentRGB(double red, double green, double blue)
617  {
618  return cmzn_sceneviewer_set_background_colour_component_rgb(id, red, green, blue);
619  }
620 
621  int setBackgroundColourComponentRGBA(double red, double green, double blue, double alpha)
622  {
623  return cmzn_sceneviewer_set_background_colour_component_rgba(id, red, green, blue, alpha);
624  }
625 
633  int getBackgroundColourRGB(double *valuesOut3)
634  {
635  return cmzn_sceneviewer_get_background_colour_rgb(id, valuesOut3);
636  }
637 
645  int setBackgroundColourRGB(const double *valuesIn3)
646  {
647  return cmzn_sceneviewer_set_background_colour_rgb(id, valuesIn3);
648  }
649 
650  int getBackgroundColourRGBA(double *valuesOut4)
651  {
652  return cmzn_sceneviewer_get_background_colour_rgba(id, valuesOut4);
653  }
654 
655  int setBackgroundColourRGBA(const double *valuesIn4)
656  {
657  return cmzn_sceneviewer_set_background_colour_rgba(id, valuesIn4);
658  }
659 
666  int getEyePosition(double *eyeValuesOut3)
667  {
668  return cmzn_sceneviewer_get_eye_position(id, eyeValuesOut3);
669  }
670 
677  int setEyePosition(const double *eyeValuesIn3)
678  {
679  return cmzn_sceneviewer_set_eye_position(id, eyeValuesIn3);
680  }
681 
689  {
690  return static_cast<InteractMode>(cmzn_sceneviewer_get_interact_mode(id));
691  }
692 
699  int setInteractMode(InteractMode interactMode)
700  {
701  return cmzn_sceneviewer_set_interact_mode(id,
702  static_cast<cmzn_sceneviewer_interact_mode>(interactMode));
703  }
704 
711  int getLookatPosition(double *lookatValuesOut3)
712  {
713  return cmzn_sceneviewer_get_lookat_position(id, lookatValuesOut3);
714  }
715 
722  int setLookatPosition(const double *lookatValuesIn3)
723  {
724  return cmzn_sceneviewer_set_lookat_position(id, lookatValuesIn3);
725  }
726 
734  {
735  return cmzn_sceneviewer_get_perturb_lines_flag(id);
736  }
737 
746  int setPerturbLinesFlag(bool value)
747  {
748  return cmzn_sceneviewer_set_perturb_lines_flag(id, value);
749  }
750 
757  {
758  return static_cast<ProjectionMode>(cmzn_sceneviewer_get_projection_mode(id));
759  }
760 
767  int setProjectionMode(ProjectionMode projectionMode)
768  {
769  return cmzn_sceneviewer_set_projection_mode(id,
770  static_cast<cmzn_sceneviewer_projection_mode>(projectionMode));
771  }
772 
780  {
781  return cmzn_sceneviewer_get_translation_rate(id);
782  }
783 
791  int setTranslationRate(double translationRate)
792  {
793  return cmzn_sceneviewer_set_translation_rate(id, translationRate);
794  }
795 
802  double getTumbleRate()
803  {
804  return cmzn_sceneviewer_get_tumble_rate(id);
805  }
806 
814  int setTumbleRate(double tumbleRate)
815  {
816  return cmzn_sceneviewer_set_tumble_rate(id, tumbleRate);
817  }
818 
825  double getZoomRate()
826  {
827  return cmzn_sceneviewer_get_zoom_rate(id);
828  }
829 
837  int setZoomRate(double zoomRate)
838  {
839  return cmzn_sceneviewer_set_zoom_rate(id, zoomRate);
840  }
841 
848  int getUpVector(double *upVectorValuesOut3)
849  {
850  return cmzn_sceneviewer_get_up_vector(id, upVectorValuesOut3);
851  }
852 
860  int setUpVector(const double *upVectorValuesIn3)
861  {
862  return cmzn_sceneviewer_set_up_vector(id, upVectorValuesIn3);
863  }
864 
877  int getLookatParameters(double *eyeValuesOut3, double *lookatValuesOut3, double *upVectorValuesOut3)
878  {
879  return cmzn_sceneviewer_get_lookat_parameters(id,
880  eyeValuesOut3, lookatValuesOut3, upVectorValuesOut3);
881  }
882 
898  int setLookatParametersNonSkew(const double *eyeValuesIn3, const double *lookatValuesIn3, const double *upVectorValuesIn3)
899  {
900  return cmzn_sceneviewer_set_lookat_parameters_non_skew(id,
901  eyeValuesIn3, lookatValuesIn3, upVectorValuesIn3);
902  }
903 
907  int getViewingVolume(double *left,double *right,double *bottom,double *top,
908  double *near_plane, double *far_plane)
909  {
910  return cmzn_sceneviewer_get_viewing_volume(id, left, right, bottom, top,
911  near_plane, far_plane);
912  }
913 
924  int setViewingVolume(double left, double right, double bottom, double top,
925  double near_plane, double far_plane)
926  {
927  return cmzn_sceneviewer_set_viewing_volume(id, left, right, bottom, top,
928  near_plane, far_plane);
929  }
930 
937  int viewAll()
938  {
939  return cmzn_sceneviewer_view_all(id);
940  }
941 
958  {
959  return static_cast<TransparencyMode>(cmzn_sceneviewer_get_transparency_mode(id));
960  }
961 
973  int setTransparencyMode(TransparencyMode transparencyMode)
974  {
975  return cmzn_sceneviewer_set_transparency_mode(id,
976  static_cast<cmzn_sceneviewer_transparency_mode>(transparencyMode));
977  }
978 
988  {
989  return cmzn_sceneviewer_get_transparency_layers(id);
990  }
991 
1002  int setTransparencyLayers(int layers)
1003  {
1004  return cmzn_sceneviewer_set_transparency_layers(id, layers);
1005  }
1006 
1014  double getViewAngle()
1015  {
1016  return cmzn_sceneviewer_get_view_angle(id);
1017  }
1018 
1027  int setViewAngle(double viewAngle)
1028  {
1029  return cmzn_sceneviewer_set_view_angle(id, viewAngle);
1030  }
1031 
1039  {
1040  return static_cast<ViewportMode>(cmzn_sceneviewer_get_viewport_mode(id));
1041  }
1042 
1049  int setViewportMode(ViewportMode viewportMode)
1050  {
1051  return cmzn_sceneviewer_set_viewport_mode(id,
1052  static_cast<cmzn_sceneviewer_viewport_mode>(viewportMode));
1053  }
1054 
1062  {
1063  return cmzn_sceneviewer_get_far_clipping_plane(id);
1064  }
1065 
1073  {
1074  return cmzn_sceneviewer_get_near_clipping_plane(id);
1075  }
1076 
1083  int setFarClippingPlane(double farClippingPlane)
1084  {
1085  return cmzn_sceneviewer_set_far_clipping_plane(id, farClippingPlane);
1086  }
1087 
1094  int setNearClippingPlane(double nearClippingPlane)
1095  {
1096  return cmzn_sceneviewer_set_near_clipping_plane(id, nearClippingPlane);
1097  }
1098 
1106  int writeImageToFile(const char *file_name, int force_onscreen, int preferred_width,
1107  int preferred_height, int preferred_antialias, int preferred_transparency_layers)
1108  {
1109  return cmzn_sceneviewer_write_image_to_file(id, file_name, force_onscreen, preferred_width,
1110  preferred_height, preferred_antialias, preferred_transparency_layers);
1111  }
1112 
1119  int addLight(const Light& light)
1120  {
1121  return cmzn_sceneviewer_add_light(id, light.getId());
1122  }
1123 
1130  bool hasLight(const Light& light)
1131  {
1132  return cmzn_sceneviewer_has_light(id, light.getId());
1133  }
1134 
1141  int removeLight(const Light& light)
1142  {
1143  return cmzn_sceneviewer_remove_light(id, light.getId());
1144  }
1145 
1154  {
1155  return cmzn_sceneviewer_is_lighting_local_viewer(this->id);
1156  }
1157 
1172  int setLightingLocalViewer(bool value)
1173  {
1174  return cmzn_sceneviewer_set_lighting_local_viewer(this->id, value);
1175  }
1176 
1184  {
1185  return cmzn_sceneviewer_is_lighting_two_sided(this->id);
1186  }
1187 
1202  int setLightingTwoSided(bool value)
1203  {
1204  return cmzn_sceneviewer_set_lighting_two_sided(this->id, value);
1205  }
1206 
1222  Scenecoordinatesystem outCoordinateSystem, const Scene& localScene,
1223  const double *valuesIn3, double *valuesOut3)
1224  {
1225  return cmzn_sceneviewer_transform_coordinates(id,
1226  static_cast<cmzn_scenecoordinatesystem>(inCoordinateSystem),
1227  static_cast<cmzn_scenecoordinatesystem>(outCoordinateSystem),
1228  localScene.getId(), valuesIn3, valuesOut3);
1229  }
1230 
1238  int readDescription(const char *description)
1239  {
1240  return cmzn_sceneviewer_read_description(this->id, description);
1241  }
1242 
1250  {
1251  return cmzn_sceneviewer_write_description(this->id);
1252  }
1253 
1260  {
1261  return Sceneviewernotifier(cmzn_sceneviewer_create_sceneviewernotifier(id));
1262  }
1263 
1264 };
1265 
1272 {
1273 protected:
1274  cmzn_sceneviewermodule_id id;
1275 
1276 public:
1277 
1278  Sceneviewermodule() : id(0)
1279  { }
1280 
1281  // takes ownership of C-style region reference
1282  Sceneviewermodule(cmzn_sceneviewermodule_id in_sceneviewermodule_id) :
1283  id(in_sceneviewermodule_id)
1284  { }
1285 
1286  Sceneviewermodule(const Sceneviewermodule& sceneviewermodule) :
1287  id(cmzn_sceneviewermodule_access(sceneviewermodule.id))
1288  { }
1289 
1290  Sceneviewermodule& operator=(const Sceneviewermodule& sceneviewermodule)
1291  {
1292  cmzn_sceneviewermodule_id temp_id = cmzn_sceneviewermodule_access(sceneviewermodule.id);
1293  if (0 != id)
1294  {
1295  cmzn_sceneviewermodule_destroy(&id);
1296  }
1297  id = temp_id;
1298  return *this;
1299  }
1300 
1302  {
1303  if (0 != id)
1304  {
1305  cmzn_sceneviewermodule_destroy(&id);
1306  }
1307  }
1308 
1314  bool isValid() const
1315  {
1316  return (0 != id);
1317  }
1318 
1324  cmzn_sceneviewermodule_id getId() const
1325  {
1326  return id;
1327  }
1328 
1338  {
1339  return Sceneviewer(cmzn_sceneviewermodule_create_sceneviewer(id,
1340  static_cast<cmzn_sceneviewer_buffering_mode>(buffering_mode),
1341  static_cast<cmzn_sceneviewer_stereo_mode>(stereo_mode)));
1342  }
1343 
1352  {
1353  return cmzn_sceneviewermodule_get_default_background_colour_alpha(id);
1354  }
1355 
1365  int setDefaultBackgroundColourAlpha(const double alpha)
1366  {
1367  return cmzn_sceneviewermodule_set_default_background_colour_alpha(id, alpha);
1368  }
1369 
1379  int getDefaultBackgroundColourRGB(double *valuesOut3)
1380  {
1381  return cmzn_sceneviewermodule_get_default_background_colour_rgb(id, valuesOut3);
1382  }
1383 
1392  int setDefaultBackgroundColourRGB(const double *valuesIn3)
1393  {
1394  return cmzn_sceneviewermodule_set_default_background_colour_rgb(id, valuesIn3);
1395  }
1396 
1397  int getDefaultBackgroundColourRGBA(double *valuesOut4)
1398  {
1399  return cmzn_sceneviewermodule_get_default_background_colour_rgba(id, valuesOut4);
1400  }
1401 
1402  int setDefaultBackgroundColourRGBA(const double *valuesIn4)
1403  {
1404  return cmzn_sceneviewermodule_set_default_background_colour_rgba(id, valuesIn4);
1405  }
1406 
1407 };
1408 
1410 {
1411  return Sceneviewermodule(cmzn_context_get_sceneviewermodule(id));
1412 }
1413 
1415 {
1416  return Sceneviewermodule(cmzn_scene_get_sceneviewermodule(id));
1417 }
1418 
1419 } // namespace Zinc
1420 }
1421 
1422 #endif
Scenefilter getScenefilter()
Definition: sceneviewer.hpp:531
cmzn_sceneviewer_id getId() const
Definition: sceneviewer.hpp:448
bool isValid() const
Definition: sceneviewer.hpp:95
int setFarClippingPlane(double farClippingPlane)
Definition: sceneviewer.hpp:1083
double getViewAngle()
Definition: sceneviewer.hpp:1014
int setScene(const Scene &scene)
Definition: sceneviewer.hpp:498
int setLookatParametersNonSkew(const double *eyeValuesIn3, const double *lookatValuesIn3, const double *upVectorValuesIn3)
Definition: sceneviewer.hpp:898
int removeLight(const Light &light)
Definition: sceneviewer.hpp:1141
cmzn_scenefilter_id getId() const
Definition: scenefilter.hpp:86
int setViewportMode(ViewportMode viewportMode)
Definition: sceneviewer.hpp:1049
int ChangeFlags
Definition: sceneviewer.hpp:69
TransparencyMode getTransparencyMode()
Definition: sceneviewer.hpp:957
int setAntialiasSampling(int numberOfSamples)
Definition: sceneviewer.hpp:579
int renderScene()
Definition: sceneviewer.hpp:485
int endChange()
Definition: sceneviewer.hpp:477
Scenecoordinatesystem
Definition: scenecoordinatesystem.hpp:26
double getDefaultBackgroundColourAlpha()
Definition: sceneviewer.hpp:1351
int setDefaultBackgroundColourAlpha(const double alpha)
Definition: sceneviewer.hpp:1365
bool hasLight(const Light &light)
Definition: sceneviewer.hpp:1130
Container/manager for graphics visualising a region.
Definition: scene.hpp:38
The light controls how vertices will be lit on a sceneviewer.
Definition: light.hpp:28
TransparencyMode
Definition: sceneviewer.hpp:356
int setBackgroundColourAlpha(const double alpha)
Definition: sceneviewer.hpp:602
int writeImageToFile(const char *file_name, int force_onscreen, int preferred_width, int preferred_height, int preferred_antialias, int preferred_transparency_layers)
Definition: sceneviewer.hpp:1106
int readDescription(const char *description)
Definition: sceneviewer.hpp:1238
int setLightingLocalViewer(bool value)
Definition: sceneviewer.hpp:1172
int setTumbleRate(double tumbleRate)
Definition: sceneviewer.hpp:814
bool isValid() const
Definition: sceneviewer.hpp:438
int setProjectionMode(ProjectionMode projectionMode)
Definition: sceneviewer.hpp:767
int setDefaultBackgroundColourRGB(const double *valuesIn3)
Definition: sceneviewer.hpp:1392
double getBackgroundColourAlpha()
Definition: sceneviewer.hpp:589
ViewportMode
Definition: sceneviewer.hpp:387
int setTransparencyMode(TransparencyMode transparencyMode)
Definition: sceneviewer.hpp:973
bool isValid() const
Definition: sceneviewer.hpp:1314
int setViewportSize(int width, int height)
Definition: sceneviewer.hpp:539
int getLookatParameters(double *eyeValuesOut3, double *lookatValuesOut3, double *upVectorValuesOut3)
Definition: sceneviewer.hpp:877
int viewAll()
Definition: sceneviewer.hpp:937
int setInteractMode(InteractMode interactMode)
Definition: sceneviewer.hpp:699
double getNearClippingPlane()
Definition: sceneviewer.hpp:1072
int transformCoordinates(Scenecoordinatesystem inCoordinateSystem, Scenecoordinatesystem outCoordinateSystem, const Scene &localScene, const double *valuesIn3, double *valuesOut3)
Definition: sceneviewer.hpp:1221
cmzn_light_id getId() const
Definition: light.hpp:102
int setViewAngle(double viewAngle)
Definition: sceneviewer.hpp:1027
Sceneviewer createSceneviewer(Sceneviewer::BufferingMode buffering_mode, Sceneviewer::StereoMode stereo_mode)
Definition: sceneviewer.hpp:1337
int setUpVector(const double *upVectorValuesIn3)
Definition: sceneviewer.hpp:860
int clearCallback()
Definition: sceneviewer.hpp:242
cmzn_sceneviewerevent_id getId() const
Definition: sceneviewer.hpp:105
int setBackgroundColourComponentRGB(double red, double green, double blue)
Definition: sceneviewer.hpp:616
BufferingMode
Definition: sceneviewer.hpp:278
ViewportMode getViewportMode()
Definition: sceneviewer.hpp:1038
Module object for creating and managing scene viewers.
Definition: sceneviewer.hpp:1271
int beginChange()
Definition: sceneviewer.hpp:462
StereoMode
Definition: sceneviewer.hpp:341
Sceneviewermodule getSceneviewermodule()
Definition: sceneviewer.hpp:1409
Sceneviewernotifier createSceneviewernotifier()
Definition: sceneviewer.hpp:1259
cmzn_scene_id getId() const
Definition: scene.hpp:90
int setTransparencyLayers(int layers)
Definition: sceneviewer.hpp:1002
int getAntialiasSampling()
Definition: sceneviewer.hpp:567
int setViewingVolume(double left, double right, double bottom, double top, double near_plane, double far_plane)
Definition: sceneviewer.hpp:924
int setPerturbLinesFlag(bool value)
Definition: sceneviewer.hpp:746
ProjectionMode getProjectionMode()
Definition: sceneviewer.hpp:756
ProjectionMode
Definition: sceneviewer.hpp:327
cmzn_sceneviewernotifier_id getId() const
Definition: sceneviewer.hpp:215
int getViewingVolume(double *left, double *right, double *bottom, double *top, double *near_plane, double *far_plane)
Definition: sceneviewer.hpp:907
char * writeDescription()
Definition: sceneviewer.hpp:1249
Sceneviewermodule getSceneviewermodule()
Definition: sceneviewer.hpp:1414
ChangeFlag
Definition: sceneviewer.hpp:53
Describes a mouse event for processing by the sceneviewer.
Definition: sceneviewerinput.hpp:27
int setZoomRate(double zoomRate)
Definition: sceneviewer.hpp:837
Scene getScene()
Definition: sceneviewer.hpp:508
int setCallback(Sceneviewercallback &callback)
Definition: sceneviewer.hpp:230
int setTranslationRate(double translationRate)
Definition: sceneviewer.hpp:791
bool isLightingTwoSided()
Definition: sceneviewer.hpp:1183
double getTumbleRate()
Definition: sceneviewer.hpp:802
int setNearClippingPlane(double nearClippingPlane)
Definition: sceneviewer.hpp:1094
int setEyePosition(const double *eyeValuesIn3)
Definition: sceneviewer.hpp:677
Manages individual user notification of changes with a scene viewer.
Definition: sceneviewer.hpp:162
int getTransparencyLayers()
Definition: sceneviewer.hpp:987
int setLookatPosition(const double *lookatValuesIn3)
Definition: sceneviewer.hpp:722
double getTranslationRate()
Definition: sceneviewer.hpp:779
cmzn_sceneviewermodule_id getId() const
Definition: sceneviewer.hpp:1324
ChangeFlags getChangeFlags() const
Definition: sceneviewer.hpp:117
int getUpVector(double *upVectorValuesOut3)
Definition: sceneviewer.hpp:848
bool isValid() const
Definition: sceneviewer.hpp:205
int addLight(const Light &light)
Definition: sceneviewer.hpp:1119
InteractMode
Definition: sceneviewer.hpp:308
double getZoomRate()
Definition: sceneviewer.hpp:825
int getLookatPosition(double *lookatValuesOut3)
Definition: sceneviewer.hpp:711
bool isLightingLocalViewer()
Definition: sceneviewer.hpp:1153
The OpenCMISS namespace.
Definition: context.hpp:20
Scene filters determines which graphics are drawn.
Definition: scenefilter.hpp:33
int setLightingTwoSided(bool value)
Definition: sceneviewer.hpp:1202
Information about changes to fields and other objects in the scene viewer.
Definition: sceneviewer.hpp:31
double getFarClippingPlane()
Definition: sceneviewer.hpp:1061
The Zinc sceneviewer is responsible for rendering the graphical Scene.
Definition: sceneviewer.hpp:260
bool getPerturbLinesFlag()
Definition: sceneviewer.hpp:733
int setBackgroundColourRGB(const double *valuesIn3)
Definition: sceneviewer.hpp:645
Base class functor for Sceneviewer notifier callbacks:
Definition: sceneviewer.hpp:132
int getDefaultBackgroundColourRGB(double *valuesOut3)
Definition: sceneviewer.hpp:1379
int getBackgroundColourRGB(double *valuesOut3)
Definition: sceneviewer.hpp:633
InteractMode getInteractMode()
Definition: sceneviewer.hpp:688
int setScenefilter(const Scenefilter &scenefilter)
Definition: sceneviewer.hpp:521
int getEyePosition(double *eyeValuesOut3)
Definition: sceneviewer.hpp:666