PowerVR Software Development Kit


Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

CPVRTPrint3D Class Reference

#include <PVRTPrint3D.h>

List of all members.

Public Member Functions

 CPVRTPrint3D (void)
 ~CPVRTPrint3D (void)
bool SetTextures (const SPVRTContext *const pContext, const unsigned int dwScreenX, const unsigned int dwScreenY)
void ReleaseTextures ()
void Print3D (float fPosX, float fPosY, float fScale, int Colour, const char *Format,...)
void DisplayDefaultTitle (char *sTitle, char *sDescription, unsigned int uDisplayLogo)
unsigned int CreateDefaultWindow (float fPosX, float fPosY, int nXSize_LettersPerLine, char *sTitle, char *sBody)
unsigned int InitWindow (unsigned int dwBufferSizeX, unsigned int dwBufferSizeY)
void DeleteWindow (unsigned int dwWin)
void DeleteAllWindows ()
void DisplayWindow (unsigned int dwWin)
void SetText (unsigned int dwWin, const char *Format,...)
void SetWindow (unsigned int dwWin, unsigned int dwWinColor, unsigned int dwFontColor, float fFontSize, float fPosX, float fPosY, float fSizeX, float fSizeY)
void SetTitle (unsigned int dwWin, unsigned int dwBackgroundColor, float fFontSize, unsigned int dwFontColorLeft, char *sTitleLeft, unsigned int dwFontColorRight, char *sTitleRight)
void SetWindowFlags (unsigned int dwWin, unsigned int dwFlags)
void AdjustWindowSize (unsigned int dwWin, unsigned int dwMode)
void GetSize (float *const pfWidth, float *const pfHeight, const float fFontSize, const char *sString)
void GetAspectRatio (unsigned int *dwScreenX, unsigned int *dwScreenY)
int Flush ()


Detailed Description

Class: CPVRTPrint3D


Constructor & Destructor Documentation



CPVRTPrint3D


CPVRTPrint3D::CPVRTPrint3D void   ) 
 



~CPVRTPrint3D


CPVRTPrint3D::~CPVRTPrint3D void   ) 
 


Member Function Documentation



AdjustWindowSize


void CPVRTPrint3D::AdjustWindowSize unsigned int  dwWin,
unsigned int  dwMode
 

Inputs:
dwWin Window handle
dwMode dwMode 0 = Both, dwMode 1 = X only, dwMode 2 = Y only
Description:
Calculates window size so that all text fits in the window.



CreateDefaultWindow


unsigned int CPVRTPrint3D::CreateDefaultWindow float  fPosX,
float  fPosY,
int  nXSize_LettersPerLine,
char *  sTitle,
char *  sBody
 

Inputs:
fPosX Position X for the new window
fPosY Position Y for the new window
nXSize_LettersPerLine 
sTitle Title of the window
sBody Body text of the window
Returns:
Window handle
Description:
Creates a default window. If Title is NULL the main body will have just one line (for InfoWin).



DeleteAllWindows


void CPVRTPrint3D::DeleteAllWindows  ) 
 

Description:
Delete all windows.



DeleteWindow


void CPVRTPrint3D::DeleteWindow unsigned int  dwWin  ) 
 

Inputs:
dwWin Window handle
Description:
Delete the window referenced by dwWin.



DisplayDefaultTitle


void CPVRTPrint3D::DisplayDefaultTitle char *  sTitle,
char *  sDescription,
unsigned int  uDisplayLogo
 

Inputs:
sTitle Title to display
sDescription Description to display
uDisplayLogo 1 = Display the logo
Description:
Creates a default title with predefined position and colours. It displays as well company logos when requested: 0 = No logo 1 = PowerVR logo 2 = Img Tech logo



DisplayWindow


void CPVRTPrint3D::DisplayWindow unsigned int  dwWin  ) 
 

Inputs:
dwWin 
Description:
Display window. This function MUST be called between a BeginScene/EndScene pair as it uses D3D render primitive calls. PVRTPrint3DSetTextures(...) must have been called beforehand.



