Bomberman
Public Member Functions | Private Attributes | List of all members
RAY::Drawables::Drawables2D::Circle Class Reference

Circle in a two-dimensionnal space. More...

#include <Circle.hpp>

Inheritance diagram for RAY::Drawables::Drawables2D::Circle:
Collaboration diagram for RAY::Drawables::Drawables2D::Circle:

Public Member Functions

 Circle (const Vector2 &centerPos, int radius, const Color &color)
 Circle constructor. More...
 
 Circle (int centerPosX, int centerPosY, int radius, const Color &color)
 Circle constructor. More...
 
 Circle (const Circle &)=default
 A default copy constructor. More...
 
Circleoperator= (const Circle &)=default
 A circle is assignable. More...
 
 ~Circle () override=default
 A default destructor. More...
 
int getRadius (void) const
 
CirclesetRadius (int radius)
 set radius More...
 
void drawOn (RAY::Window &) override
 Draw point on window. More...
 
void drawOn (RAY::Image &image) override
 Draw point on image. More...
 
- Public Member Functions inherited from RAY::Drawables::ADrawable2D
 ADrawable2D (const Vector2 &position, const RAY::Color &color, float scale=1, float rotation=0)
 ADrawable constructor. More...
 
 ADrawable2D (int x, int y, const RAY::Color &color, float scale=1, float rotation=0)
 ADrawable constructor. More...
 
 ADrawable2D (const ADrawable2D &)=default
 A default copy constructor. More...
 
 ~ADrawable2D () override=default
 A default destructor. More...
 
const RAY::Vector2getPosition (void) const
 
const RAY::ColorgetColor (void) const
 
ADrawable2DsetPosition (const Vector2 &position)
 set Top-left position More...
 
ADrawable2DsetPosition (int x, int y)
 set Top-left position More...
 
ADrawable2DsetColor (const Color &color)
 set color More...
 
float getScale () const
 scale getter More...
 
void setScale (float scale)
 scale setters More...
 
- Public Member Functions inherited from RAY::Drawables::IDrawable
virtual ~IDrawable ()=default
 

Private Attributes

int _radius
 Radius of the circle. More...
 

Additional Inherited Members

- Protected Attributes inherited from RAY::Drawables::ADrawable2D
float _rotation = 0
 rotation More...
 
float _scale = 1
 scale More...
 
Vector2 _position
 Top-left position. More...
 
Color _color
 Color of the ADrawable. More...
 

Detailed Description

Circle in a two-dimensionnal space.

Constructor & Destructor Documentation

◆ Circle() [1/3]

RAY::Drawables::Drawables2D::Circle::Circle ( const Vector2 centerPos,
int  radius,
const Color color 
)

Circle constructor.

Parameters
centerPosposition of center point
radiusradius of the circle
ColorColor of the circle

◆ Circle() [2/3]

RAY::Drawables::Drawables2D::Circle::Circle ( int  centerPosX,
int  centerPosY,
int  radius,
const Color color 
)

Circle constructor.

Parameters
centerPosXx-position of center point
centerPosYy-position of center point
radiusradius of the circle
ColorColor of the circle

◆ Circle() [3/3]

RAY::Drawables::Drawables2D::Circle::Circle ( const Circle )
default

A default copy constructor.

◆ ~Circle()

RAY::Drawables::Drawables2D::Circle::~Circle ( )
overridedefault

A default destructor.

Member Function Documentation

◆ drawOn() [1/2]

void RAY::Drawables::Drawables2D::Circle::drawOn ( RAY::Image image)
overridevirtual

Draw point on image.

Implements RAY::Drawables::ADrawable2D.

◆ drawOn() [2/2]

void RAY::Drawables::Drawables2D::Circle::drawOn ( RAY::Window )
overridevirtual

Draw point on window.

Implements RAY::Drawables::ADrawable2D.

◆ getRadius()

int RAY::Drawables::Drawables2D::Circle::getRadius ( void  ) const
Returns
the radius of the circle

◆ operator=()

Circle& RAY::Drawables::Drawables2D::Circle::operator= ( const Circle )
default

A circle is assignable.

◆ setRadius()

Circle & RAY::Drawables::Drawables2D::Circle::setRadius ( int  radius)

set radius

Member Data Documentation

◆ _radius

int RAY::Drawables::Drawables2D::Circle::_radius
private

Radius of the circle.


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