Gorgon Game Engine
Drawable Class Referenceabstract

Represents a drawable object, that can be drawn to the given point. More...

Inheritance diagram for Drawable:
[legend]

Public Member Functions

virtual ~Drawable ()
 
void Draw (TextureTarget &target, const Geometry::Point &p, RGBAf color=RGBAf(1.f)) const
 Draw to the given coordinates. More...
 
void Draw (TextureTarget &target, const Geometry::Pointf &p, RGBAf color=RGBAf(1.f)) const
 Draw to the given coordinates. More...
 
void Draw (TextureTarget &target, float x, float y, RGBAf color=RGBAf(1.f)) const
 Draw to the given coordinates. More...
 
void Draw (TextureTarget &target, int x, int y, RGBAf color=RGBAf(1.f)) const
 Draw to the given coordinates. More...
 

Protected Member Functions

virtual void draw (TextureTarget &target, const Geometry::Pointf &p, RGBAf color) const =0
 This is the only function that needs to implemented for a drawable. More...
 

Detailed Description

Represents a drawable object, that can be drawn to the given point.

Size of the object is assumed to be fixed. Drawing a single drawable can cause many texture to be added to the given texture target

Constructor & Destructor Documentation

◆ ~Drawable()

virtual ~Drawable ( )
virtual

Member Function Documentation

◆ Draw() [1/4]

void Draw ( TextureTarget target,
const Geometry::Point p,
RGBAf  color = RGBAf(1.f) 
) const

Draw to the given coordinates.

◆ draw()

virtual void draw ( TextureTarget target,
const Geometry::Pointf p,
RGBAf  color 
) const
protectedpure virtual

This is the only function that needs to implemented for a drawable.

Implemented in Rectangle, Line, RectangularDrawable, basic_InstanceInjection< Graphics::RectangularAnimation >, basic_AnimatedPointer< A_ >, and DrawablePointer.

◆ Draw() [2/4]

void Draw ( TextureTarget target,
const Geometry::Pointf p,
RGBAf  color = RGBAf(1.f) 
) const

Draw to the given coordinates.

◆ Draw() [3/4]

void Draw ( TextureTarget target,
float  x,
float  y,
RGBAf  color = RGBAf(1.f) 
) const

Draw to the given coordinates.

◆ Draw() [4/4]

void Draw ( TextureTarget target,
int  x,
int  y,
RGBAf  color = RGBAf(1.f) 
) const

Draw to the given coordinates.


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