Flush


int CPVRTPrint3D::Flush  ) 
 

Description:
Flushes all the print text commands



GetAspectRatio


void CPVRTPrint3D::GetAspectRatio unsigned int *  dwScreenX,
unsigned int *  dwScreenY
 

Outputs:
dwScreenX Screen resolution X
dwScreenY Screen resolution Y
Description:
Returns the current resolution used by Print3D



GetSize


void CPVRTPrint3D::GetSize float *const  pfWidth,
float *const  pfHeight,
const float  fFontSize,
const char *  sString
 

Outputs:
pfWidth Width of the string in pixels
pfHeight Height of the string in pixels
Inputs:
fFontSize Font size
sString String to take the size of
Description:
Returns the size of a string in pixels.



InitWindow


unsigned int CPVRTPrint3D::InitWindow unsigned int  dwBufferSizeX,
unsigned int  dwBufferSizeY
 

Inputs:
dwBufferSizeX Buffer width
dwBufferSizeY Buffer height
Returns:
Window handle
Description:
Allocate a buffer for a newly-created window and return its handle.



Print3D


void CPVRTPrint3D::Print3D float  fPosX,
float  fPosY,
float  fScale,
int  Colour,
const char *  Format,
... 
 

Inputs:
fPosX Position of the text along X
fPosY Position of the text along Y
fScale Scale of the text
Colour Colour of the text
Format Format string for the text
Description:
Display 3D text on screen. No window needs to be allocated to use this function. However, PVRTPrint3DSetTextures(...) must have been called beforehand. This function accepts formatting in the printf way.



ReleaseTextures


void CPVRTPrint3D::ReleaseTextures  ) 
 

Description:
Deallocate the memory allocated in PVRTPrint3DSetTextures(...)



SetText


void CPVRTPrint3D::SetText unsigned int  dwWin,
const char *  Format,
... 
 

Inputs:
dwWin Window handle
Format Format string
Description:
Feed the text buffer of window referenced by dwWin. This function accepts formatting in the printf way.



SetTextures


bool CPVRTPrint3D::SetTextures const SPVRTContext *const  pContext,
const unsigned int  dwScreenX,
const unsigned int  dwScreenY
 

Inputs:
pContext Context
dwScreenX Screen resolution along X
dwScreenY Screen resolution along Y
Returns:
true or false
Description:
Initialization and texture upload. Should be called only once for a given context.



SetTitle


void CPVRTPrint3D::SetTitle unsigned int  dwWin,
unsigned int  dwBackgroundColor,
float  fFontSize,
unsigned int  dwFontColorLeft,
char *  sTitleLeft,
unsigned int  dwFontColorRight,
char *  sTitleRight
 

Inputs:
dwWin Window handle
dwBackgroundColor Background color
fFontSize Font size
dwFontColorLeft 
sTitleLeft 
dwFontColorRight 
sTitleRight 
Description:
Set window title.



SetWindow


void CPVRTPrint3D::SetWindow unsigned int  dwWin,
unsigned int  dwWinColor,
unsigned int  dwFontColor,
float  fFontSize,
float  fPosX,
float  fPosY,
float  fSizeX,
float  fSizeY
 

Inputs:
dwWin Window handle
dwWinColor Window colour
dwFontColor Font colour
fFontSize Font size
fPosX Window position X
fPosY Window position Y
fSizeX Window size X
fSizeY Window size Y
Description:
Set attributes of window. Windows position and size are referred to a virtual screen of 100x100. (0,0) is the top-left corner and (100,100) the bottom-right corner. These values are the same for all resolutions.



SetWindowFlags


void CPVRTPrint3D::SetWindowFlags unsigned int  dwWin,
unsigned int  dwFlags
 

Inputs:
dwWin Window handle
dwFlags Flags
Description:
Set flags for window referenced by dwWin. A list of flag can be found at the top of this header.

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

Copyright © 1999-2006, PowerVR Technologies and partners. PowerVR Technologies is a division of Imagination Technologies Ltd.


Generated by DOXYGEN 1.3.6