VizKit  3.0
Static Public Member Functions | Private Member Functions
VizKit::VisualActorGraphics Class Reference

#include <VisualActorGraphics.h>

List of all members.

Static Public Member Functions

static uint8 getError (char *errorString)
static void setBackgroundColor (const RGBAColor &aColorVal)
static RGBAColor getBackgroundColor (void)
static uint32createARGBCheckPixels (uint32 width, uint32 height)
static uint32createBGRACheckPixels (uint32 width, uint32 height)
static uint32createRGBACheckPixels (uint32 width, uint32 height)
static uint32createABGRCheckPixels (uint32 width, uint32 height)
static uint32 getNextFreeTextureName (void)
static void deleteTextures (const uint16 numberOfTextures, const uint32 *const textureNames)
static void resetModelViewMatrix (void)
static void enableAlphaBlending (void)
static void disableBlending (void)
static bool getCoordsOfPixelPosition (double xPixelPos, double yPixelPos, double zAxisPos, double *xCoordPos, double *yCoordPos, double *zCoordPos)
static bool getPixelsOfCoordPosition (double xCoordPos, double yCoordPos, double zCoordPos, double *xPixelPos, double *yPixelPos, double *zAxisPos)
static size_t getCanvasPixelWidth (void)
static size_t getCanvasPixelHeight (void)
static RelationalRect getViewportOrientationAndAspectRatio (void)
static uint16 xCoordToPixel (double coordPos, const VisualCamera &aCamera)
static uint16 yCoordToPixel (double coordPos, const VisualCamera &aCamera)
static double xPixelToCoord (const uint16 pixelPos, const VisualCamera &aCamera)
static double yPixelToCoord (const uint16 pixelPos, const VisualCamera &aCamera)
static Coord getCirclePoint (uint32 sliceIdx, uint32 slicesCount, double radius=1.0, Coord circleCenter=zeroCoord)
static void spotGL (double zPlane=0.0)
static void drawSpot (const double xNum, const double yNum, const double r, const double g, const double b, uint16 waveformIntensityVal, double intensity, const uint8 tailSize)
static void drawProjectionMetrics (const VisualCamera &aCamera)
static void loadModelViewIdentityMatrix (void)
static void prepareProcessMonitorShow (RGBAColor &theColor)
static void showProcessInfoRow (Coord coord, const char *const textRowStr)
static void showProcessInfoNote (void)
static void drawVertexChain (const VertexChain &vertexChain, int drawMode=kGL_LINE_LOOP, BlendMode aBlendMode=kReplace)
static void drawWaveform (const sint16 historyNum, const uint16 maxNumberOfHistories, const uint32 numberOfWaveformEntries, const sint16 **const waveformDataMonoArray, const VisualCamera &aCamera)
static void drawSpectrumAnalyzer (const sint16 currHistoryNum, const uint16 numberOfHistories, const uint32 numberOfSpectrumEntries, const uint16 numberOfAudioChannels, const uint8 ***const spectrumDataArray, const VisualCamera &aCamera)
static void drawSpectrogram (const sint16 currHistoryNum, const uint16 numberOfHistories, const uint32 numberOfSpectrumEntries, const uint16 numberOfAudioChannels, const uint8 ***const spectrumDataArray, const VisualCamera &aCamera)
static void drawBeatHistogram (const uint32 *const beatHistogram, const VisualCamera &aCamera)
static void drawTrackProgressMeter (ConstVertexChainRef const progressMeterBackgroundVertices, ConstVertexChainRef const progressMeterVertices, ConstVertexChainRef const progressMeterOutlineVertices)
static void doFallbackActorShow (const char *const visualActorName)
static void translateMatrix (double xNum, double yNum, double zNum)
static void rotateMatrix (double angle, double xAmount, double yAmount, double zAmount)
static void scaleMatrix (double xFactor, double yFactor, double zFactor)
static void enableDepthTest (void)
static void disableDepthTest (void)
static void enableCullFace (void)
static void disableCullFace (void)
static void cullFaceFront (void)
static void cullFaceBack (void)

Private Member Functions

 VisualActorGraphics ()
 ~VisualActorGraphics ()

Detailed Description

The graphics related static functions for the Visual Actors. By gathering the graphics related calls of the Visual Actors, it is easier to track and isolate possible problems. All functions of VisualActorGraphics are static. Most of the time, functions of VisualActorGraphics are executed by VisualGraphics. The static functions of VisualActorGraphics are expected to change more often than the methods of the VisualGraphics class. The static functions of VisualActorGraphics are aggregates of graphical operations.


