Dura2D  v0.1.0
An educational 2D game physics library
Loading...
Searching...
No Matches
d2Draw Class Referenceabstract

#include <d2Draw.h>

Public Types

enum  {
  e_shapeBit = 0x0001 , e_meshBit = 0x0002 , e_aabbBit = 0x0004 , e_aabbTreeBit = 0x0008 ,
  e_transformBit = 0x0010 , e_jointBit = 0x0020
}
 

Public Member Functions

 d2Draw ()=default
 
virtual ~d2Draw ()
 
void SetFlags (uint32 flags)
 
uint32 GetFlags () const
 
void AppendFlags (uint32 flags)
 
void ClearFlags (uint32 flags)
 
virtual void DrawPolygon (const d2Vec2 *vertices, int32 vertexCount, const float &angle, const d2Color &color) const =0
 
virtual void DrawSolidPolygon (const d2Vec2 *vertices, int32 vertexCount, const float &angle, const bool &mesh, const d2Color &color) const =0
 
virtual void DrawCircle (const d2Vec2 &center, float radius, const float &angle, const d2Color &color) const =0
 
virtual void DrawSolidCircle (const d2Vec2 &center, float radius, const float &angle, const d2Color &color) const =0
 
virtual void DrawTransform (const d2Transform &transform) const =0
 
virtual void DrawSegment (const d2Vec2 &p1, const d2Vec2 &p2, const d2Color &color) const =0
 

Protected Attributes

uint32 m_flags {e_shapeBit}
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
e_shapeBit 

draw shapes

e_meshBit 

draw meshes

e_aabbBit 

draw axis aligned bounding boxes

e_aabbTreeBit 

draw AABB tree

e_transformBit 

draw transforms

e_jointBit 

draw joints

Constructor & Destructor Documentation

◆ d2Draw()

d2Draw::d2Draw ( )
default

◆ ~d2Draw()

virtual d2Draw::~d2Draw ( )
inlinevirtual

Member Function Documentation

◆ AppendFlags()

void d2Draw::AppendFlags ( uint32 flags)
inline

◆ ClearFlags()

void d2Draw::ClearFlags ( uint32 flags)
inline

◆ DrawCircle()

virtual void d2Draw::DrawCircle ( const d2Vec2 & center,
float radius,
const float & angle,
const d2Color & color ) const
pure virtual

◆ DrawPolygon()

virtual void d2Draw::DrawPolygon ( const d2Vec2 * vertices,
int32 vertexCount,
const float & angle,
const d2Color & color ) const
pure virtual

◆ DrawSegment()

virtual void d2Draw::DrawSegment ( const d2Vec2 & p1,
const d2Vec2 & p2,
const d2Color & color ) const
pure virtual

◆ DrawSolidCircle()

virtual void d2Draw::DrawSolidCircle ( const d2Vec2 & center,
float radius,
const float & angle,
const d2Color & color ) const
pure virtual

◆ DrawSolidPolygon()

virtual void d2Draw::DrawSolidPolygon ( const d2Vec2 * vertices,
int32 vertexCount,
const float & angle,
const bool & mesh,
const d2Color & color ) const
pure virtual

◆ DrawTransform()

virtual void d2Draw::DrawTransform ( const d2Transform & transform) const
pure virtual

◆ GetFlags()

uint32 d2Draw::GetFlags ( ) const
inline

◆ SetFlags()

void d2Draw::SetFlags ( uint32 flags)
inline

Member Data Documentation

◆ m_flags

uint32 d2Draw::m_flags {e_shapeBit}
protected

The documentation for this class was generated from the following file: