9 #ifndef TurtleBrains_BasicShapes_hpp
10 #define TurtleBrains_BasicShapes_hpp
12 #include <turtle_brains/graphics/implementation/tbi_renderer.hpp>
13 #include <turtle_brains/graphics/tb_graphic.hpp>
14 #include <turtle_brains/math/tb_vector.hpp>
22 class OutlinedPolygonShape;
67 virtual void OnRender(
void)
const override;
84 void SetAsTriangles(
void) { mPrimitiveType = tbImplementation::Renderer::kTriangles; }
91 void SetAsTriangleFan(
void) { mPrimitiveType = tbImplementation::Renderer::kTriangleFan; }
105 void SetAsLines(
void) { mPrimitiveType = tbImplementation::Renderer::kLines; }
111 void SetAsLineStrip(
void) { mPrimitiveType = tbImplementation::Renderer::kLineStrip; }
119 void SetAsLineLoop(
void) { mPrimitiveType = tbImplementation::Renderer::kLineLoop; }
141 std::vector<tbImplementation::Renderer::Vertex2D> mVertices;
142 tbImplementation::Renderer::PrimitiveType mPrimitiveType;
219 virtual void OnRender(
void)
const override;
258 void SetSize(
const float width,
const float height);
352 void SetSize(
const float radius,
const int sectionCount = 30);
377 const int sectionCount = 30);
Definition: tb_vector.hpp:48
virtual void ClearVertices(void) override
Definition: tb_graphic.hpp:61
BoxShape(const float width=64.0f, const float height=64.0f, const tbGraphics::Color &color=tbGraphics::ColorPalette::White, const tbMath::Vector2 &position=tbMath::Vector2::Zero())
OutlinedBoxShape(const float width=64.0f, const float height=64.0f, const tbGraphics::Color &fillColor=tbGraphics::ColorPalette::White, const tbGraphics::Color &outlineColor=tbGraphics::ColorPalette::Black, const tbMath::Vector2 &position=tbMath::Vector2::Zero())
void SetAsTriangles(void)
Definition: tb_basic_shapes.hpp:84
Give the GameScene and Entities something to display, Text, Sprites and AnimatedSprites help bring th...
virtual ~OutlinedBoxShape(void)
virtual void ClearVertices(void)
OutlinedCircleShape(const float radius=64.0f, const tbGraphics::Color &fillColor=tbGraphics::ColorPalette::White, const tbGraphics::Color &outlineColor=tbGraphics::ColorPalette::Black, const tbMath::Vector2 &position=tbMath::Vector2::Zero(), const int sectionCount=30)
void SetFillColor(const tbGraphics::Color &fillColor)
void SetSize(const float width, const float height)
virtual PixelSpace GetPixelHeight(void) const override
void AddShapeVertex(const tbMath::Vector2 &position)
Definition: tb_basic_shapes.hpp:152
virtual ~CircleShape(void)
void AddOutlineVertex(const tbMath::Vector2 &position)
Definition: tb_basic_shapes.hpp:27
Here is some information about the primary namespace.
Definition: tb_application_dialog.hpp:21
OutlinedPolygonShape(void)
virtual ~OutlinedPolygonShape(void)
static Vector2 Zero(void)
Definition: tb_vector.hpp:54
Definition: tb_basic_shapes.hpp:271
CircleShape(const float radius=64.0f, const tbGraphics::Color &color=tbGraphics::ColorPalette::White, const tbMath::Vector2 &position=tbMath::Vector2::Zero(), const int sectionCount=30)
Definition: tb_color.hpp:24
void SetAsLines(void)
Definition: tb_basic_shapes.hpp:105
FullScreenQuad(const tbGraphics::Color &color)
void SetAsLineStrip(void)
Definition: tb_basic_shapes.hpp:111
void SetAsTriangleFan(void)
Definition: tb_basic_shapes.hpp:91
tbCore::uint16 PixelSpace
Definition: tb_texture_manager.hpp:36
Definition: tb_basic_shapes.hpp:360
void AddShapeAndOutlineVertex(const tbMath::Vector2 &position)
Definition: tb_basic_shapes.hpp:319
virtual ~PolygonShape(void)
virtual void AddVertex(const tbMath::Vector2 &position)
void RecomputeBounds(void)
virtual void SetColor(const tbGraphics::Color &newColor) override
Definition: tb_basic_shapes.hpp:300
void SetOutlineColor(const tbGraphics::Color &outlineColor)
void SetAsLineLoop(void)
Definition: tb_basic_shapes.hpp:119
virtual ~OutlinedCircleShape(void)
virtual PixelSpace GetPixelWidth(void) const override
void SetAsTriangleStrip(void)
Definition: tb_basic_shapes.hpp:98
virtual void OnRender(void) const override
virtual void OnRender(void) const override
virtual ~FullScreenQuad(void)
void SetVertexPosition(size_t vertexIndex, const tbMath::Vector2 &position)
void SetSize(const float radius, const int sectionCount=30)
Definition: tb_basic_shapes.hpp:237