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

RmSurface Class Reference

Sufface class. More...

#include <RmSurface.h>

List of all members.

Public Member Functions

 RmSurface ()
 Constructor.

virtual ~RmSurface ()
 Destructor.

bool Create (RmPixelFormatType pixelFormat, int width, int height)
 Create surface.

virtual void Destroy ()
 Destroy surface.

int GetWidth () const
 Get width.

int GetHeight () const
 Get height.

int GetBytesPerPixel () const
 Get bytes per pixel.

int GetPitch () const
 Get pitch.

RM_BYTE * GetBuffer ()
 Get buffer.

const RM_BYTE * GetBuffer () const
 Get buffer.

RM_BYTE * GetScanLine (int y)
 Get scanline buffer.

const RM_BYTE * GetScanLine (int y) const
 Get scanline buffer.

RM_BYTE * GetPixel (int x, int y)
 Get pixel.

const RM_BYTE * GetPixel (int x, int y) const
 Get pixel.

RmPixelFormatType GetPixelFormat () const
 Get pixel format.

int GetTotalSize () const
 Get total size of buffer.

bool IsDXTFormat () const
 Is surface DXT compressed?

int GetDXTBlockSize () const
 Get DXT block size.

int GetDXTBlockWidth () const
 Get DXT block width.

int GetDXTBlockHeight () const
 Get DXT block height.

RM_BYTE * GetDXTBlock (int bx, int by)
 Get DXT block.

const RM_BYTE * GetDXTBlock (int bx, int by) const
 Get DXT block.


Detailed Description

Sufface class.


Constructor & Destructor Documentation

RmSurface::RmSurface  ) 
 

Constructor.

Constructor

virtual RmSurface::~RmSurface  )  [virtual]
 

Destructor.

Destructor


Member Function Documentation

bool RmSurface::Create RmPixelFormatType  pixelFormat,
int  width,
int  height
 

Create surface.

Create

  • Creates buffer for given size ( width & height ) and specified
    pixelformat.

Parameters:
pixelFormat Format of surface
See also:
RmPixelFormatType
Parameters:
width Width of surface
height Height of surface
Returns:
True on success

virtual void RmSurface::Destroy  )  [virtual]
 

Destroy surface.

Cleanup surface memory

Returns:
None

const RM_BYTE* RmSurface::GetBuffer  )  const [inline]
 

Get buffer.

Buffer Accessing

Returns:
Surface data buffer

RM_BYTE* RmSurface::GetBuffer  )  [inline]
 

Get buffer.

Buffer Accessing

Returns:
Surface data buffer

int RmSurface::GetBytesPerPixel  )  const [inline]
 

Get bytes per pixel.

Return number of bytes used in one pixel

Returns:
Number of bytes per pixel for this surface

const RM_BYTE* RmSurface::GetDXTBlock int  bx,
int  by
const
 

Get DXT block.

Returns the address of block at give location

  • bx and by are coordinate in block(s). ( not pixels )

Returns:
Address of DXT block at give location

RM_BYTE* RmSurface::GetDXTBlock int  bx,
int  by
 

Get DXT block.

Returns the address of block at give location

  • bx and by are coordinate in block(s). ( not pixels )

Returns:
Address of DXT block at give location

int RmSurface::GetDXTBlockHeight  )  const [inline]
 

Get DXT block height.

Returns number of DXT blocks verticaly.

Returns:
Number of DXT blocks verticaly in surface

int RmSurface::GetDXTBlockSize  )  const [inline]
 

Get DXT block size.

For DXT1, each block takes 8 bytes. For DXT2~5, each block takes 16 bytes.

Surface must be created with DXT compressed format

Returns:
Number of bytes of DXT block

int RmSurface::GetDXTBlockWidth  )  const [inline]
 

Get DXT block width.

Returns number of DXT blocks in each scanline

Returns:
Number of DXT blocks per scanline

int RmSurface::GetHeight  )  const [inline]
 

Get height.

Returns:
Height of surface

int RmSurface::GetPitch  )  const [inline]
 

Get pitch.

Size of each scanline in bytes

Returns:
Number of bytes per one row of surface

const RM_BYTE* RmSurface::GetPixel int  x,
int  y
const
 

Get pixel.

Returns the address of pixel at given (x,y)

Parameters:
x Column position ( x )
y Scanline position ( y )
Returns:
Buffer pointing at given pixel --------------------------------------------------------------------------

RM_BYTE* RmSurface::GetPixel int  x,
int  y
 

Get pixel.

Returns the address of pixel at given (x,y)

Parameters:
x Column position ( x )
y Scanline position ( y )
Returns:
Buffer pointing at given pixel --------------------------------------------------------------------------

RmPixelFormatType RmSurface::GetPixelFormat  )  const [inline]
 

Get pixel format.

Return pixel format

Returns:
Pixelformat for this surface
See also:
RmPixelFormatType

const RM_BYTE* RmSurface::GetScanLine int  y  )  const
 

Get scanline buffer.

Returns the buffer for beginning of scanline

Parameters:
y Scaneline position ( y ) return Buffer pointing at beginning of scanline

RM_BYTE* RmSurface::GetScanLine int  y  ) 
 

Get scanline buffer.

Returns the buffer for beginning of scanline

Parameters:
y Scaneline position ( y ) return Buffer pointing at beginning of scanline

int RmSurface::GetTotalSize  )  const [inline]
 

Get total size of buffer.

Total size of buffer in bytes

Returns:
Total size of buffer in bytes

int RmSurface::GetWidth  )  const [inline]
 

Get width.

Returns:
Width of surface

bool RmSurface::IsDXTFormat  )  const
 

Is surface DXT compressed?

DXT compression flag

Returns:
True if surface format is one of DXT format


The documentation for this class was generated from the following file:
Generated on Fri Feb 25 16:09:26 2005 for RenderMonkey SDK by doxygen 1.3.6