From 68e98e6c4313929bddb53dfbbd5baf813d2f1cc1 Mon Sep 17 00:00:00 2001 From: josh Date: Mon, 21 Oct 2024 13:03:44 -0400 Subject: [PATCH] Implement documentation + A special case check on DrawArc. --- include/JGL/JGL.h | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/include/JGL/JGL.h b/include/JGL/JGL.h index 6c85428..3f3caaf 100644 --- a/include/JGL/JGL.h +++ b/include/JGL/JGL.h @@ -292,8 +292,8 @@ namespace JGL { /// @param radius The radius of the partial circle to be drawn. AKA Half the diameter. /// @param arc_begin The point (0 - 2pi) around a unit-circle of which to start the arc. /// @param arc_end The point (0 - 2pi) around a unit-circle of which to start the arc. - /// @param subdivisions - /// @param thickness + /// @param subdivisions The accuracy of the approximation of the circle, measured in iteration steps taken. + /// @param thickness The line-width to draw the arc with. void DrawArc(const Color4& color, const Vector2& center, float radius, float arc_begin, float arc_end, unsigned int subdivisions, float thickness); @@ -321,7 +321,24 @@ namespace JGL { void WireframeCapsule(const Color3& color, const Capsule& cap, float thickness = 1); void FillTriangleMesh(const Color3& color, const TriangleMesh& mesh); void WireframeTriangleMesh(const Color3& color, const TriangleMesh& mesh, float thickness = 1); + + /// Draws a string of text in 3D space, with an arbitrary rotation. + /// @param color + /// @param text + /// @param pos + /// @param scale + /// @param size + /// @param font + /// @param angle + /// @param draw_back_face void DrawString(const Color4& color, const std::string& text, const Vector3& pos, float scale, u32 size, const Font& font, const EulerAngle& angle = {0, 0, 0}, bool draw_back_face = false); + + /// Draws a string of text in 3D space that is always facing the exact direction of the camera projection. + void DrawBillboardString(); + + /// Draws a texture sprite in 3D space that is always facing the exact direction of the camera projection. + void DrawBillboardSprite(); + void DrawSprite(); void DrawMatrixGizmo (const Matrix3x3&, const Vector3&); void DrawMatrixGizmo (const Matrix4x4&);