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

TEXTURE Class Reference

#include <texture.H>

Inheritance diagram for TEXTURE:

Inheritance graph
[legend]
Collaboration diagram for TEXTURE:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TEXTURE ()
 TEXTURE (Cstr_ptr &file)
virtual ~TEXTURE ()
Cstr_ptr & file () const
const Imageimage () const
Imageimage ()
bool load_attempt_failed () const
void expand_image ()
virtual int load_image ()
virtual int set_image (unsigned char *data, int w, int h, uint bpp=3)
virtual bool load_texture (unsigned char **copy=0)=0
virtual void apply_texture (mlib::CWtransf *xf=0)=0
void set_expand_image (bool expand)
virtual int dimension () const
void Own () const
void Free () const
int Lock ()
void Unlock ()
int Unique () const

Protected Member Functions

void expand_power2 (int width, int height)

Protected Attributes

str_ptr _file
Image _img
mlib::Wtransf _scale
bool _image_not_available
bool _expand_image

Detailed Description

Definition at line 20 of file texture.H.


Constructor & Destructor Documentation

TEXTURE::TEXTURE  )  [inline]
 

Definition at line 23 of file texture.H.

TEXTURE::TEXTURE Cstr_ptr &  file  )  [inline]
 

Definition at line 24 of file texture.H.

virtual TEXTURE::~TEXTURE  )  [inline, virtual]
 

Definition at line 29 of file texture.H.


Member Function Documentation

virtual void TEXTURE::apply_texture mlib::CWtransf xf = 0  )  [pure virtual]
 

virtual int TEXTURE::dimension  )  const [inline, virtual]
 

Definition at line 58 of file texture.H.

void TEXTURE::expand_image  ) 
 

Resizes an image to the least powers of 2 greater than width and height.

Definition at line 44 of file texture.C.

References _expand_image, _img, _scale, debug, Image::empty(), err_adv(), Image::expand_power2(), Image::height(), mlib::Mat4< Wtransf, Wpt, Wvec, Wline, Wquat >::scaling(), and Image::width().

Referenced by load_image(), and set_image().

void TEXTURE::expand_power2 int  width,
int  height
[protected]
 

Definition at line 64 of file texture.C.

References _img, Image::bpp(), Image::expand_power2(), and Image::resize().

Cstr_ptr& TEXTURE::file  )  const [inline]
 

Definition at line 32 of file texture.H.

References _file.

void REFcounter::Free  )  const [inline, inherited]
 

Definition at line 76 of file ref.H.

References REFcounter::_mutex, REFcounter::_u, and REF_ME.

Image& TEXTURE::image  )  [inline]
 

Definition at line 34 of file texture.H.

References _img.

const Image& TEXTURE::image  )  const [inline]
 

Definition at line 33 of file texture.H.

References _img.

bool TEXTURE::load_attempt_failed  )  const [inline]
 

Definition at line 36 of file texture.H.

References _image_not_available.

int TEXTURE::load_image  )  [virtual]
 

Reimplemented in TEXTUREgl.

Definition at line 14 of file texture.C.

References _file, _image_not_available, _img, Image::empty(), expand_image(), and Image::load_file().

Referenced by TEXTUREgl::load_image().

virtual bool TEXTURE::load_texture unsigned char **  copy = 0  )  [pure virtual]
 

Implemented in TEXTUREgl.

int REFcounter::Lock  )  [inline, inherited]
 

Definition at line 105 of file ref.H.

References REFcounter::_mutex, and REFcounter::_u.

Referenced by REFlock::REFlock().

void REFcounter::Own  )  const [inline, inherited]
 

Definition at line 59 of file ref.H.

References REFcounter::_mutex, REFcounter::_u, and REF_ME.

void TEXTURE::set_expand_image bool  expand  )  [inline]
 

Definition at line 55 of file texture.H.

References _expand_image.

Referenced by TEXTUREgl::set_mipmap().

int TEXTURE::set_image unsigned char *  data,
int  w,
int  h,
uint  bpp = 3
[virtual]
 

Reimplemented in TEXTUREgl.

Definition at line 36 of file texture.C.

References _img, Image::empty(), expand_image(), and Image::set().

Referenced by TEXTUREgl::set_image().

int REFcounter::Unique  )  const [inline, inherited]
 

Definition at line 115 of file ref.H.

References REFcounter::_mutex, and REFcounter::_u.

void REFcounter::Unlock  )  [inline, inherited]
 

Definition at line 111 of file ref.H.

References REFcounter::_mutex, and REFcounter::_u.

Referenced by REFlock::~REFlock().


Member Data Documentation

bool TEXTURE::_expand_image [protected]
 

Definition at line 65 of file texture.H.

Referenced by expand_image(), and set_expand_image().

str_ptr TEXTURE::_file [protected]
 

Definition at line 61 of file texture.H.

Referenced by TEXTUREgl::declare_texture(), file(), TEXTUREgl::free_dl(), TEXTUREgl::load_image(), load_image(), TEXTUREgl::load_texture(), TEXTUREgl::set_image(), and TEXTUREgl::set_texture().

bool TEXTURE::_image_not_available [protected]
 

Definition at line 64 of file texture.H.

Referenced by load_attempt_failed(), load_image(), and TEXTUREgl::set_texture().

Image TEXTURE::_img [protected]
 

Definition at line 62 of file texture.H.

Referenced by TEXTUREgl::bpp_to_format(), TEXTUREgl::copy_texture(), expand_image(), expand_power2(), TEXTUREgl::get_size(), image(), load_image(), TEXTUREgl::load_texture(), and set_image().

mlib::Wtransf TEXTURE::_scale [protected]
 

Definition at line 63 of file texture.H.

Referenced by expand_image().


The documentation for this class was generated from the following files:
Generated on Mon Sep 18 11:47:35 2006 for jot by  doxygen 1.4.4