draw.cpp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*!
  2. \file draw.cpp
  3. \brief Experimental C++ wxWidgets Nviz prototype -- Draw map objects to GLX context
  4. COPYRIGHT: (C) 2008 by the GRASS Development Team
  5. This program is free software under the GNU General Public
  6. License (>=v2). Read the file COPYING that comes with GRASS
  7. for details.
  8. Based on visualization/nviz/src/draw.c and
  9. visualization/nviz/src/togl_flythrough.c
  10. \author Updated/modified by Martin Landa <landa.martin gmail.com> (Google SoC 2008)
  11. \date 2008
  12. */
  13. #include "nviz.h"
  14. /*!
  15. \brief Draw map
  16. Draw quick mode:
  17. - DRAW_QUICK_SURFACE
  18. - DRAW_QUICK_VLINES
  19. - DRAW_QUICK_VPOINTS
  20. - DRAW_QUICK_VOLUME
  21. \param quick if true draw in wiremode
  22. \param quick_mode quick mode
  23. */
  24. void Nviz::Draw(bool quick, int quick_mode)
  25. {
  26. Nviz_draw_cplane(data, -1, -1); // ?
  27. if (quick) {
  28. Nviz_draw_quick(data, quick_mode);
  29. }
  30. else {
  31. Nviz_draw_all (data);
  32. }
  33. G_debug(1, "Nviz::Draw(): quick=%d",
  34. quick);
  35. return;
  36. }
  37. /*!
  38. \brief Erase map display (with background color)
  39. */
  40. void Nviz::EraseMap()
  41. {
  42. GS_clear(data->bgcolor);
  43. G_debug(1, "Nviz::EraseMap()");
  44. return;
  45. }