YourCityInvadedByAliens
Documentation for code of the game
Public Member Functions | Private Attributes | List of all members
RenderLine Class Reference

#include <render_line.h>

Inheritance diagram for RenderLine:
Inheritance graph
[legend]
Collaboration diagram for RenderLine:
Collaboration graph
[legend]

Public Member Functions

 RenderLine (const CoordXY &p1, const CoordXY &p2, const RenderColor &color, int nPositionZ=0)
 
virtual void modify (const GameState &state, IRenderWindow *pRenderWindow) override
 
virtual bool canDraw (const GameState &state) override
 
virtual void draw (SDL_Renderer *renderer) override
 
const CoordXYgetAbsoluteCoord1 ()
 
const CoordXYgetAbsoluteCoord2 ()
 
const CoordXYgetCoord1 ()
 
const CoordXYgetCoord2 ()
 
void updateAbsoluteCoords (const CoordXY &p1, const CoordXY &p2)
 
- Public Member Functions inherited from RenderObject
 RenderObject (int nPositionZ)
 
virtual ~RenderObject ()
 
int getPositionZ ()
 
bool isDestroyed ()
 
void destroy ()
 
int randomNoise ()
 

Private Attributes

CoordXY m_startCoord1
 
CoordXY m_startCoord2
 
CoordXY m_coord1
 
CoordXY m_coord2
 
RenderColor m_color
 

Additional Inherited Members

- Protected Attributes inherited from RenderObject
bool m_bDestroyed
 

Constructor & Destructor Documentation

◆ RenderLine()

RenderLine::RenderLine ( const CoordXY p1,
const CoordXY p2,
const RenderColor color,
int  nPositionZ = 0 
)

Member Function Documentation

◆ canDraw()

bool RenderLine::canDraw ( const GameState state)
overridevirtual

Implements RenderObject.

◆ draw()

void RenderLine::draw ( SDL_Renderer *  renderer)
overridevirtual

Implements RenderObject.

◆ getAbsoluteCoord1()

const CoordXY & RenderLine::getAbsoluteCoord1 ( )

◆ getAbsoluteCoord2()

const CoordXY & RenderLine::getAbsoluteCoord2 ( )

◆ getCoord1()

const CoordXY & RenderLine::getCoord1 ( )

◆ getCoord2()

const CoordXY & RenderLine::getCoord2 ( )

◆ modify()

void RenderLine::modify ( const GameState state,
IRenderWindow pRenderWindow 
)
overridevirtual

Reimplemented from RenderObject.

◆ updateAbsoluteCoords()

void RenderLine::updateAbsoluteCoords ( const CoordXY p1,
const CoordXY p2 
)

Member Data Documentation

◆ m_color

RenderColor RenderLine::m_color
private

◆ m_coord1

CoordXY RenderLine::m_coord1
private

◆ m_coord2

CoordXY RenderLine::m_coord2
private

◆ m_startCoord1

CoordXY RenderLine::m_startCoord1
private

◆ m_startCoord2

CoordXY RenderLine::m_startCoord2
private

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