IplTexture Class Reference

Represent a texture in video memory, with optional caching. More...

#include <ipltexture.h>

List of all members.

Public Member Functions

 IplTexture (IplImage *image=0, bool cache=true, bool smooth=true)
 IplTexture (const IplTexture &a)
const IplTextureoperator= (const IplTexture &a)
virtual ~IplTexture ()
void genTexture ()
 Only call genTexture from a valid OpenGL context !
void loadTexture ()
void disableTexture ()
void update ()
void setImage (IplImage *image)
void setImage (CvMat *mat)
IplImage * getImage ()
IplImage * getIm ()
const IplImage * getIm () const
void freeImage ()
double u (double x)
 Get the U texel coordinates from pixel coordinate x.
double v (double y)
 Get the V texel coordinates from pixel coordinate y (axis pointing down).
void regen ()
 force texture regeneration.
void addRef ()
 Add a reference to the reference counter.
void unref ()
 Removes a reference to the reference counter, and delete the texture if it reaches 0.
void clearWithoutDelete ()
void drawQuad (float r=1)
void drawQuad (float x, float y, float w=0, float h=0)
 Draw a frame contained in an IplTexture object on an OpenGL viewport.
 IplTexture (IplImage *image=0, bool cache=true, bool smooth=true)
 IplTexture (const IplTexture &a)
const IplTextureoperator= (const IplTexture &a)
virtual ~IplTexture ()
void genTexture ()
 Only call genTexture from a valid OpenGL context !
void loadTexture ()
void disableTexture ()
void update ()
void setImage (IplImage *image)
void setImage (CvMat *mat)
IplImage * getImage ()
IplImage * getIm ()
const IplImage * getIm () const
void freeImage ()
double u (double x)
 Get the U texel coordinates from pixel coordinate x.
double v (double y)
 Get the V texel coordinates from pixel coordinate y (axis pointing down).
void regen ()
 force texture regeneration.
void addRef ()
 Add a reference to the reference counter.
void unref ()
 Removes a reference to the reference counter, and delete the texture if it reaches 0.
void clearWithoutDelete ()
void drawQuad (float r=1)
void drawQuad (float x, float y, float w=0, float h=0)

Public Attributes

bool isAlpha


Detailed Description

Represent a texture in video memory, with optional caching.

Honours many IplImage fields like nChannels, depth, align, and origin.

Definition at line 67 of file ipltexture.h.


Constructor & Destructor Documentation

IplTexture::IplTexture ( IplImage *  image = 0,
bool  cache = true,
bool  smooth = true 
) [inline]

Definition at line 70 of file ipltexture.h.

IplTexture::IplTexture ( const IplTexture a  ) 

Definition at line 26 of file ipltexture.cpp.

IplTexture::~IplTexture (  )  [virtual]

Definition at line 50 of file ipltexture.cpp.

Referenced by operator=().

IplTexture::IplTexture ( IplImage *  image = 0,
bool  cache = true,
bool  smooth = true 
) [inline]

Definition at line 70 of file ipltexture.h.

IplTexture::IplTexture ( const IplTexture a  ) 

virtual IplTexture::~IplTexture (  )  [virtual]


Member Function Documentation

void IplTexture::addRef (  )  [inline]

Add a reference to the reference counter.

Definition at line 100 of file ipltexture.h.

void IplTexture::addRef (  )  [inline]

Add a reference to the reference counter.

Definition at line 100 of file ipltexture.h.

void IplTexture::clearWithoutDelete (  )  [inline]

Definition at line 107 of file ipltexture.h.

void IplTexture::clearWithoutDelete (  )  [inline]

Definition at line 107 of file ipltexture.h.

void IplTexture::disableTexture (  ) 

void IplTexture::disableTexture (  ) 

Definition at line 153 of file ipltexture.cpp.

Referenced by drawQuad().

void IplTexture::drawQuad ( float  x,
float  y,
float  w = 0,
float  h = 0 
)

void IplTexture::drawQuad ( float  r = 1  ) 

void IplTexture::drawQuad ( float  x,
float  y,
float  w = 0,
float  h = 0 
)