Constructor & Destructor Documentation

The constructor.

The destructor.


Member Function Documentation

static uint32* VizKit::VisualActorGraphics::createABGRCheckPixels ( uint32  width,
uint32  height 
) [static]

Creates an image buffer with 8-bit per channel ABGR pixel data.

Parameters:
widthThe width of the bitmap data.
heightThe height of the bitmap data.
Returns:
A pointer to pointer to pixel data.
static uint32* VizKit::VisualActorGraphics::createARGBCheckPixels ( uint32  width,
uint32  height 
) [static]

Creates an image buffer with 8-bit per channel ARGB pixel data.

Parameters:
widthThe width of the bitmap data.
heightThe height of the bitmap data.
Returns:
A pointer to pointer to pixel data.
static uint32* VizKit::VisualActorGraphics::createBGRACheckPixels ( uint32  width,
uint32  height 
) [static]

Creates an image buffer with 8-bit per channel BGRA pixel data.

Parameters:
widthThe width of the bitmap data.
heightThe height of the bitmap data.
Returns:
A pointer to pointer to pixel data.
static uint32* VizKit::VisualActorGraphics::createRGBACheckPixels ( uint32  width,
uint32  height 
) [static]

Creates an image buffer with 8-bit per channel RGBA pixel data.

Parameters:
widthThe width of the bitmap data.
heightThe height of the bitmap data.
Returns:
A pointer to pointer to pixel data.
void VisualActorGraphics::cullFaceBack ( void  ) [static]

Specifies that back-facing facets can be culled.

void VisualActorGraphics::cullFaceFront ( void  ) [static]

Specifies that front-facing facets can be culled.

void VisualActorGraphics::deleteTextures ( const uint16  numberOfTextures,
const uint32 *const  textureNames 
) [static]

Frees memory bound by OpenGL textures.

Parameters:
numberOfTexturesThe number of textures to free.
textureNamesPointer to texture names (texture numbers) to free.
void VisualActorGraphics::disableBlending ( void  ) [static]

Disables blending.

void VisualActorGraphics::disableCullFace ( void  ) [static]

Disables GL_CULL_FACE.

void VisualActorGraphics::disableDepthTest ( void  ) [static]

Disables GL_DEPTH_TEST.

void VisualActorGraphics::doFallbackActorShow ( const char *const  visualActorName) [static]

The default implementation of the show() method of the VisualActor interface class.

Parameters:
visualActorNameThe name of the VisualActor.
void VisualActorGraphics::drawBeatHistogram ( const uint32 *const  beatHistogram,
const VisualCamera aCamera 
) [static]

Draws a histogram of the beat values.

Parameters:
beatHistogramThe beat histogram.
aCameraCamera with dimensions, position, perspective projection, and orientation of stage view.
void VisualActorGraphics::drawProjectionMetrics ( const VisualCamera aCamera) [static]

Draws some metrics in the current scene.

Remarks:
For diagnostical puposes.
Parameters:
aCameraCamera with dimensions, position, perspective projection, and orientation of stage view.
void VisualActorGraphics::drawSpectrogram ( const sint16  currHistoryNum,
const uint16  numberOfHistories,
const uint32  numberOfSpectrumEntries,
const uint16  numberOfAudioChannels,
const uint8 ***const  spectrumDataArray,
const VisualCamera aCamera 
) [static]

Draws a graphical representation of the spectral data as spectrogram.

Parameters:
currHistoryNumThe index of the history the spectrum data is taken from.
numberOfHistoriesThe maximum number of histories.
numberOfSpectrumEntriesThe number of spectrum data values.
numberOfAudioChannelsThe number of audio channels.
spectrumDataArrayPointer to spectrum data of all histories.
aCameraCamera with dimensions, position, perspective projection, and orientation of stage view.
void VisualActorGraphics::drawSpectrumAnalyzer ( const sint16  currHistoryNum,
const uint16  numberOfHistories,
const uint32  numberOfSpectrumEntries,
const uint16  numberOfAudioChannels,
const uint8 ***const  spectrumDataArray,
const VisualCamera aCamera 
) [static]

Draws a graphical representation of the spectral data with subband bar graphs.

Parameters:
currHistoryNumThe index of the history the spectrum data is taken from.
numberOfHistoriesThe maximum number of histories.
numberOfSpectrumEntriesThe number of spectrum data values.
numberOfAudioChannelsThe number of audio channels.
spectrumDataArrayPointer to spectrum data of all histories.
aCameraCamera with dimensions, position, perspective projection, and orientation of stage view.
void VisualActorGraphics::drawSpot ( const double  xNum,
const double  yNum,
const double  r,
const double  g,
const double  b,
uint16  waveformIntensityVal,
double  intensity,
const uint8  tailSize 
) [static]

