VedaMachineDreamcast::DCInternalViewPort Class Reference

Inherits InternalViewPort.

List of all members.


Detailed Description

Definition at line 56 of file VedaMachineDreamcast.h.

Public Member Functions

 DCInternalViewPort (DCInternalViewPort *_pFather)
 Constructor.
virtual ~DCInternalViewPort ()
 Destructor. See DeleteViewport().
virtual void Clear (float _red=0.0f, float _green=0.0f, float _blue=0.0f)
 Reset color to black (or given color),and depth buffer, of this ViewPort.
virtual void RenderMesh (InternalObject3DBuffer *_pMeshBuffer, InternalTexture *_pTexture=0L)
 Render a 3D Object. The vertexes are transformed with matrix _pMatrix, the object shape is defined by _pMeshBuffer, the texture of the object is defined by _pTexture, the ViewPort that define the rectangle where to draw, and the camera parameters is _pViewPort, or the default viewport if not specified. Note drawings on the main screen needs a SwapScreenBuffer() to be shown at each frames.
virtual void DrawRGBARectangle (unsigned char *_prgbaTable, unsigned int _PixelWidth, unsigned int _PixelHeight)
 Render directly a 32bit pixel bitmap image from memory on a viewport. Note drawings on the main screen needs a SwapScreenBuffer() to be shown at each frames.
virtual void SwapBuffer ()
 Swap buffer so that what was drawn on the viewport is shown. this is needed to active all Clear(), RenderMesh() ,... It has to be done with main screen viewport like texture-rendering viewports.
void ResetRootPixelSize (unsigned int _pixelWidth, unsigned int _pixelHeight)
 Change the root viewport pixel resolution.This is a low level call in case of resize or screen init.
int GetPixelX1 ()
 get the rectangle pixel coordinates in the root viewport bitmap.
int GetPixelY1 ()
 get the rectangle pixel coordinates in the root viewport bitmap.
int GetPixelX2 ()
 get the rectangle pixel coordinates in the root viewport bitmap.
int GetPixelY2 ()
 get the rectangle pixel coordinates in the root viewport bitmap.
float GetFov ()
 for 3D rendering, Distance between the projected plane and the center. must be >0.001
float GetNearCutPlane ()
float GetFarCutPlane ()
virtual void Matrix_LoadID (eLoadId _enum=eLoadId_All)
 Tool for other methods: Set the current GL viewport matrix to an InternalViewPort.

Public Attributes

float m_ScaleRootX1
 2d Scale coordinates of the rectangle recomputed in the Root ViewPort scale.
float m_ScaleRootY1
float m_ScaleRootX2
float m_ScaleRootY2
float m_ClippingRootX1
 2d coordinates of the rectangle recomputed in the Root ViewPort scale.
float m_ClippingRootY1
float m_ClippingRootX2
float m_ClippingRootY2
float m_FinalClipFrustrumX1
 real clipped frustrum
float m_FinalClipFrustrumY1
float m_FinalClipFrustrumX2
float m_FinalClipFrustrumY2
DCInternalTexturem_pRenderTexture
 in case of texture rendering, otherwise 0L:
pvr_ptr_t m_pvrmem
 for texture rendering, we manage the PVR mem:
int m_RenderTextureOGLHandle
 OGL texture:.
VedaMachineDreamcastm_pMachine

Protected Attributes

bool m_Valid
 if false, can't be drawn, because invalid coordinates.
int m_pixel_x1
 the rectangle coordinates in term of screen pixel.
int m_pixel_y1
 the rectangle coordinates in term of screen pixel.
int m_pixel_x2
 the rectangle coordinates in term of screen pixel.
int m_pixel_y2
 the rectangle coordinates in term of screen pixel.
MatrixModel m_Matrix
 we manage a 3D transformation matrix
InternalViewPort ** m_ppClippingHierarchyAttached


Constructor & Destructor Documentation

DCInternalViewPort DCInternalViewPort _pFather  ) 
 

Constructor.

Parameters:
_pFather the father, or NULL if new root.

virtual ~DCInternalViewPort  )  [virtual]
 

Destructor. See DeleteViewport().


Member Function Documentation

virtual void Clear float  _red = 0.0f,
float  _green = 0.0f,
float  _blue = 0.0f
[virtual]
 

Reset color to black (or given color),and depth buffer, of this ViewPort.

Parameters:
_red [0.0,1.0]
_green [0.0,1.0]
_blue [0.0,1.0]

virtual void DrawRGBARectangle unsigned char *  _prgbaTable,
unsigned int  _PixelWidth,
unsigned int  _PixelHeight
[virtual]
 

Render directly a 32bit pixel bitmap image from memory on a viewport. Note drawings on the main screen needs a SwapScreenBuffer() to be shown at each frames.

Parameters:
_prgbaTable pointer to the beginning of a 32bit RGBA table.
_PixelWidth number of pixel of a line
_PixelHeight number of pixel lines.

float GetFov  )  [inline]
 

for 3D rendering, Distance between the projected plane and the center. must be >0.001

