Man Page for vtkTexture
Table of Contents

NAME

vtkTexture - handles properties associated with a texture map

SYNOPSIS


#include "/opt/vtk-c++/graphics/vtkTexture.h"

class VTK_EXPORT vtkTexture : public vtkObject

vtkTexture();
static vtkTexture *New();
const char *GetClassName() {return "vtkTexture";};
void PrintSelf(ostream& os, vtkIndent indent);
virtual void Render(vtkRenderer *ren);
virtual void Load(vtkRenderer *) {};
int GetRepeat();
void SetRepeat(int);
void RepeatOn();
void RepeatOff();
int GetInterpolate();
void SetInterpolate(int);
void InterpolateOn();
void InterpolateOff();
int GetMapColorScalarsThroughLookupTable();
void SetMapColorScalarsThroughLookupTable(int);
void MapColorScalarsThroughLookupTableOn();
void MapColorScalarsThroughLookupTableOff();
void SetInput(vtkStructuredPoints*);
void SetInput(vtkStructuredPoints& );
vtkStructuredPoints *GetInput();
void SetInput(vtkImageCache *cache)
{this->SetInput(cache->GetImageToStructuredPoints()->GetOutput());}
void SetLookupTable(vtkLookupTable*);
void SetLookupTable(vtkLookupTable& );
vtkLookupTable *GetLookupTable();
vtkColorScalars *GetMappedScalars();
unsigned char *MapScalarsToColors (vtkScalars *scalars);

DESCRIPTION

vtkTexture is an object that handles loading and binding of texture maps. It obtains its data from an input structured points dataset type. Thus you can create visualization pipelines to read, process, and construct textures. Note that textures will only work if texture coordinates are also defined, and if the rendering system supports texture.

Instances of vtkTexture are associated with actors via the actor's SetTexture() method. Actors can share texture maps (this is encouraged to save memory resources.)

CAVEATS

Currently only 2D texture maps are supported, even though the data pipeline supports 1,2, and 3D texture coordinates.

Some renderers such as OpenGL require that the texture map dimensions are a power of two in each direction. Other renderers may have similar (ridiculous) restrictions, so be careful out there...

SEE ALSO

vtkActor vtkRenderer vtkTextureDevice

SUMMARY

virtual void Render(vtkRenderer *ren);
Renders a texture map. It first checks the object's modified time to make sure the texture maps Input is valid, then it invokes the Load() method.

virtual void Load(vtkRenderer *) {};
Abstract interface to renderer. Each concrete subclass of vtkTexture will load its data into graphics system in response to this method invocation.

int GetRepeat()
Turn on/off the repetition of the texture map when the texture coords extend beyond the [0,1] range.

int GetInterpolate()
Turn on/off linear interpolation of the texture map when rendering.

int GetMapColorScalarsThroughLookupTable()
Turn on/off the mapping of color scalars through the lookup table. The default is Off.

If Off, unsigned char ColorScalars will be used directly as texture.

If On, unsigned char ColorScalars will be mapped through the lookup table.

This ivar does not affect other scalars like unsigned short, float, etc. These scalars are always mapped thorugh lookup tables.

void SetInput(vtkStructuredPoints*)
void SetInput(vtkStructuredPoints& )
Specify the data for the texture map.

void SetLookupTable(vtkLookupTable*)
void SetLookupTable(vtkLookupTable& )
Specify the lookup table to convert scalars if necessary

vtkColorScalars *GetMappedScalars()
Get Mapped Scalars

vtkTexture()
Construct object and initialize.


Table of Contents