Main Page   Class Hierarchy   Compound List   File List   Compound Members  

CTextureGenerator Class Reference

A class for generating texture map for illuminated streamlines with opengl. More...

#include <TextureGenerator.h>

List of all members.

Public Methods

void GenTextureMap (CStreamlineMaterial material, float diffCoeff, float specCoeff)
 Generates texture map. More...

 CTextureGenerator (int size)
GLubyte * GetTextureMap ()
 Returns pointer to texture map .

void SetMapSize (int size)
 Sets size of one dimension of map, in fact width=size and heigth = size.

int GetMapSize ()
 Returns size of one dimension of map, , in fact width=size and heigth = size.

 CTextureGenerator ()
virtual ~CTextureGenerator ()


Detailed Description

A class for generating texture map for illuminated streamlines with opengl.

The generated texture is stored in quasi-2-dimensional array(in fact its 1-dimensional) and can be used as 2-dimensional texture map with the gl-call:

glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, m_TexGenerator.GetMapSize(), m_TexGenerator.GetMapSize(), 0, GL_RGBA, GL_UNSIGNED_BYTE, m_TexGenerator.GetTextureMap());


Member Function Documentation

void CTextureGenerator::GenTextureMap CStreamlineMaterial    material,
float    diffCoeff,
float    specCoeff
 

Generates texture map.

AmbientRGB, diffuseRGB, specularRGB store the RGB values for the ambient, diffuse and specular colors as 3 unsigned bytes. diffCoeff is a correction coefficient for diffuse colors, specCoeff is the highlight coefficient.


The documentation for this class was generated from the following files:
Generated on Fri Aug 9 10:12:40 2002 by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002