Back to bsyte

Canvas3D Class Reference

Schnittstelle zur Render-Engine. Beinhaltet OS-spezifisches Sourcecode. More...

#include <Canvas3D.h>

Collaboration diagram for Canvas3D:

List of all members.

Public Member Functions

void paint (void)
 Zentrale Methode zum Rendern der Map.
bool init (char *fname)
 initialisiert die Canvas - Laedt die binaere Mapdatei
void initialize (int widthCanvas, int heightCanvas, int width, int height)
 Initialisiert die Canvas und den Renderer.
void renderFrame (void)
 Rendert ein Frame in das Image.
void activateMouse (bool)
 Maus-Input aktivieren.
bool inputKey (bool pressed, int key)
 Eingabe und Konvertierung eines keycodes.
bool inputMouse (int x, int y)
 Eingabe fuer Maus-Input.
double getFrameRate (void)
 Getter fuer die Framerate.
int getTilesPerFrame (void)
 Getter fuer die Anzahl der gerenderten Tiles im aktuellen Frame.
int getPartikelsPerFrame (void)
 Getter fuer die Anzahl der gerenderten Partikel im aktuellen Frame.
virtual ~Canvas3D ()
 Destruktor.

Static Public Member Functions

static Canvas3DgetInstance ()
 Liefert die Singleton-Instanz.

Public Attributes

BYTE * m_pDiData

Protected Member Functions

 Canvas3D ()
 Konstruktor.

Private Member Functions

bool createImage ()
 Erstellt das Image (hier fuer Mac/OpenGL als einfachen Speicherbereich (BYTE-Array)
void InitBitmap (BYTE *pDiData, int cxWinSize, int cyWinSize)
 Initialisiert die Bitmap.
void flipImage (void)
 Windows-Bitmap --> OpenGL Image: 1. Ursprung von oben links nach unten links 2. BGR --> RGB.

Private Attributes

Enginem_engine
int m_widthCanvas
int m_heightCanvas
int m_height
int m_width
bool m_activateMouse
int m_startX
int m_startY
BYTE * m_pDib

Static Private Attributes

static Canvas3D_instance = 0

Detailed Description

Schnittstelle zur Render-Engine. Beinhaltet OS-spezifisches Sourcecode.


Constructor & Destructor Documentation

Canvas3D::Canvas3D ( ) [protected]

Konstruktor.

Here is the call graph for this function:

Here is the caller graph for this function:

Canvas3D::~Canvas3D ( ) [virtual]

Destruktor.


Member Function Documentation

void Canvas3D::activateMouse ( bool  activateMouse)

Maus-Input aktivieren.

Parameters:
activateMouse
bool Canvas3D::createImage ( ) [private]

Erstellt das Image (hier fuer Mac/OpenGL als einfachen Speicherbereich (BYTE-Array)

Returns:
true-->OK, false-->Fehler

Here is the call graph for this function:

Here is the caller graph for this function:

void Canvas3D::flipImage ( void  ) [private]

Windows-Bitmap --> OpenGL Image: 1. Ursprung von oben links nach unten links 2. BGR --> RGB.

Here is the caller graph for this function:

double Canvas3D::getFrameRate ( void  )

Getter fuer die Framerate.

Returns:
frames per second

Here is the call graph for this function:

Canvas3D * Canvas3D::getInstance ( ) [static]

Liefert die Singleton-Instanz.

Returns:
Pointer auf die Instanz

Here is the call graph for this function:

Here is the caller graph for this function:

int Canvas3D::getPartikelsPerFrame ( void  )

Getter fuer die Anzahl der gerenderten Partikel im aktuellen Frame.

Returns:
partikel per second

Here is the call graph for this function:

int Canvas3D::getTilesPerFrame ( void  )

Getter fuer die Anzahl der gerenderten Tiles im aktuellen Frame.

Returns:
tiles per frame

Here is the call graph for this function:

bool Canvas3D::init ( char *  datFile)

initialisiert die Canvas - Laedt die binaere Mapdatei

Parameters:
datFilePfad-Dateiname+Extension der (binaeren) Mapdatei
Returns:
true-->OK, false-->Fehler

Here is the call graph for this function:

void Canvas3D::InitBitmap ( BYTE *  pDiData,
int  cxWinSize,
int  cyWinSize 
) [private]

Initialisiert die Bitmap.

Parameters:
pDiDataPointer auf Bitmap
cxWinSizeBreite der Bitmap
cyWinSizeHoehe der Bitmap

Here is the caller graph for this function:

void Canvas3D::initialize ( int  widthCanvas,
int  heightCanvas,
int  width,
int  height 
)

Initialisiert die Canvas und den Renderer.

Parameters:
widthCanvasBreite der Canvas
heightCanvasHoehe der Canvas
widthBreite
heightHoehe

Here is the call graph for this function:

bool Canvas3D::inputKey ( bool  pressed,
int  key 
)

Eingabe und Konvertierung eines keycodes.

Parameters:
pressedtrue-->Taste wurde gedrueckt, false->Taste wurde losgelassen
keyKeycode (Anhaengig vom Betriebssystem)

Here is the call graph for this function:

bool Canvas3D::inputMouse ( int  dx,
int  dy 
)

Eingabe fuer Maus-Input.

Parameters:
dxHorizontale Distanz (in Pixel) zwischen zwei Samples
dyVertikale Distanz (in Pixel) zwischen zwei Samples

Here is the call graph for this function:

void Canvas3D::paint ( void  )

Zentrale Methode zum Rendern der Map.

Zentrale Methode zum Rendern der Map

void Canvas3D::renderFrame ( void  )

Rendert ein Frame in das Image.

Here is the call graph for this function:


Member Data Documentation

Canvas3D * Canvas3D::_instance = 0 [static, private]
bool Canvas3D::m_activateMouse [private]
int Canvas3D::m_height [private]
int Canvas3D::m_heightCanvas [private]
BYTE* Canvas3D::m_pDib [private]
int Canvas3D::m_startX [private]
int Canvas3D::m_startY [private]
int Canvas3D::m_width [private]
int Canvas3D::m_widthCanvas [private]

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