Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CTexture Class Reference

Inheritance diagram for CTexture:

CSurface List of all members.

Public Member Functions

 CTexture ()
 CTexture (int w, int h, int d, int imgSize)
 CTexture (const CTexture &copy)
CTextureoperator= (const CTexture &rhs)
 ~CTexture ()
CSurfaceget_mipmap (int index)
int get_num_mipmaps ()
 operator char * ()
void create (int w, int h, int d, int imgsize)
void clear ()
int get_width ()
int get_height ()
int get_depth ()
int get_size ()
char * get_pixels ()

Protected Attributes

std::vector< CSurfacemipmaps
int width
int height
int depth
int size
char * pixels

Friends

class CDDSImage

Detailed Description

Definition at line 199 of file OSGDDSImageFileType.cpp.


Constructor & Destructor Documentation

CTexture::CTexture  ) 
 

Definition at line 1026 of file OSGDDSImageFileType.cpp.

01027   : CSurface()  // initialize base class part
01028 {
01029 }

CTexture::CTexture int  w,
int  h,
int  d,
int  imgSize
 

Definition at line 1033 of file OSGDDSImageFileType.cpp.

01034   : CSurface(w, h, d, imgSize)  // initialize base class part
01035 {
01036 }

CTexture::CTexture const CTexture copy  ) 
 

Definition at line 1040 of file OSGDDSImageFileType.cpp.

References mipmaps.

01041   : CSurface(copy)
01042 {
01043     for (unsigned int i = 0; i < copy.mipmaps.size(); i++)
01044         mipmaps.push_back(copy.mipmaps[i]);
01045 }

CTexture::~CTexture  ) 
 

Definition at line 1067 of file OSGDDSImageFileType.cpp.

References mipmaps.

01068 {
01069     mipmaps.clear();
01070 }


Member Function Documentation

CTexture & CTexture::operator= const CTexture rhs  ) 
 

Definition at line 1049 of file OSGDDSImageFileType.cpp.

References mipmaps, and CSurface::operator=().

01050 {
01051     if (this != &rhs)
01052     {
01053         CSurface::operator = (rhs);
01054 
01055         mipmaps.clear();
01056         for (unsigned int i = 0; i < rhs.mipmaps.size(); i++)
01057         {
01058             mipmaps.push_back(rhs.mipmaps[i]);
01059         }
01060     }
01061 
01062     return *this;
01063 }

CSurface& CTexture::get_mipmap int  index  )  [inline]
 

Definition at line 210 of file OSGDDSImageFileType.cpp.

References mipmaps.

00211   { 
00212     assert(index < (int)mipmaps.size());
00213     return mipmaps[index]; 
00214   }

int CTexture::get_num_mipmaps  )  [inline]
 

Definition at line 216 of file OSGDDSImageFileType.cpp.

References mipmaps.

00216 { return (int)mipmaps.size(); }

CSurface::operator char *  )  [inherited]
 

Definition at line 1148 of file OSGDDSImageFileType.cpp.

References CSurface::pixels.

01149 { 
01150     return pixels; 
01151 }

void CSurface::create int  w,
int  h,
int  d,
int  imgsize
[inherited]
 

Definition at line 1155 of file OSGDDSImageFileType.cpp.

References CSurface::clear(), CSurface::depth, CSurface::height, CSurface::pixels, CSurface::size, and CSurface::width.

Referenced by CSurface::CSurface().

01156 {
01157     clear();
01158 
01159     width = w;
01160     height = h;
01161     depth = d;
01162     size = imgsize;
01163     pixels = new char[imgsize];
01164 }

void CSurface::clear  )  [inherited]
 

Definition at line 1168 of file OSGDDSImageFileType.cpp.

References CSurface::pixels.

Referenced by CSurface::create(), CSurface::operator=(), and CSurface::~CSurface().

01169 {
01170     delete [] pixels;
01171     pixels = NULL;
01172 }

int CSurface::get_width  )  [inline, inherited]
 

Definition at line 184 of file OSGDDSImageFileType.cpp.

References CSurface::width.

00184 { return width; }

int CSurface::get_height  )  [inline, inherited]
 

Definition at line 185 of file OSGDDSImageFileType.cpp.

References CSurface::height.

00185 { return height; }

int CSurface::get_depth  )  [inline, inherited]
 

Definition at line 186 of file OSGDDSImageFileType.cpp.

References CSurface::depth.

00186 { return depth; }

int CSurface::get_size  )  [inline, inherited]
 

Definition at line 187 of file OSGDDSImageFileType.cpp.

References CSurface::size.

00187 { return size; }

char* CSurface::get_pixels  )  [inline, inherited]
 

Definition at line 188 of file OSGDDSImageFileType.cpp.

References CSurface::pixels.

00188 { return pixels; }


Friends And Related Function Documentation

friend class CDDSImage [friend]
 

Reimplemented from CSurface.

Definition at line 201 of file OSGDDSImageFileType.cpp.


Member Data Documentation

std::vector<CSurface> CTexture::mipmaps [protected]
 

Definition at line 218 of file OSGDDSImageFileType.cpp.

Referenced by CTexture(), get_mipmap(), get_num_mipmaps(), operator=(), and ~CTexture().

int CSurface::width [protected, inherited]
 

Definition at line 191 of file OSGDDSImageFileType.cpp.

Referenced by CDDSImage::align_memory(), CSurface::create(), CSurface::CSurface(), CSurface::get_width(), CDDSImage::load(), and CSurface::operator=().

int CSurface::height [protected, inherited]
 

Definition at line 192 of file OSGDDSImageFileType.cpp.

Referenced by CDDSImage::align_memory(), CSurface::create(), CSurface::CSurface(), CSurface::get_height(), and CSurface::operator=().

int CSurface::depth [protected, inherited]
 

Definition at line 193 of file OSGDDSImageFileType.cpp.

Referenced by CDDSImage::align_memory(), CSurface::create(), CSurface::CSurface(), CSurface::get_depth(), and CSurface::operator=().

int CSurface::size [protected, inherited]
 

Definition at line 194 of file OSGDDSImageFileType.cpp.

Referenced by CDDSImage::align_memory(), CSurface::create(), CSurface::CSurface(), CSurface::get_size(), CDDSImage::load(), and CSurface::operator=().

char* CSurface::pixels [protected, inherited]
 

Definition at line 196 of file OSGDDSImageFileType.cpp.

Referenced by CSurface::clear(), CSurface::create(), CSurface::CSurface(), CSurface::get_pixels(), CSurface::operator char *(), and CSurface::operator=().


The documentation for this class was generated from the following file:
Generated on Thu Aug 25 04:12:25 2005 for OpenSG by  doxygen 1.4.3