Draws a single spot.

Parameters:
xNumThe horizontal position of the spot.
yNumThe vertical position of the spot.
rThe red component of the RGB-Color.
gThe green component of the RGB-Color.
bThe blue component of the RGB-Color.
waveformIntensityValThe current radius of the spot.
intensityThe current intensity of the spot.
tailSizeThe current tailSize of the spot.
void VisualActorGraphics::drawTrackProgressMeter ( ConstVertexChainRef const  progressMeterBackgroundVertices,
ConstVertexChainRef const  progressMeterVertices,
ConstVertexChainRef const  progressMeterOutlineVertices 
) [static]

Draws a progress bar that advances with the progress of the currently playing audio track.

Parameters:
progressMeterBackgroundVerticesThe vertices of the background of the progress meter.
progressMeterVerticesThe vertices of the actual progress meter.
progressMeterOutlineVerticesThe vertices of the outline of the progress meter.
void VisualActorGraphics::drawVertexChain ( const VertexChain vertexChain,
int  drawMode = kGL_LINE_LOOP,
BlendMode  aBlendMode = kReplace 
) [static]

Draws a vertex chain. Useful for debugging, monitoring or diagnistic purposes.

Parameters:
vertexChainA vector of vertices.
drawModeThe requested draw mode (kGL_POINTS, kGL_LINES, kGL_LINE_STRIP, kGL_LINE_LOOP, kGL_TRIANGLES, kGL_TRIANGLE_STRIP, kGL_TRIANGLE_FAN, kGL_QUADS, kGL_QUAD_STRIP, kGL_POLYGON).
aBlendModeHow to blend vertex chain drawing with the framebuffer data. Default kReplace.
void VisualActorGraphics::drawWaveform ( const sint16  historyNum,
const uint16  maxNumberOfHistories,
const uint32  numberOfWaveformEntries,
const sint16 **const  waveformDataMonoArray,
const VisualCamera aCamera 
) [static]

Draws the waveform data.

Parameters:
historyNumThe index of the history the waveform data is taken from.
maxNumberOfHistoriesMaximum number of histories stored in waveformDataMonoArray.
numberOfWaveformEntriesThe number of waveform values.
waveformDataMonoArrayPointer to waveform data of all histories. The array has two dimensions: history and index.
aCameraCamera with dimensions, position, perspective projection, and orientation of stage view.
void VisualActorGraphics::enableAlphaBlending ( void  ) [static]

Enables alpha blending.

void VisualActorGraphics::enableCullFace ( void  ) [static]

Enables GL_CULL_FACE.

void VisualActorGraphics::enableDepthTest ( void  ) [static]

Enables GL_DEPTH_TEST.

Returns the value of the background color.

Returns:
The RGBA values of the background color.
size_t VisualActorGraphics::getCanvasPixelHeight ( void  ) [static]

Returns the height of the canvas in pixels.

Returns:
The height of the canvas in pixels.
size_t VisualActorGraphics::getCanvasPixelWidth ( void  ) [static]

Returns the width of the canvas in pixels.

Returns:
The width of the canvas in pixels.
Coord VisualActorGraphics::getCirclePoint ( uint32  sliceIdx,
uint32  slicesCount,
double  radius = 1.0,
Coord  circleCenter = zeroCoord 
) [static]

Returns a point on the outline of a circle.

