rSurfaceTexture Class Reference

texture class getting its data from a surface More...

#include <rTexture.h>

Inheritance diagram for rSurfaceTexture:

Inheritance graph
[legend]
Collaboration diagram for rSurfaceTexture:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 rSurfaceTexture (int group, rSurface const &surface, bool repx=0, bool repy=0, bool storeAlpha=false)
 constructor setting flags
virtual ~rSurfaceTexture ()
 destructor
const rSurfaceGetSurface (void) const
 Gets surface to use as texture data.

Protected Member Functions

virtual void OnSelect ()
 Selects the texture for rendering (core part).

Private Attributes

rSurface const & surface_
 Surface to use as texture data.


Detailed Description

texture class getting its data from a surface

Definition at line 232 of file rTexture.h.


Constructor & Destructor Documentation

rSurfaceTexture::rSurfaceTexture ( int  group,
rSurface const &  surface,
bool  repx = 0,
bool  repy = 0,
bool  storeAlpha = false 
)

constructor setting flags

Parameters:
group texture group ( floor/wall)
surface 
repx flag indicating the x repeat mode
repy flag indicating the y repeat mode
storeAlpha flag indicating whether the alpha channel should be stored

Definition at line 731 of file rTexture.cpp.

00732         : rISurfaceTexture( group, repx, repy, storeAlpha )
00733         , surface_( surface )
00734 {
00735 }

rSurfaceTexture::~rSurfaceTexture ( void   )  [virtual]

destructor

Definition at line 746 of file rTexture.cpp.

00747 {
00748 }


Member Function Documentation

void rSurfaceTexture::OnSelect (  )  [protected, virtual]

Selects the texture for rendering (core part).

Implements rISurfaceTexture.

Definition at line 759 of file rTexture.cpp.

References rSurface::GetSurface(), rISurfaceTexture::OnSelect(), surface_, and rISurfaceTexture::Upload().

00760 {
00761 #ifndef DEDICATED
00762     // upload a copy of the surface ( it may get modified )
00763     if ( surface_.GetSurface() )
00764     {
00765         rSurface copy( surface_ );
00766         this->Upload( copy );
00767         rISurfaceTexture::OnSelect();
00768     }
00769 #endif
00770 }

Here is the call graph for this function:

const rSurface & rSurfaceTexture::GetSurface ( void   )  const [inline]

Gets surface to use as texture data.

Returns:
Surface to use as texture data

Definition at line 436 of file rTexture.h.

References surface_.

00437 {
00438     return this->surface_;
00439 }


Member Data Documentation

rSurface const& rSurfaceTexture::surface_ [private]

Surface to use as texture data.

Definition at line 242 of file rTexture.h.

Referenced by GetSurface(), and OnSelect().


The documentation for this class was generated from the following files:
Generated on Sat Mar 15 23:53:44 2008 for Armagetron Advanced by  doxygen 1.5.4