Definition at line 158 of file VedaMachineDreamcast.h.

int GetPixelX1  )  [inline]
 

get the rectangle pixel coordinates in the root viewport bitmap.

Returns:
pixel

Definition at line 141 of file VedaMachineDreamcast.h.

References m_pixel_x1.

int GetPixelX2  )  [inline]
 

get the rectangle pixel coordinates in the root viewport bitmap.

Returns:
pixel

Definition at line 151 of file VedaMachineDreamcast.h.

References m_pixel_x2.

int GetPixelY1  )  [inline]
 

get the rectangle pixel coordinates in the root viewport bitmap.

Returns:
pixel

Definition at line 146 of file VedaMachineDreamcast.h.

References m_pixel_y1.

int GetPixelY2  )  [inline]
 

get the rectangle pixel coordinates in the root viewport bitmap.

Returns:
pixel

Definition at line 156 of file VedaMachineDreamcast.h.

References m_pixel_y2.

virtual void Matrix_LoadID eLoadId  _enum = eLoadId_All  )  [virtual]
 

Tool for other methods: Set the current GL viewport matrix to an InternalViewPort.

virtual void RenderMesh InternalObject3DBuffer *  _pMeshBuffer,
InternalTexture *  _pTexture = 0L
[virtual]
 

Render a 3D Object. The vertexes are transformed with matrix _pMatrix, the object shape is defined by _pMeshBuffer, the texture of the object is defined by _pTexture, the ViewPort that define the rectangle where to draw, and the camera parameters is _pViewPort, or the default viewport if not specified. Note drawings on the main screen needs a SwapScreenBuffer() to be shown at each frames.

Parameters:
_pMatrix Internal3DMatrixStack
_pMeshBuffer InternalObject3DBuffer
_pTexture InternalTexture or nothing, will draw shades.

void ResetRootPixelSize unsigned int  _pixelWidth,
unsigned int  _pixelHeight
 

Change the root viewport pixel resolution.This is a low level call in case of resize or screen init.

Parameters:
_pixelWidth 
_pixelHeight 

virtual void SwapBuffer  )  [virtual]
 

Swap buffer so that what was drawn on the viewport is shown. this is needed to active all Clear(), RenderMesh() ,... It has to be done with main screen viewport like texture-rendering viewports.


Member Data Documentation

float m_ClippingRootX1
 

2d coordinates of the rectangle recomputed in the Root ViewPort scale.

Definition at line 171 of file VedaMachineDreamcast.h.

float m_FinalClipFrustrumX1
 

real clipped frustrum

Definition at line 177 of file VedaMachineDreamcast.h.

MatrixModel m_Matrix [protected]
 

we manage a 3D transformation matrix

Definition at line 217 of file VedaMachineDreamcast.h.

int m_pixel_x1 [protected]
 

the rectangle coordinates in term of screen pixel.

Definition at line 209 of file VedaMachineDreamcast.h.

Referenced by GetPixelX1().

int m_pixel_x2 [protected]
 

the rectangle coordinates in term of screen pixel.

Definition at line 213 of file VedaMachineDreamcast.h.

Referenced by GetPixelX2().

int m_pixel_y1 [protected]
 

the rectangle coordinates in term of screen pixel.

Definition at line 211 of file VedaMachineDreamcast.h.

Referenced by GetPixelY1().

int m_pixel_y2 [protected]
 

the rectangle coordinates in term of screen pixel.

Definition at line 215 of file VedaMachineDreamcast.h.

Referenced by GetPixelY2().

InternalViewPort** m_ppClippingHierarchyAttached [protected]
 

the pointer where this viewport was attached in the clipping hierarchy, father or brother. Used to destroy the object. Use ClippingHierarchy_AttachTo to change it.

Definition at line 227 of file VedaMachineDreamcast.h.

DCInternalTexture* m_pRenderTexture
 

in case of texture rendering, otherwise 0L:

Definition at line 183 of file VedaMachineDreamcast.h.

pvr_ptr_t m_pvrmem
 

for texture rendering, we manage the PVR mem:

Definition at line 185 of file VedaMachineDreamcast.h.

int m_RenderTextureOGLHandle
 

OGL texture:.

Definition at line 187 of file VedaMachineDreamcast.h.

float m_ScaleRootX1
 

2d Scale coordinates of the rectangle recomputed in the Root ViewPort scale.

Definition at line 162 of file VedaMachineDreamcast.h.

bool m_Valid [protected]
 

if false, can't be drawn, because invalid coordinates.

Definition at line 207 of file VedaMachineDreamcast.h.


The documentation for this class was generated from the following file:
      /\/\        4         N         k         !         N         D
                      _______  _ __ ___  _____            ___ _ _  ____
     ___________  __//___   /________  |/    / ___________\_______/    \
    /   _   _   \/   _     /    _   /      _/_/____/    _       __     /
   /    /   /       /     /    /    \      \/     /    /    \   \     /
  \\___/___/___/    ¯    _____/_____/       ______\___/_____/\________\\
               \________/_ ___ __ l____\      /elD!  
                 http://www.m4nkind.com \____/