draw_point.h 915 B

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