Draw a frame contained in an IplTexture object on an OpenGL viewport.

Definition at line 190 of file ipltexture.cpp.

References disableTexture(), getIm(), loadTexture(), u(), and v().

void IplTexture::drawQuad ( float  r = 1  ) 

Definition at line 185 of file ipltexture.cpp.

Referenced by VSView::paintGL().

void IplTexture::freeImage (  )  [inline]

Definition at line 88 of file ipltexture.h.

void IplTexture::freeImage (  )  [inline]

Definition at line 88 of file ipltexture.h.

void IplTexture::genTexture (  ) 

Only call genTexture from a valid OpenGL context !

void IplTexture::genTexture (  ) 

Only call genTexture from a valid OpenGL context !

Definition at line 59 of file ipltexture.cpp.

Referenced by loadTexture().

const IplImage* IplTexture::getIm (  )  const [inline]

Definition at line 87 of file ipltexture.h.

IplImage* IplTexture::getIm (  )  [inline]

Definition at line 86 of file ipltexture.h.

const IplImage* IplTexture::getIm (  )  const [inline]

Definition at line 87 of file ipltexture.h.

IplImage* IplTexture::getIm (  )  [inline]

Definition at line 86 of file ipltexture.h.

Referenced by drawQuad(), and VSView::paintGL().

IplImage* IplTexture::getImage (  )  [inline]

Definition at line 85 of file ipltexture.h.

IplImage* IplTexture::getImage (  )  [inline]

Definition at line 85 of file ipltexture.h.

void IplTexture::loadTexture (  ) 

void IplTexture::loadTexture (  ) 

Definition at line 93 of file ipltexture.cpp.

References genTexture(), and isAlpha.

Referenced by drawQuad().

const IplTexture& IplTexture::operator= ( const IplTexture a  ) 

const IplTexture & IplTexture::operator= ( const IplTexture a  ) 

Definition at line 32 of file ipltexture.cpp.

References isAlpha, and ~IplTexture().

void IplTexture::regen (  ) 

force texture regeneration.

void IplTexture::regen (  ) 

force texture regeneration.

Definition at line 179 of file ipltexture.cpp.

References update().

void IplTexture::setImage ( CvMat *  mat  ) 

void IplTexture::setImage ( IplImage *  image  ) 

void IplTexture::setImage ( CvMat *  mat  ) 

Definition at line 174 of file ipltexture.cpp.

References setImage().

void IplTexture::setImage ( IplImage *  image  ) 

Definition at line 167 of file ipltexture.cpp.

References update().

Referenced by setImage().

double IplTexture::u ( double  x  )  [inline]

Get the U texel coordinates from pixel coordinate x.

Definition at line 91 of file ipltexture.h.

double IplTexture::u ( double  x  )  [inline]

Get the U texel coordinates from pixel coordinate x.

Definition at line 91 of file ipltexture.h.

Referenced by drawQuad().

void IplTexture::unref (  ) 

Removes a reference to the reference counter, and delete the texture if it reaches 0.

void IplTexture::unref (  ) 

Removes a reference to the reference counter, and delete the texture if it reaches 0.

Definition at line 160 of file ipltexture.cpp.

void IplTexture::update (  )  [inline]

Definition at line 82 of file ipltexture.h.

void IplTexture::update (  )  [inline]

Definition at line 82 of file ipltexture.h.

Referenced by regen(), and setImage().

double IplTexture::v ( double  y  )  [inline]

Get the V texel coordinates from pixel coordinate y (axis pointing down).

Definition at line 94 of file ipltexture.h.

double IplTexture::v ( double  y  )  [inline]

Get the V texel coordinates from pixel coordinate y (axis pointing down).

Definition at line 94 of file ipltexture.h.

Referenced by drawQuad().


Member Data Documentation

Definition at line 123 of file ipltexture.h.

Referenced by loadTexture(), and operator=().


The documentation for this class was generated from the following files:

Generated on Tue Mar 30 15:53:25 2010 for Polyora by  doxygen 1.5.9