lights.cpp 1.0 KB

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