TurtleBrains  0.2.1
High quality, portable, C++ API for native application and game development.
TurtleBrains::Graphics::OutlinedBoxShape Class Reference

#include <tb_basic_shapes.h>

Inheritance diagram for TurtleBrains::Graphics::OutlinedBoxShape:
TurtleBrains::Graphics::OutlinedPolygonShape TurtleBrains::Graphics::PolygonShape TurtleBrains::Graphics::Graphic

Public Member Functions

 OutlinedBoxShape (const float width, const float height, const tbGraphics::Color &fillColor=tbGraphics::Color::kWhite, const tbGraphics::Color &outlineColor=tbGraphics::Color::kBlack, const tbMath::Vector2 &position=tbMath::Vector2::Zero())
 
virtual ~OutlinedBoxShape (void)
 
- Public Member Functions inherited from TurtleBrains::Graphics::OutlinedPolygonShape
 OutlinedPolygonShape (void)
 
 OutlinedPolygonShape (const OutlinedPolygonShape &other)
 
virtual ~OutlinedPolygonShape (void)
 
virtual void ClearVertices (void) override
 
void SetFillColor (const tbGraphics::Color &fillColor)
 
void SetOutlineColor (const tbGraphics::Color &outlineColor)
 
- Public Member Functions inherited from TurtleBrains::Graphics::PolygonShape
 PolygonShape (void)
 
 PolygonShape (const PolygonShape &other)
 
virtual ~PolygonShape (void)
 
- 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::Vector2GetPosition (void) const
 
void SetPosition (const float x, const float y)
 
void SetPosition (const tbMath::Vector2 &position)
 
void SetOrigin (const AnchorLocation &anchor)
 
void SetOrigin (const float originX, const float originY)
 
float GetDepth (void) const
 
void SetDepth (const float newDepth)
 
void SetScale (const float scale)
 
void SetScale (const float scaleX, const float scaleY)
 
void SetRotation (const float rotation)
 
float GetRotation (void) const
 
void SetScroll (const float scroll)
 
void SetScroll (const float scrollX, const float scrollY)
 
bool IsRelative (void) const
 
float GetWidth (void) const
 
float GetHeight (void) const
 

Additional Inherited Members

- Protected Member Functions inherited from TurtleBrains::Graphics::OutlinedPolygonShape
void AddOutlineVertex (const tbMath::Vector2 &position)
 
void AddShapeVertex (const tbMath::Vector2 &position)
 
void AddShapeAndOutlineVertex (const tbMath::Vector2 &position)
 
virtual void OnRender (void) const override
 
- Protected Member Functions inherited from TurtleBrains::Graphics::PolygonShape
virtual PixelSpace GetPixelWidth (void) const override
 
virtual PixelSpace GetPixelHeight (void) const override
 
void SetAsTriangles (void)
 
void SetAsTriangleFan (void)
 
void SetAsTriangleStrip (void)
 
void SetAsLines (void)
 
void SetAsLineStrip (void)
 
void SetAsLineLoop (void)
 
- Protected Member Functions inherited from TurtleBrains::Graphics::Graphic
virtual void OnUpdate (const float deltaTime)
 
const ColorGetColor (void) const
 
virtual void ApplyTransform (void) const
 
virtual void PopTransform (void) const
 

Detailed Description

The OutlinedBoxShape is a special case of the OutlinedPolygonShape that creates a box with a specified width and height and color, which also has an outline.

Constructor & Destructor Documentation

TurtleBrains::Graphics::OutlinedBoxShape::OutlinedBoxShape ( const float  width,
const float  height,
const tbGraphics::Color fillColor = tbGraphics::Color::kWhite,
const tbGraphics::Color outlineColor = tbGraphics::Color::kBlack,
const tbMath::Vector2 position = tbMath::Vector2::Zero() 
)

Constructs an OutlinedPolygonShape in the form of a box with the given parameters, position, width, height.

Parameters
widthThe width of the box, the units are in pixels unless projection/view matrix changed.
heightThe vertical size of the box, in pixel units unless projection/view matrix changed.
fillColorWhat color the box should be when rendered, can be changed later with SetColor(), defaults to White.
outlineColorWhat color the outline of the box should be when rendered, defaults to black.
positionThe position of the top-left corner of the box... TODO: TIM: Documentation: Check this fact, it may be different depending on anchor point.
virtual TurtleBrains::Graphics::OutlinedBoxShape::~OutlinedBoxShape ( void  )
virtual

Destroys an outlined box object.