draw_point.h 1.1 KB

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