FrameBufferManager Class Reference

#include <FrameBufferManager.h>

Inheritance diagram for FrameBufferManager:
ListenerObject

# Public Member Functions

override bool onEvent (ListenerObject eventFirer, uint16 eventCode)
void reset ()
 Reset the manager's state.
void setFrustum (CameraFrustum frustum)
CameraFrustum getFrustum ()
void print (int16 x, int16 y)

# Static Public Member Functions

static bool drawPoint (PixelVector point, int32 color, uint8 bufferIndex, bool interlaced)
static bool drawLine (PixelVector fromPoint, PixelVector toPoint, int32 color, uint8 bufferIndex, bool interlaced)
static bool drawCircle (PixelVector center, int16 radius, int32 color, uint8 bufferIndex, bool interlaced)
static bool drawX (PixelVector center, int16 length, int32 color, uint8 bufferIndex, bool interlaced)
static bool drawCross (PixelVector center, int16 length, int32 color, uint8 bufferIndex, bool interlaced)
static bool drawSolidCircle (PixelVector center, int16 radius, int32 color, uint8 bufferIndex, bool interlaced)
static bool drawSolidRhumbus (PixelVector center, int16 radius, int32 color, uint8 bufferIndex, bool interlaced)

# Protected Attributes

uint16 drawnPixelsCounter
 Number of pixels drawn during the current cycle.
uint16 maximumPixelsToDraw
 Maximum number of pixels to draw during each cycle.
uint32 currentDrawingFrameBufferSet
 Frame buffers set using during the current game frame.

# Additional Inherited Members

- Private Member Functions inherited from ListenerObject
void constructor ()
 Class' constructor.
void destructor ()
 Class' destructor.
void addEventListener (ListenerObject listener, uint16 eventCode)
void removeEventListener (ListenerObject listener, uint16 eventCode)
void removeEventListeners (uint16 eventCode)
void removeAllEventListeners ()
 Remove all listener objects.
bool hasActiveEventListeners ()
void fireEvent (uint16 eventCode)
void sendMessageTo (ListenerObject receiver, uint32 message, uint32 delay, uint32 randomDelay)
void sendMessageToSelf (uint32 message, uint32 delay, uint32 randomDelay)
void discardAllMessages ()
 Discard all messages, both to be sent and to be received.
void discardMessages (uint32 message)
virtual bool handleMessage (Telegram telegram)
- Private Attributes inherited from ListenerObject
VirtualList events
 List of registered events.
int8 eventFirings
 Counter that keeps track of the number of fired events to prevent race conditions in nested firings.

# Detailed Description

Class FrameBufferManager

Inherits from Object

Implements various draw rutines that manipulate the frame buffers.

Definition at line 39 of file FrameBufferManager.h.

# Member Function Documentation

# drawCircle()

static bool FrameBufferManager::drawCircle ( PixelVector center,
int16 radius,
int32 color,
uint8 bufferIndex,
bool interlaced )
static

Draw a circle.

Parameters
centerCircle's center
radiusCircle's radius
colorColor of the point to draw (only non black)
bufferIndexBuffer set index for interlaced drawing
interlacedIf true, the drawing is interlaced
Returns
True if a pixel was written to the frame buffers

Definition at line 528 of file FrameBufferManager.c.

# drawCross()

static bool FrameBufferManager::drawCross ( PixelVector center,
int16 length,
int32 color,
uint8 bufferIndex,
bool interlaced )
static

Draw a cross.

Parameters
centerCross' center
lengthCross' arms length
colorColor of the point to draw (only non black)
bufferIndexBuffer set index for interlaced drawing
interlacedIf true, the drawing is interlaced
Returns
True if a pixel was written to the frame buffers

Definition at line 750 of file FrameBufferManager.c.

# drawLine()

static bool FrameBufferManager::drawLine ( PixelVector fromPoint,
PixelVector toPoint,
int32 color,
uint8 bufferIndex,
bool interlaced )
static

Draw a line.

Parameters
fromPointLine's starting point
toPointLine's ending point
colorColor of the point to draw (only non black)
bufferIndexBuffer set index for interlaced drawing
interlacedIf true, the drawing is interlaced
Returns
True if a pixel was written to the frame buffers