Parameters:
sliceIdxThe index of the requested slice.
slicesCountThe number of slices.
radiusThe length of the radius. Default = 1.0.
circleCenterThe center of the circle. Default is x = 0.0 and y = 0.0.
Remarks:
The center of the circle is at 0.0, 0.0. The number of slices determine how close the circle points are located to each other. The circle points start at the rightmost position in the middle of the circle (at 3 o'clock) and go in counter clockwise direction.
bool VisualActorGraphics::getCoordsOfPixelPosition ( double  xPixelPos,
double  yPixelPos,
double  zAxisPos,
double *  xCoordPos,
double *  yCoordPos,
double *  zCoordPos 
) [static]

Maps window coordinates to object coordinates.

Parameters:
xPixelPosThe horizontal pixel position.
yPixelPosThe vertical pixel position.
zAxisPosThe position on the z-axis.
xCoordPosReturns: The x-CoordPosition.
yCoordPosReturns: The y-CoordPosition.
zCoordPosReturns: The z-CoordPosition.
Returns:
True on success, false on error.
uint8 VisualActorGraphics::getError ( char *  errorString) [static]

Returns an error string (if there was an error).

Parameters:
[out]errorStringPointer to character buffer to receive the error string.
Returns:
Error Number.

Returns a free texture name/index/number/id.

Returns:
A free texture name/index/number.
bool VisualActorGraphics::getPixelsOfCoordPosition ( double  xCoordPos,
double  yCoordPos,
double  zCoordPos,
double *  xPixelPos,
double *  yPixelPos,
double *  zAxisPos 
) [static]

Maps object coordinates to window coordinates.

Parameters:
xCoordPosThe x-CoordPosition.
yCoordPosThe y-CoordPosition.
zCoordPosThe z-CoordPosition.
xPixelPosReturns: The horizontal pixel position.
yPixelPosReturns: The vertical pixel position.
zAxisPosReturns: The position on the z-axis.
Returns:
True on success, false on error.

Returns the current orientation and aspect ratio of the viewport.

Returns:
The current orientation and aspect ratio of the viewport.

Loads the identity matrix of the model view. The model view transformation are reset

Remarks:
It is assumed the model view is the currently active matrix mode.

Prepares the show of the Process Monitor.

Parameters:
theColorThe requested color.

Resets the model view matrix.

void VisualActorGraphics::rotateMatrix ( double  angle,
double  xAmount,
double  yAmount,
double  zAmount 
) [static]

Call of glRotate().

Parameters:
angleThe angle of the rotation.
xAmountThe amount of the rotation around the horizontal axis.
yAmountThe amount of the rotation around the vertical axis.
zAmountThe amount of the rotation around the z-axis.
void VisualActorGraphics::scaleMatrix ( double  xFactor,
double  yFactor,
double  zFactor 
) [static]

Call of glScale().

Parameters:
xFactorThe scale factor in the horizontal dimension.
yFactorThe scale factor in the vertical dimension.
zFactorThe scale factor in the z-dimension.
void VisualActorGraphics::setBackgroundColor ( const RGBAColor aColorVal) [static]

Sets the value of the background color.

Parameters:
aColorValThe RGBA values.
void VisualActorGraphics::showProcessInfoNote ( void  ) [static]

Shows a note about Process Monitor.

void VisualActorGraphics::showProcessInfoRow ( Coord  coord,
const char *const  textRowStr 
) [static]

Shows a row of Process Monitor Info. The graphical operations involved in putting a row of textual process info on screen is encapsulated within this function.

Parameters:
coordThe coord where to place the text (left start position).
textRowStrPointer to character buffer with process info string (label and value).
void VisualActorGraphics::spotGL ( double  zPlane = 0.0) [static]

Draws a spot (for testing purpose).

Parameters:
zPlaneThe z-Coord (optional parameter, default = 0.0).
void VisualActorGraphics::translateMatrix ( double  xNum,
double  yNum,
double  zNum 
) [static]

Call of glTranslate().

Parameters:
xNumHorizontal coord value.
yNumVertical coord value.
zNumZ-coord value.
uint16 VisualActorGraphics::xCoordToPixel ( double  coordPos,
const VisualCamera aCamera 
) [static]

Converts a horizontal coordinate to a horizontal pixel position.

Parameters:
coordPosThe canvas coord position.
Returns:
The canvas pixel position.
Parameters:
aCameraCamera with dimensions, position, perspective projection, and orientation of stage view.
double VisualActorGraphics::xPixelToCoord ( const uint16  pixelPos,
const VisualCamera aCamera 
) [static]

Converts a horizontal pixel position to a horizontal coordinate.

Parameters:
pixelPosThe canvas pixel position.
Returns:
The canvas coord position.
Parameters:
aCameraCamera with dimensions, position, perspective projection, and orientation of stage view.
uint16 VisualActorGraphics::yCoordToPixel ( double  coordPos,
const VisualCamera aCamera 
) [static]

Converts a vertical coordinate to a horizontal pixel position.

Parameters:
coordPosThe canvas coord position.
Returns:
The canvas pixel position.
Parameters:
aCameraCamera with dimensions, position, perspective projection, and orientation of stage view.
double VisualActorGraphics::yPixelToCoord ( const uint16  pixelPos,
const VisualCamera aCamera 
) [static]

Converts a vertical pixel position to a vertical coordinate.

Parameters:
pixelPosThe canvas pixel position.
Returns:
The canvas coord position.
Parameters:
aCameraCamera with dimensions, position, perspective projection, and orientation of stage view.

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

Generated on Sun Mar 25 2012 14:27:43 for VizKit by doxygen 1.8.0