SUPER Space invader : Turbo edition DX - VS GOD 1.0.0
A simple space invader ripoff
MinGL Class Reference

Classe de base de minGL 2. More...

#include <mingl.h>

Public Types

typedef std::pair< unsigned, bool > KeyType_t
 KeyType_t : Représente une touche du clavier. More...
 
typedef std::map< KeyType_t, bool > KeyMap_t
 KeyMap_t : Map représentant des touches et leurs état (pressée ou non). More...
 

Public Member Functions

 MinGL (const std::string &name, const nsGraphics::Vec2D &windowSize=nsGraphics::Vec2D(640, 480), const nsGraphics::Vec2D &windowPosition=nsGraphics::Vec2D(128, 128), const nsGraphics::RGBAcolor &backgroundColor=nsGraphics::KWhite)
 Constructeur pour la classe MinGL. More...
 
 ~MinGL ()
 Destructeur de la classe MinGL. More...
 
void initGraphic ()
 Initialise minGL et ouvre la fenêtre. More...
 
void stopGraphic ()
 Ferme la fenêtre et minGL proprement. More...
 
bool isPressed (const KeyType_t &key)
 Renvoie l'état d'une touche du clavier (pressée ou non) More...
 
void resetKey (const KeyType_t &key)
 Force une touche a être relâchée. More...
 
void finishFrame ()
 Préviens minGL que la frame est terminée. More...
 
void clearScreen ()
 Efface l'écran avec la couleur de fond spécifiée. More...
 
nsEvent::EventManagergetEventManager ()
 Récupère le gestionnaire d'évènements minGL. More...
 
const nsGraphics::RGBAcolorgetBackgroundColor () const
 Récupère la couleur de fond de la fenêtre. More...
 
void setBackgroundColor (const nsGraphics::RGBAcolor &backgroundColor)
 Règle la couleur de fond de la fenêtre. More...
 
nsGraphics::Vec2D getWindowSize () const
 Récupère la taille de la fenêtre. More...
 
void setWindowSize (const nsGraphics::Vec2D &windowSize)
 Règle la taille de la fenêtre. More...
 
nsGraphics::Vec2D getWindowPosition () const
 Récupère la Position de la fenêtre. More...
 
void setWindowPosition (const nsGraphics::Vec2D &windowPosition)
 Règle la Position de la fenêtre. More...
 
const std::string & getWindowName () const
 Récupère le nom de la fenêtre. More...
 
void setWindowName (const std::string &windowName)
 Règle le nom de la fenêtre. More...
 
bool isOpen () const
 Retourne si la fenêtre est ouverte. More...
 

Static Public Member Functions

static void initGlut ()
 Initialise la bibliothèque freeglut. More...
 

Detailed Description

Classe de base de minGL 2.

Definition at line 34 of file mingl.h.

Member Typedef Documentation

◆ KeyMap_t

typedef std::map<KeyType_t, bool> MinGL::KeyMap_t

KeyMap_t : Map représentant des touches et leurs état (pressée ou non).

La clé de cette map est un KeyType_t représentant une touche, et la valeur est son état.

Definition at line 55 of file mingl.h.

◆ KeyType_t

typedef std::pair<unsigned, bool> MinGL::KeyType_t

KeyType_t : Représente une touche du clavier.

C'est une paire de nombre entier naturel et booléen

  • L'entier naturel représente le caractère pour une touche non spéciale, ou l'identifiant de touche pour une touche spéciale (Voir ici pour les identifiants).
  • Le booléen indique si la touche est spéciale ou non.

Definition at line 47 of file mingl.h.

Constructor & Destructor Documentation

◆ MinGL()

MinGL::MinGL ( const std::string &  name,
const nsGraphics::Vec2D windowSize = nsGraphics::Vec2D(640, 480),
const nsGraphics::Vec2D windowPosition = nsGraphics::Vec2D(128, 128),
const nsGraphics::RGBAcolor backgroundColor = nsGraphics::KWhite 
)

Constructeur pour la classe MinGL.

Parameters
[in]name: Nom de la fenêtre
[in]windowSize: Taille de la fenêtre
[in]windowPosition: Position de la fenêtre
[in]backgroundColor: Couleur de fond de la fenêtre

◆ ~MinGL()

MinGL::~MinGL ( )

Destructeur de la classe MinGL.

Member Function Documentation

◆ clearScreen()

void MinGL::clearScreen ( )

Efface l'écran avec la couleur de fond spécifiée.

Here is the caller graph for this function:

◆ finishFrame()

void MinGL::finishFrame ( )

Préviens minGL que la frame est terminée.

Here is the caller graph for this function:

◆ getBackgroundColor()

const nsGraphics::RGBAcolor & MinGL::getBackgroundColor ( ) const

Récupère la couleur de fond de la fenêtre.

◆ getEventManager()

nsEvent::EventManager & MinGL::getEventManager ( )

Récupère le gestionnaire d'évènements minGL.

◆ getWindowName()

const std::string & MinGL::getWindowName ( ) const

Récupère le nom de la fenêtre.

◆ getWindowPosition()

nsGraphics::Vec2D MinGL::getWindowPosition ( ) const

Récupère la Position de la fenêtre.

◆ getWindowSize()

nsGraphics::Vec2D MinGL::getWindowSize ( ) const

Récupère la taille de la fenêtre.

Here is the caller graph for this function:

◆ initGlut()

static void MinGL::initGlut ( )
inlinestatic

Initialise la bibliothèque freeglut.

Definition at line 81 of file mingl.h.

Here is the caller graph for this function:

◆ initGraphic()

void MinGL::initGraphic ( )

Initialise minGL et ouvre la fenêtre.

Here is the caller graph for this function:

◆ isOpen()

bool MinGL::isOpen ( ) const

Retourne si la fenêtre est ouverte.

Here is the caller graph for this function:

◆ isPressed()

bool MinGL::isPressed ( const KeyType_t key)

Renvoie l'état d'une touche du clavier (pressée ou non)

Parameters
[in]key: Touche du clavier a vérifier
Here is the caller graph for this function:

◆ resetKey()

void MinGL::resetKey ( const KeyType_t key)

Force une touche a être relâchée.

Parameters
[in]key: Touche du clavier a relâcher
Here is the caller graph for this function:

◆ setBackgroundColor()

void MinGL::setBackgroundColor ( const nsGraphics::RGBAcolor backgroundColor)

Règle la couleur de fond de la fenêtre.

◆ setWindowName()

void MinGL::setWindowName ( const std::string &  windowName)

Règle le nom de la fenêtre.

Parameters
[in]windowName: Nouveau nom

◆ setWindowPosition()

void MinGL::setWindowPosition ( const nsGraphics::Vec2D windowPosition)

Règle la Position de la fenêtre.

Parameters
[in]windowPosition: Nouvelle Position

◆ setWindowSize()

void MinGL::setWindowSize ( const nsGraphics::Vec2D windowSize)

Règle la taille de la fenêtre.

Parameters
[in]windowSize: Nouvelle taille

◆ stopGraphic()

void MinGL::stopGraphic ( )

Ferme la fenêtre et minGL proprement.


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