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

Texture Class Reference

Gestion des textures pour la 3D. More...

#include <texture.h>

List of all members.

Public Member Functions

void VerifyId ()
void Config ()
void ConfigPixelStore ()
GLubyte * ConfigSize (int _xSize, int _ySize, BOOL allocate, BOOL resizeIt)
void SetCoord (double x, double y)
double GetXCoord (double x)
double GetYCoord (double y)
BOOL Delete ()
 Destruction d'une texture.

 Texture ()
 ~Texture ()
void Zero ()
void operator= (Texture &src)
 operator GLuint () const
BOOL FromNull ()
BOOL FromFile (char *_name, char *fileName, BOOL resizeIt=FALSE)
BOOL FromBitmap (char *_name, char *fileName, BOOL resizeIt=FALSE)
 version win32, depreciated et non cross-compilable

BOOL FromText (char *_name, char *text, COLORREF color, COLORREF background, int xFormat=0, int yFormat=0)
BOOL Begin (char *_name, int deltaX, int deltaY)
BOOL SetPixel (int x, int y, byte r, byte g, byte b)
 Positione un pixel, BeginCustom() dois deja etre appelé.

BOOL GetPixel (int x, int y, byte &r, byte &g, byte &b)
 Donne un pixel, BeginCustom() dois deja etre appelé.

BOOL AddText (char *text, COLORREF color, COLORREF background, int xFormat=0, int yFormat=0)
 Ajout du text. !Attention cela efface tout ce qui avais avant.

BOOL End ()

Static Public Member Functions

TextureFind (char *name)
 Recherche une texture par son nom.

BOOL Delete (Texture *texture)

Public Attributes

GLint id
MyString name
MyString source
BOOL useResizing
GLdouble xScale
GLdouble yScale
int xSize
int ySize
TextureTarget target
TextureWrap wrapT
TextureWrap wrapS
TextureFilter magFilter
TextureFilter minFilter
TextureEnvMode envMode
Color envColor
Color border

Static Public Attributes

MyList< Texture * > list


Detailed Description

Gestion des textures pour la 3D.

Les differentes façon de les generer sont:

Definition at line 63 of file texture.h.


Constructor & Destructor Documentation

Texture::Texture  ) 
 

Definition at line 128 of file texture.cpp.

References Zero().

Texture::~Texture  ) 
 

Definition at line 133 of file texture.cpp.

References GLuint().


Member Function Documentation

BOOL Texture::AddText char *  text,
COLORREF  color,
COLORREF  background,
int  xFormat = 0,
int  yFormat = 0
 

Ajout du text. !Attention cela efface tout ce qui avais avant.

Todo:
Ne pas effacer ce qu'il y avais avant

Definition at line 320 of file texture.cpp.

References BOOL(), format, HDC(), res, xSize, and ySize.

Referenced by FromText().

BOOL Texture::Begin char *  _name,
int  deltaX,
int  deltaY
 

Definition at line 270 of file texture.cpp.

References BOOL(), and ConfigSize().

Referenced by FromBitmap(), FromNull(), and FromText().

void Texture::Config  ) 
 

Definition at line 36 of file texture.cpp.

References border, envColor, envMode, Color::isEnable, magFilter, minFilter, target, VerifyId(), wrapS, and wrapT.

Referenced by VerifyId().

void Texture::ConfigPixelStore  ) 
 

Definition at line 69 of file texture.cpp.

Referenced by ConfigSize().

GLubyte * Texture::ConfigSize int  _xSize,
int  _ySize,
BOOL  allocate,
BOOL  resizeIt
 

Definition at line 78 of file texture.cpp.

References ConfigPixelStore(), GetNearExp2(), useResizing, VerifyId(), xScale, xSize, yScale, and ySize.

Referenced by Begin(), and FromFile().

BOOL Texture::Delete  ) 
 

Destruction d'une texture.

Definition at line 51 of file texture.cpp.

References BOOL().

BOOL Texture::Delete Texture texture  )  [static]
 

Definition at line 56 of file texture.cpp.

References BOOL(), MyListIterator< Texture * >::GetElem(), MyList< Texture * >::i, MyListIterator< Texture * >::More(), and MyListIterator< Texture * >::Supr().

Referenced by TextTexture::RefreshText().

BOOL Texture::End  ) 
 

Definition at line 277 of file texture.cpp.

References BOOL(), xSize, and ySize.

Referenced by FromBitmap(), FromNull(), and FromText().

Texture * Texture::Find char *  name  )  [static]
 

Recherche une texture par son nom.

Definition at line 259 of file texture.cpp.

References MyListIterator< Texture * >::GetElem(), MyList< Texture * >::i, MyListIterator< Texture * >::More(), and name.

BOOL Texture::FromBitmap char *  _name,
char *  fileName,
BOOL  resizeIt = FALSE
 

version win32, depreciated et non cross-compilable

Definition at line 389 of file texture.cpp.

References Begin(), BOOL(), End(), source, xSize, and ySize.

Referenced by Calculator::Create().

BOOL Texture::FromFile char *  _name,
char *  fileName,
BOOL  resizeIt = FALSE
 

Definition at line 188 of file texture.cpp.

