Main Page | Class Hierarchy | Class List | Directories | File List

Image2D Class Template Reference

This class represents a two-dimensional image. More...

#include <ApiGraphics/Image2D.h>

Inheritance diagram for Image2D:

AbstractImage2D TextureData List of all members.

Public Member Functions

 Image2D (int w=0, int h=0, Color *data=NULL)
 Image2D (QImage image)
 Image2D (QString fileName)
virtual bool loaded () const
virtual void destroy ()
void clear (Color c=Color())
virtual QImage toQImage () const
virtual void initialize (QImage image)
Image2D< Color > clone () const
Image2D< Color > subImage (int i, int j, int w, int h) const
Image2D< Color > supImage (int i, int j, int w, int h) const
Image2D< Color > boundingPowerOfTwo () const
Image1D< Color > line (int j) const
virtual GLint defaultTexFormat () const
virtual void loadTexture2D (GLenum texFormat, GLenum target=GL_TEXTURE_2D) const
void readColorBuffer (int i=0, int j=0)
void readDepthBuffer (int i=0, int j=0)
void drawColorBuffer (int i=0, int j=0) const
void readTexture (const Texture *tex)
void setBorderColor (Color border)
void setWrapMode (WrapMode wrapMode)
void setupBorder (WrapMode wrapMode, Color border)
Color & texel (int i, int j)
const Color & texel (int i, int j) const
Color & operator() (int i, int j)
const Color & operator() (int i, int j) const
Color sample (int i, int j) const
Color interp (float x, float y) const
Color operator() (float x, float y) const
const Color * mem () const
Color * mem ()

Static Public Member Functions

static Image2D< Color > getColorBuffer ()
static Image2D< Color > getDepthBuffer ()
static Color readPixelColor (int i, int j)
static Image2D< Color > getTexture (const Texture *tex)
static Texture createTex2D (QString fileName, GLint internalFormat=GL_RGBA, GLenum interpMode=GL_NEAREST, GLenum wrapMode=GL_CLAMP)

Detailed Description

template<class Color>
class apig::Image2D< Color >

This class represents a two-dimensional image.

It is parameterized by the data type representing colors (number of channels and type used per channel). Useful types for color representations are defined in ColorTypes.h : Float1, Float2, Float3, Float4, UByte3, UByte4, UInt3, UInt4.


The documentation for this class was generated from the following files:
Generated on Fri Nov 14 20:49:48 2008 for Api Graphics by  doxygen 1.4.4