draw_point.h 944 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef IGL_DRAW_POINT_H
  2. #define IGL_DRAW_POINT_H
  3. #ifndef IGL_NO_OPENGL
  4. #include "igl_inline.h"
  5. namespace igl
  6. {
  7. //double POINT_COLOR[3] = {239./255.,213./255.,46./255.};
  8. // Draw a nice looking, colored dot at a given point in 3d.
  9. //
  10. // Note: expects that GL_CURRENT_COLOR is set with the desired foreground color
  11. //
  12. // Inputs:
  13. // x x-coordinate of point, modelview coordinates
  14. // y y-coordinate of point, modelview coordinates
  15. // z z-coordinate of point, modelview coordinates
  16. // requested_r outer-most radius of dot {7}, measured in screen space pixels
  17. // selected fills inner circle with black {false}
  18. // Asserts that requested_r does not exceed 0.5*GL_POINT_SIZE_MAX
  19. IGL_INLINE void draw_point(
  20. const double x,
  21. const double y,
  22. const double z,
  23. const double requested_r = 7,
  24. const bool selected = false);
  25. }
  26. #ifdef IGL_HEADER_ONLY
  27. # include "draw_point.cpp"
  28. #endif
  29. #endif
  30. #endif