
Public Member Functions | |
| CSurface () | |
| CSurface (Int32 w, Int32 h, Int32 d, Int32 imgsize) | |
| CSurface (const CSurface ©) | |
| CSurface & | operator= (const CSurface &rhs) |
| virtual | ~CSurface () |
| operator char * () | |
| void | create (Int32 w, Int32 h, Int32 d, Int32 imgsize) |
| void | clear () |
| Int32 | get_width () |
| Int32 | get_height () |
| Int32 | get_depth () |
| Int32 | get_size () |
| char * | get_pixels () |
Protected Attributes | |
| Int32 | width |
| Int32 | height |
| Int32 | depth |
| Int32 | size |
| char * | pixels |
Friends | |
| class | CTexture |
| class | CDDSImage |
Definition at line 170 of file OSGDDSImageFileType.cpp.
| CSurface::CSurface | ( | ) |
| CSurface::CSurface | ( | Int32 | w, | |
| Int32 | h, | |||
| Int32 | d, | |||
| Int32 | imgsize | |||
| ) |
| CSurface::CSurface | ( | const CSurface & | copy | ) |
Definition at line 1162 of file OSGDDSImageFileType.cpp.
References depth, height, pixels, size, and width.
01163 : width(0), 01164 height(0), 01165 depth(0), 01166 size(0), 01167 pixels(NULL) 01168 { 01169 01170 if (copy.pixels) 01171 { 01172 size = copy.size; 01173 width = copy.width; 01174 height = copy.height; 01175 depth = copy.depth; 01176 pixels = new char[size]; 01177 memcpy(pixels, copy.pixels, copy.size); 01178 } 01179 }
| CSurface::~CSurface | ( | ) | [virtual] |
Definition at line 1206 of file OSGDDSImageFileType.cpp.
References clear().
01207 { 01208 clear(); 01209 }
Definition at line 1183 of file OSGDDSImageFileType.cpp.
References clear(), depth, height, pixels, size, and width.
Referenced by CTexture::operator=().
01184 { 01185 if (this != &rhs) 01186 { 01187 clear(); 01188 01189 if (rhs.pixels) 01190 { 01191 size = rhs.size; 01192 width = rhs.width; 01193 height = rhs.height; 01194 depth = rhs.depth; 01195 01196 pixels = new char[size]; 01197 memcpy(pixels, rhs.pixels, size); 01198 } 01199 } 01200 01201 return *this; 01202 }
| CSurface::operator char * | ( | ) |
Definition at line 1213 of file OSGDDSImageFileType.cpp.
References pixels.
01214 { 01215 return pixels; 01216 }
| void CSurface::create | ( | Int32 | w, | |
| Int32 | h, | |||
| Int32 | d, | |||
| Int32 | imgsize | |||
| ) |
| void CSurface::clear | ( | void | ) |
Definition at line 1233 of file OSGDDSImageFileType.cpp.
References pixels.
Referenced by create(), operator=(), and ~CSurface().
| Int32 CSurface::get_width | ( | ) | [inline] |
| Int32 CSurface::get_height | ( | ) | [inline] |
| Int32 CSurface::get_depth | ( | ) | [inline] |
| Int32 CSurface::get_size | ( | ) | [inline] |
| char* CSurface::get_pixels | ( | ) | [inline] |
friend class CTexture [friend] |
Definition at line 172 of file OSGDDSImageFileType.cpp.
friend class CDDSImage [friend] |
Int32 CSurface::width [protected] |
Definition at line 194 of file OSGDDSImageFileType.cpp.
Referenced by CDDSImage::align_memory(), create(), CSurface(), get_width(), CDDSImage::load(), and operator=().
Int32 CSurface::height [protected] |
Definition at line 195 of file OSGDDSImageFileType.cpp.
Referenced by CDDSImage::align_memory(), create(), CSurface(), get_height(), CDDSImage::load(), and operator=().
Int32 CSurface::depth [protected] |
Definition at line 196 of file OSGDDSImageFileType.cpp.
Referenced by CDDSImage::align_memory(), create(), CSurface(), get_depth(), CDDSImage::load(), and operator=().
Int32 CSurface::size [protected] |
Definition at line 197 of file OSGDDSImageFileType.cpp.
Referenced by CDDSImage::align_memory(), create(), CSurface(), get_size(), CDDSImage::load(), and operator=().
char* CSurface::pixels [protected] |
Definition at line 199 of file OSGDDSImageFileType.cpp.
Referenced by clear(), create(), CSurface(), get_pixels(), operator char *(), and operator=().
1.5.5