References BOOL(), ConfigSize(), data, source, useResizing, xScale, xSize, yScale, and ySize.

Referenced by Tutorial::ApplicationDemo::OnSelectBkg().

BOOL Texture::FromNull  ) 
 

Definition at line 179 of file texture.cpp.

References Begin(), BOOL(), End(), and SetPixel().

BOOL Texture::FromText char *  _name,
char *  text,
COLORREF  color,
COLORREF  background,
int  xFormat = 0,
int  yFormat = 0
 

Definition at line 379 of file texture.cpp.

References AddText(), Begin(), BOOL(), End(), and source.

Referenced by TextTexture::RefreshText().

BOOL Texture::GetPixel int  x,
int  y,
byte &  r,
byte &  g,
byte &  b
 

Donne un pixel, BeginCustom() dois deja etre appelé.

Definition at line 304 of file texture.cpp.

References BOOL(), xSize, and ySize.

double Texture::GetXCoord double  x  ) 
 

Definition at line 109 of file texture.cpp.

References useResizing, and xScale.

double Texture::GetYCoord double  y  ) 
 

Definition at line 115 of file texture.cpp.

References useResizing, and yScale.

Texture::operator GLuint  )  const [inline]
 

Definition at line 102 of file texture.h.

void Texture::operator= Texture src  ) 
 

Definition at line 159 of file texture.cpp.

References border, envColor, envMode, magFilter, minFilter, source, src, target, useResizing, wrapS, wrapT, xScale, xSize, yScale, and ySize.

void Texture::SetCoord double  x,
double  y
 

Definition at line 121 of file texture.cpp.

References useResizing, xScale, and yScale.

Referenced by Face::Draw().

BOOL Texture::SetPixel int  x,
int  y,
byte  r,
byte  g,
byte  b
 

Positione un pixel, BeginCustom() dois deja etre appelé.

Definition at line 289 of file texture.cpp.

References BOOL(), xSize, and ySize.

Referenced by FromNull().

void Texture::VerifyId  ) 
 

Definition at line 23 of file texture.cpp.

References Config(), GLuint(), MyList< Texture * >::i, and target.

Referenced by Config(), and ConfigSize().

void Texture::Zero  ) 
 

Definition at line 140 of file texture.cpp.

References border, envColor, envMode, linear, magFilter, minFilter, modulate, repeat, target, texture2D, useResizing, wrapS, wrapT, xScale, yScale, and Color::Zero().

Referenced by Texture().


Member Data Documentation

Color Texture::border
 

Definition at line 81 of file texture.h.

Color Texture::envColor
 

Definition at line 80 of file texture.h.

Referenced by Config(), operator=(), and Zero().

TextureEnvMode Texture::envMode
 

Definition at line 79 of file texture.h.

Referenced by Config(), operator=(), and Zero().

GLint Texture::id
 

Definition at line 70 of file texture.h.

Referenced by Face::Draw(), and ValueEditors::MakeElemFaceStruct().

MyList< Texture * > Texture::list [static]
 

Definition at line 25 of file texture_instance.h.

TextureFilter Texture::magFilter
 

Definition at line 78 of file texture.h.

Referenced by Config(), operator=(), and Zero().

TextureFilter Texture::minFilter
 

Definition at line 78 of file texture.h.

Referenced by Config(), operator=(), and Zero().

MyString Texture::name
 

Definition at line 71 of file texture.h.

Referenced by Find(), and ValueEditors::MakeElemFaceStruct().

MyString Texture::source
 

Definition at line 72 of file texture.h.

Referenced by FromBitmap(), FromFile(), FromText(), and operator=().

TextureTarget Texture::target
 

Definition at line 76 of file texture.h.

Referenced by Config(), operator=(), VerifyId(), and Zero().

BOOL Texture::useResizing
 

Definition at line 73 of file texture.h.

Referenced by ConfigSize(), FromFile(), GetXCoord(), GetYCoord(), operator=(), SetCoord(), and Zero().

TextureWrap Texture::wrapS
 

Definition at line 77 of file texture.h.

Referenced by Config(), operator=(), and Zero().

TextureWrap Texture::wrapT
 

Definition at line 77 of file texture.h.

Referenced by Config(), operator=(), and Zero().

GLdouble Texture::xScale
 

Definition at line 74 of file texture.h.

Referenced by ConfigSize(), FromFile(), GetXCoord(), operator=(), SetCoord(), and Zero().

int Texture::xSize
 

Definition at line 75 of file texture.h.

Referenced by AddText(), ConfigSize(), End(), FromBitmap(), FromFile(), GetPixel(), operator=(), and SetPixel().

GLdouble Texture::yScale
 

Definition at line 74 of file texture.h.

Referenced by ConfigSize(), FromFile(), GetYCoord(), operator=(), SetCoord(), and Zero().

int Texture::ySize
 

Definition at line 75 of file texture.h.

Referenced by AddText(), ConfigSize(), End(), FromBitmap(), FromFile(), GetPixel(), operator=(), and SetPixel().


The documentation for this class was generated from the following files:
Generated on Fri Aug 20 19:21:45 2004 for 3d Controls by doxygen 1.3.6