9 #ifndef _TurtleBrains_BasicShapes_h_
10 #define _TurtleBrains_BasicShapes_h_
12 #include "implementation/tbi_renderer.h"
13 #include "tb_graphic.h"
14 #include "../math/tb_vector.h"
22 class OutlinedPolygonShape;
57 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; }
124 std::vector<tbImplementation::Renderer::Vertex2D> mVertices;
125 tbImplementation::Renderer::PrimitiveType mPrimitiveType;
202 virtual void OnRender(
void)
const override;
232 explicit BoxShape(
const float width = 64.0f,
const float height = 64.0f,
const tbGraphics::Color& color = tbGraphics::ColorPalette::White,
337 const int sectionCount = 30);
Definition: tb_vector.h:47
virtual void ClearVertices(void) override
Definition: tb_graphic.h: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.h: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)
virtual PixelSpace GetPixelHeight(void) const override
void AddShapeVertex(const tbMath::Vector2 &position)
Definition: tb_basic_shapes.h:135
virtual ~CircleShape(void)
void AddOutlineVertex(const tbMath::Vector2 &position)
Definition: tb_basic_shapes.h:27
Here is some information about the primary namespace.
Definition: tb_application_dialog.h:21
OutlinedPolygonShape(void)
virtual ~OutlinedPolygonShape(void)
static Vector2 Zero(void)
Definition: tb_vector.h:53
Definition: tb_basic_shapes.h:246
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.h:23
void SetAsLines(void)
Definition: tb_basic_shapes.h:105
FullScreenQuad(const tbGraphics::Color &color)
void SetAsLineStrip(void)
Definition: tb_basic_shapes.h:111
void SetAsTriangleFan(void)
Definition: tb_basic_shapes.h:91
tbCore::uint16 PixelSpace
Definition: tb_texture_manager.h:35
Definition: tb_basic_shapes.h:320
void AddShapeAndOutlineVertex(const tbMath::Vector2 &position)
Definition: tb_basic_shapes.h:292
virtual ~PolygonShape(void)
virtual void AddVertex(const tbMath::Vector2 &position)
virtual void SetColor(const tbGraphics::Color &newColor) override
Definition: tb_basic_shapes.h:273
void SetOutlineColor(const tbGraphics::Color &outlineColor)
void SetAsLineLoop(void)
Definition: tb_basic_shapes.h:119
virtual ~OutlinedCircleShape(void)
virtual PixelSpace GetPixelWidth(void) const override
void SetAsTriangleStrip(void)
Definition: tb_basic_shapes.h:98
virtual void OnRender(void) const override
virtual void OnRender(void) const override
virtual ~FullScreenQuad(void)
Definition: tb_basic_shapes.h:220