EPOC::Image Class Reference

#include <Image.h>

Inheritance diagram for EPOC::Image:

Inheritance graph
[legend]
Collaboration diagram for EPOC::Image:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Image ()
virtual ~Image ()
virtual void Cleanup ()
virtual bool Initialize (Texture *pTexture, RENDER_MODE nRenderMode)
void SetFrames (int nFrames, int nFramesX, int nFramesY)
int GetFramesX ()
int GetFramesY ()
int GetFrames ()
void SetCurrentFrame (int nCurrentFrame)
int GetCurrentFrame ()
void SetFramesEnabled (bool bFramesEnabled)
bool IsFramesEnabled ()

Protected Member Functions

virtual void RenderSDL (TextureSDL *pDestTexture)
virtual void RenderOGL (TextureSDL *pDestTexture)

Protected Attributes

int m_nFrames
 The total number of frames that builds up this image (if the image is used without subframes this i set to 1).
int m_nFramesX
 The number of horizontal frames (columns) that builds up this image (if the image is used without subframes this i set to 1).
int m_nFramesY
 The number of vertical frames (rows) that builds up this image (if the image is used without subframes this i set to 1).
int m_nCurrentFrame
 The current frame of this image (if the image is used without subframes this i set to 0).
bool m_bFramesEnabled
 Flag indicating if frames are used by the image or not.


Detailed Description

Image class, this class is used to contain and handle a texture.
Remarks:
You should not create instances of this class your self, but instead use the CreateImage() and DestroyImage() methods found in EpGraphicsManager

Constructor & Destructor Documentation

Image::Image (  ) 

Contructor Resets all members to the default values

Image::~Image (  )  [virtual]

Destructor Calls Cleanup()

See also:
Cleanup()


Member Function Documentation

void Image::Cleanup (  )  [virtual]

Cleans up all relevant data

See also:
~EpImage()

Reimplemented from EPOC::GraphicsObject.

bool Image::Initialize ( Texture pTexture,
RENDER_MODE  nRenderMode 
) [virtual]

Initializes the image

Remarks:
Most times you don't have to worry about calling this method since this is already done by the grapichs manager.
Parameters:
EpTexture pointer to the texture that should be used by the image
nRenderMode tells in wich render mode epoc is running
Returns:
true if the update succeeded and false if it didn't

Reimplemented from EPOC::GraphicsObject.

void EPOC::Image::SetFrames ( int  nFrames,
int  nFramesX,
int  nFramesY 
) [inline]

Sets the number of frames in total, the number of frames horizontal and the number of frames vertical that builds up the image.

Parameters:
nFrames number of frames in total
nFramesX number of frames horizontal
nFramesY number of frames vertical
See also:
GetFramesX()

GetFramesY()

GetFrames()

int EPOC::Image::GetFramesX (  )  [inline]

Returns the number of frames that builds up the image horizontally (columns)

Returns:
The number of frames horizontally
See also:
SetFrames()

GetFramesY()

GetFrames()

int EPOC::Image::GetFramesY (  )  [inline]

Returns the number of frames that builds up the image vertically (rows)

Returns:
The number of frames vertically
See also:
SetFrames()

GetFramesX()

GetFrames()

int EPOC::Image::GetFrames (  )  [inline]

Returns the number of frames that builds up the image in total

Returns:
The number of frames in total
See also:
SetFrames()

GetFramesX()

GetFramesY()

void EPOC::Image::SetCurrentFrame ( int  nCurrentFrame  )  [inline]

Sets the current frame of the image

Parameters:
nCurrentFrame The frame to set as current
See also:
GetCurrentFrame()

int EPOC::Image::GetCurrentFrame (  )  [inline]

Returns the current frame of the image

Returns:
The current frame
See also:
SetCurrentFrame()

void EPOC::Image::SetFramesEnabled ( bool  bFramesEnabled  )  [inline]

Sets a flag that tells if the image should treat the texture as a whole or as a collection of subimages

Parameters:
bFramesEnabled Set to true or false
See also:
IsFramesEnabled()

bool EPOC::Image::IsFramesEnabled (  )  [inline]

Checks wether frames are used by the image or not

Returns:
True if frames is enabled or false if frames is disabled
See also:
SetFramesEnabled()

void Image::RenderSDL ( TextureSDL pDestTexture  )  [protected, virtual]

Renders the image in SDL mode

Parameters:
pDestTexture The texture to render the image on (backbuffer)
Remarks:
This method is called from the Render() method declared in EpGraphicsObject if EPOC is setup to render in SDL mode.
See also:
RenderOGL()

Reimplemented from EPOC::GraphicsObject.

void Image::RenderOGL ( TextureSDL pDestTexture  )  [protected, virtual]

Renders the image in OpenGL mode

Parameters:
pDestTexture The texture to render the image on (backbuffer)
Remarks:
This method is called from the Render() method declared in EpGraphicsObject if EPOC is setup to render in OpenGL mode.
See also:
RenderSDL()

Reimplemented from EPOC::GraphicsObject.


Member Data Documentation

int EPOC::Image::m_nFrames [protected]

The total number of frames that builds up this image (if the image is used without subframes this i set to 1).

int EPOC::Image::m_nFramesX [protected]

The number of horizontal frames (columns) that builds up this image (if the image is used without subframes this i set to 1).

int EPOC::Image::m_nFramesY [protected]

The number of vertical frames (rows) that builds up this image (if the image is used without subframes this i set to 1).

int EPOC::Image::m_nCurrentFrame [protected]

The current frame of this image (if the image is used without subframes this i set to 0).

bool EPOC::Image::m_bFramesEnabled [protected]

Flag indicating if frames are used by the image or not.


The documentation for this class was generated from the following files:
Generated on Tue Feb 12 08:26:05 2008 for EPOC by  doxygen 1.5.4