line_shapes.h - Engine C API Reference

line_shapes.h
  1. #pragma once
  2. #include "vector.h"
  3. #include "types.h"
  4. #include "color.h"
  5. namespace stingray_plugin_foundation
  6. {
  7. namespace line_shapes
  8. {
  9. typedef Vector<Vector3> PointList;
  10. typedef Vector<Color8> ColorList;
  11. void line(const Vector3 &p1, const Vector3 &p2, Color8 color, PointList & out_starts, PointList & out_ends, ColorList & out_colors);
  12. void xyz_cross(const Vector3 &pos, float radius, Color8 color, PointList & out_starts, PointList & out_ends, ColorList & out_colors);
  13. void circle(const Vector3 &pos, float radius, const Vector3 &normal, Color8 color, PointList & out_starts, PointList & out_ends, ColorList & out_colors, int segments=20);
  14. void cone(const Vector3 &p1, const Vector3 &p2, float radius, Color8 color, PointList & out_starts, PointList & out_ends, ColorList & out_colors, int segments = 20, int bars = 10);
  15. void arrow(const Vector3 &from, const Vector3 &to, float head_height, float head_radius, Color8 color, PointList & out_starts, PointList & out_ends, ColorList & out_colors);
  16. void sphere(const Vector3 &pos, float radius, Color8 color, PointList & out_starts, PointList & out_ends, ColorList & out_colors, int segments = 20, int parts = 2);
  17. } // namespace line_shapes
  18. } // namespace stingray_plugin_foundation
  19. #include "line_shapes.inl"