Definition at line 289 of file FrameBufferManager.c.

# drawPoint()

static bool FrameBufferManager::drawPoint ( PixelVector point,
int32 color,
uint8 bufferIndex,
bool interlaced )
static

Draw a single point.

Parameters
pointScreen coordinate where to draw the point
colorColor of the point to draw (only non black)
bufferIndexBuffer set index for interlaced drawing
interlacedIf true, the drawing is interlaced
Returns
True if a pixel was written to the frame buffers

Definition at line 261 of file FrameBufferManager.c.

# drawSolidCircle()

static bool FrameBufferManager::drawSolidCircle ( PixelVector center,
int16 radius,
int32 color,
uint8 bufferIndex,
bool interlaced )
static

Draw a solid circle.

Parameters
centerCircle's center
radiusCircle's radius
colorColor of the point to draw (only non black)
bufferIndexBuffer set index for interlaced drawing
interlacedIf true, the drawing is interlaced
Returns
True if a pixel was written to the frame buffers

Definition at line 801 of file FrameBufferManager.c.

# drawSolidRhumbus()

static bool FrameBufferManager::drawSolidRhumbus ( PixelVector center,
int16 radius,
int32 color,
uint8 bufferIndex,
bool interlaced )
static

Draw a solid rhombus.

Parameters
centerRhombus' center
radiusRhombus' radius
colorColor of the point to draw (only non black)
bufferIndexBuffer set index for interlaced drawing
interlacedIf true, the drawing is interlaced
Returns
True if a pixel was written to the frame buffers

Definition at line 843 of file FrameBufferManager.c.

# drawX()

static bool FrameBufferManager::drawX ( PixelVector center,
int16 length,
int32 color,
uint8 bufferIndex,
bool interlaced )
static

Draw an X.

Parameters
centerX's center
lengthX's arms length
colorColor of the point to draw (only non black)
bufferIndexBuffer set index for interlaced drawing
interlacedIf true, the drawing is interlaced
Returns
True if a pixel was written to the frame buffers

Definition at line 692 of file FrameBufferManager.c.

# getFrustum()

CameraFrustum FrameBufferManager::getFrustum ( )

Retrieve the frustum where drawing is allowed.

Returns
3D boundary when drawing is allowed

Definition at line 1208 of file FrameBufferManager.c.

# onEvent()

bool FrameBufferManager::onEvent ( ListenerObject eventFirer,
uint16 eventCode )
virtual

Process an event that the instance is listen for.

Parameters
eventFirerListenerObject that signals the event
eventCodeCode of the firing event
Returns
False if the listener has to be removed; true to keep it

Reimplemented from ListenerObject.

Definition at line 1090 of file FrameBufferManager.c.

# print()

void FrameBufferManager::print ( int16 x,
int16 y )

Print the manager's current status.

Parameters
xScreen x coordinate where to print
yScreen y coordinate where to print

Definition at line 1216 of file FrameBufferManager.c.

# reset()

secure void FrameBufferManager::reset ( )

Reset the manager's state.

Definition at line 1146 of file FrameBufferManager.c.

# setFrustum()

void FrameBufferManager::setFrustum ( CameraFrustum frustum)

Configure the frustum where drawing is allowed.

Parameters
frustum3D boundary when drawing is allowed

Definition at line 1158 of file FrameBufferManager.c.

# Member Data Documentation

# currentDrawingFrameBufferSet

uint32 FrameBufferManager::currentDrawingFrameBufferSet
protected

Frame buffers set using during the current game frame.

Definition at line 50 of file FrameBufferManager.h.

# drawnPixelsCounter

uint16 FrameBufferManager::drawnPixelsCounter
protected

Number of pixels drawn during the current cycle.

Definition at line 44 of file FrameBufferManager.h.

# maximumPixelsToDraw

uint16 FrameBufferManager::maximumPixelsToDraw
protected

Maximum number of pixels to draw during each cycle.

Definition at line 47 of file FrameBufferManager.h.


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