nviz.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. #ifndef WXNVIZ_H
  2. #define WXNVIZ_H
  3. #include <vector>
  4. extern "C" {
  5. #include <grass/gis.h>
  6. #include <grass/gsurf.h>
  7. #include <grass/gstypes.h>
  8. #include <grass/nviz.h>
  9. }
  10. // For compilers that support precompilation, includes "wx.h".
  11. #include <wx/wxprec.h>
  12. #ifdef __BORLANDC__
  13. #pragma hdrstop
  14. #endif
  15. #ifndef WX_PRECOMP
  16. // Include your minimal set of headers here, or wx.h
  17. #include <wx/wx.h>
  18. #endif
  19. #include <wx/glcanvas.h>
  20. #include <Python.h>
  21. class Nviz
  22. {
  23. private:
  24. nv_data *data;
  25. wxGLCanvas *glCanvas;
  26. /* surface.cpp */
  27. int SetSurfaceAttr(int, int, bool, const char *);
  28. int UnsetSurfaceAttr(int, int);
  29. public:
  30. /* constructor */
  31. Nviz(PyObject *);
  32. /* destructor */
  33. ~Nviz();
  34. /* change_view.cpp */
  35. int ResizeWindow(int, int);
  36. std::vector<double> SetViewDefault();
  37. int SetView(float, float,
  38. float, float, float);
  39. int SetZExag(float);
  40. /* init.cpp */
  41. int SetDisplay(void *);
  42. void InitView();
  43. void Reset();
  44. void SetBgColor(const char *);
  45. /* lights.cpp */
  46. void SetLightsDefault();
  47. /* load.cpp */
  48. int LoadSurface(const char*, const char *, const char *);
  49. int UnloadSurface(int);
  50. int LoadVector(const char *, bool);
  51. int UnloadVector(int, bool);
  52. /* draw.cpp */
  53. void Draw(bool, bool, bool);
  54. void EraseMap();
  55. /* surface.cpp */
  56. int SetSurfaceTopo(int, bool, const char *);
  57. int SetSurfaceColor(int, bool, const char *);
  58. int SetSurfaceMask(int, bool, const char *);
  59. int SetSurfaceTransp(int, bool, const char *);
  60. int SetSurfaceShine(int, bool, const char *);
  61. int SetSurfaceEmit(int, bool, const char *);
  62. int UnsetSurfaceMask(int);
  63. int UnsetSurfaceTransp(int);
  64. int UnsetSurfaceEmit(int);
  65. int SetSurfaceRes(int, int, int);
  66. int SetSurfaceStyle(int, int);
  67. int SetWireColor(int, const char *);
  68. std::vector<double> GetSurfacePosition(int);
  69. int SetSurfacePosition(int, float, float, float);
  70. /* vector */
  71. int SetVectorLineMode(int, const char *, int, int);
  72. int SetVectorLineHeight(int, float);
  73. int SetVectorLineSurface(int, int);
  74. int SetVectorPointMode(int, const char*, int, float, int);
  75. int SetVectorPointHeight(int, float);
  76. int SetVectorPointSurface(int, int);
  77. };
  78. #endif /* WXNVIZ_H */