lights.cpp 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /**
  2. \file load.cpp
  3. \brief Experimental C++ wxWidgets Nviz prototype -- light manipulation
  4. Used by wxGUI Nviz extension.
  5. Copyright: (C) by the GRASS Development Team
  6. This program is free software under the GNU General Public
  7. License (>=v2). Read the file COPYING that comes with GRASS
  8. for details.
  9. \author Martin Landa <landa.martin gmail.com> (Google SoC 2008)
  10. \date 2008
  11. */
  12. #include "nviz.h"
  13. /*!
  14. \brief Set default lighting model
  15. */
  16. void Nviz::SetLightsDefault()
  17. {
  18. /* first */
  19. Nviz_set_light_position(data, 0,
  20. 0.68, -0.68, 0.80, 0.0);
  21. Nviz_set_light_bright(data, 0,
  22. 0.8);
  23. Nviz_set_light_color(data, 0,
  24. 1.0, 1.0, 1.0);
  25. Nviz_set_light_ambient(data, 0,
  26. 0.2, 0.2, 0.2);
  27. /* second */
  28. Nviz_set_light_position(data, 1,
  29. 0.0, 0.0, 1.0, 0.0);
  30. Nviz_set_light_bright(data, 1,
  31. 0.5);
  32. Nviz_set_light_color(data, 1,
  33. 1.0, 1.0, 1.0);
  34. Nviz_set_light_ambient(data, 1,
  35. 0.3, 0.3, 0.3);
  36. G_debug(1, "Nviz::SetLightsDefault()");
  37. return;
  38. }