igraphic 0.2.0
Contrats graphiques chargeables : IGraphic2Module / IGraphic3Module
Loading...
Searching...
No Matches
graphic::IPolygon Interface Referenceabstract

Polygon interface. More...

#include <IPolygon.hpp>

Public Member Functions

virtual ~IPolygon ()=default
 Destroy the IPolygon object.
 
virtual Color getColor () const =0
 Get the Color object.
 
virtual void setColor (Color position)=0
 Set the Color object.
 
virtual bool isReady () const =0
 Get the Position object.
 
virtual Vector2f getPosition () const =0
 Get the Position object.
 
virtual void setPosition (Vector2f position)=0
 Set the Position object.
 
virtual std::vector< Vector2f > getPoints () const =0
 Get the Points object.
 

Detailed Description

Polygon interface.

The contract speaks in POINTS, never in triangles : createPolygon() takes vertices, getPoints() returns them. Triangulating is a vendor detail - raylib turns it into DrawTriangle calls, sfml into an sf::VertexArray, and both keep the result private. A Triangle in this file would have no method to serve.

The type doing the actual work is Triangle<T> from system (Shape.hpp), at global scope.

Constructor & Destructor Documentation

◆ ~IPolygon()

virtual graphic::IPolygon::~IPolygon ( )
virtualdefault

Destroy the IPolygon object.

Member Function Documentation

◆ getColor()

virtual Color graphic::IPolygon::getColor ( ) const
pure virtual

Get the Color object.

Returns
Color

◆ getPoints()

virtual std::vector< Vector2f > graphic::IPolygon::getPoints ( ) const
pure virtual

Get the Points object.

Returns
std::vector<Vector2f>

◆ getPosition()

virtual Vector2f graphic::IPolygon::getPosition ( ) const
pure virtual

Get the Position object.

Returns
Vector2f

◆ isReady()

virtual bool graphic::IPolygon::isReady ( ) const
pure virtual

Get the Position object.

Returns
Vector2f

◆ setColor()

virtual void graphic::IPolygon::setColor ( Color  position)
pure virtual

Set the Color object.

Parameters
position

◆ setPosition()

virtual void graphic::IPolygon::setPosition ( Vector2f  position)
pure virtual

Set the Position object.

Parameters
position

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