Dragonfly 4.20
A text-based game engine
Public Member Functions | Private Attributes | List of all members
df::Circle Class Reference

Public Member Functions

 Circle (Vector init_center, float init_radius)
 
 Circle ()
 
void setCenter (Vector new_center)
 
Vector getCenter () const
 
void setRadius (float new_radius)
 
float getRadius () const
 
std::string toString () const
 

Private Attributes

Vector m_center
 
float m_radius
 

Constructor & Destructor Documentation

◆ Circle() [1/2]

df::Circle::Circle ( Vector  init_center,
float  init_radius 
)

Create circle at center with radius r.

◆ Circle() [2/2]

df::Circle::Circle ( )

Default circle segment is at (0,0) with radius 0.

Member Function Documentation

◆ getCenter()

Vector df::Circle::getCenter ( ) const

Get center.

◆ getRadius()

float df::Circle::getRadius ( ) const

Get radius.

◆ setCenter()

void df::Circle::setCenter ( Vector  new_center)

Set center.

◆ setRadius()

void df::Circle::setRadius ( float  new_radius)

Set radius.

◆ toString()

std::string df::Circle::toString ( ) const

Return attributes as string.

Member Data Documentation

◆ m_center

Vector df::Circle::m_center
private

Circle middle.

◆ m_radius

float df::Circle::m_radius
private

Circle raduis.