#include <tb_basic_shapes.hpp>
 
  
 | Public Member Functions | |
| CircleShape (const float radius=64.0f, const tbGraphics::Color &color=tbGraphics::ColorPalette::White, const tbMath::Vector2 &position=tbMath::Vector2::Zero(), const int sectionCount=30) | |
| virtual | ~CircleShape (void) | 
| void | SetSize (const float radius, const int sectionCount=30) | 
|  Public Member Functions inherited from TurtleBrains::Graphics::PolygonShape | |
| PolygonShape (void) | |
| PolygonShape (const PolygonShape &other) | |
| virtual | ~PolygonShape (void) | 
| virtual void | SetColor (const tbGraphics::Color &newColor) override | 
| virtual PixelSpace | GetPixelWidth (void) const override | 
| virtual PixelSpace | GetPixelHeight (void) const override | 
|  Public Member Functions inherited from TurtleBrains::Graphics::Graphic | |
| Graphic (void) | |
| Graphic (const Graphic &other) | |
| virtual | ~Graphic (void) | 
| bool | IsActive (void) const | 
| void | SetActive (const bool isActive) | 
| void | Update (const float deltaTime) | 
| bool | IsVisible (void) const | 
| void | SetVisible (const bool isVisible) | 
| void | Render (void) const | 
| const tbMath::Vector2 & | GetPosition (void) const | 
| void | SetPosition (const float x, const float y) | 
| void | SetPosition (const tbMath::Vector2 &position) | 
| const tbMath::Vector2 & | GetOrigin (void) const | 
| void | SetOrigin (const AnchorLocation &anchor, const tbMath::Vector2 &offset=tbMath::Vector2::Zero()) | 
| void | SetOrigin (const float originX, const float originY) | 
| void | SetOrigin (const tbMath::Vector2 &origin) | 
| float | GetDepth (void) const | 
| void | SetDepth (const float newDepth) | 
| const tbMath::Vector2 & | GetScale (void) const | 
| void | SetScale (const float scale) | 
| void | SetScale (const tbMath::Vector2 &scale) | 
| void | SetScale (const float scaleX, const float scaleY) | 
| float | GetRotation (void) const | 
| void | SetRotation (const float rotation) | 
| void | SetScroll (const float scroll) | 
| void | SetScroll (const float scrollX, const float scrollY) | 
| bool | IsRelative (void) const | 
| const Color & | GetColor (void) const | 
| float | GetWidth (void) const | 
| float | GetHeight (void) const | 
| float | GetScaledWidth (void) const | 
| float | GetScaledHeight (void) const | 
| bool | UnstableIsPointContained (const tbMath::Vector2 &point) const | 
| Additional Inherited Members | |
|  Protected Member Functions inherited from TurtleBrains::Graphics::PolygonShape | |
| virtual void | OnRender (void) const override | 
| virtual void | ClearVertices (void) | 
| virtual void | AddVertex (const tbMath::Vector2 &position) | 
| void | SetAsTriangles (void) | 
| void | SetAsTriangleFan (void) | 
| void | SetAsTriangleStrip (void) | 
| void | SetAsLines (void) | 
| void | SetAsLineStrip (void) | 
| void | SetAsLineLoop (void) | 
| void | SetVertexPosition (size_t vertexIndex, const tbMath::Vector2 &position) | 
| void | RecomputeBounds (void) | 
|  Protected Member Functions inherited from TurtleBrains::Graphics::Graphic | |
| virtual void | OnUpdate (const float deltaTime) | 
| virtual void | ApplyTransform (void) const | 
| virtual void | PopTransform (void) const | 
The CircleShape is a special case of the PolygonShape that creates a circle with a specified radius and color to be displayed in a scene.
| 
 | explicit | 
Constructs a PolygonShape in the form of a circle with specified size, position and color.
| radius | The size of the circle, in pixels unless the projection or view matrix changes. | 
| color | The desired color of the circle when it renders. | 
| position | The position of the center of the circle. //TODO: TurtleBrains: Documentation: Check this fact and make sure it works as intended with anchor points. | 
| sectionCount | How many triangle sections the circle should be broken down to, more sections results in a smoother curve but also takes more rendering time and memory. In general smaller circles can reduce the number of sections while larger circles need more sections to be visually smooth. | 
| 
 | virtual | 
Cleans up after the CircleShape.
| void TurtleBrains::Graphics::CircleShape::SetSize | ( | const float | radius, | 
| const int | sectionCount = 30 | ||
| ) | 
Moves the vertices of the circle around to match the new size.
| radius | The size of the circle, in pixels unless the projection or view matrix changes. | 
| sectionCount | How many triangle sections the circle should be broken down to, more sections results in a smoother curve but also takes more rendering time and memory. In general smaller circles can reduce the number of sections while larger circles need more sections to be visually smooth. |