Documentation for vtkTexture

vtkTexture - handles properties associated with a texture map

Super Class: vtkObject

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

 

Methods:

void vtkTexture ()
void vtkTexture ()
static vtkTexture *New ()
const char *GetClassName ()
void PrintSelf (unknown & ,vtkIndent )
void Render (vtkRenderer *)
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 *)
vtkStructuredPoints *GetInput ()
void SetInput (vtkImageCache *)
void SetLookupTable (vtkLookupTable *)
vtkLookupTable *GetLookupTable ()
vtkScalars *GetMappedScalars ()
unsigned char *MapScalarsToColors (vtkScalars *)

 

Detailed Method Descriptions:

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.

void Render (vtkRenderer *)

Abstract interface to renderer. Each concrete subclass of vtkTexture will load its data into graphics system in response to this method invocation.

void Load (vtkRenderer *)

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

int GetRepeat ()
void SetRepeat (int )
void RepeatOn ()
void RepeatOff ()

Turn on/off linear interpolation of the texture map when rendering.

int GetInterpolate ()
void SetInterpolate (int )
void InterpolateOn ()
void InterpolateOff ()

Turn on/off the mapping of color scalars through the lookup table. The default is Off. If Off, unsigned char scalars will be used directly as texture. If On, scalars will be mapped through the lookup table to generate 4-component unsigned char scalars. This ivar does not affect other scalars like unsigned short, float, etc. These scalars are always mapped through lookup tables.

int GetMapColorScalarsThroughLookupTable ()
void SetMapColorScalarsThroughLookupTable (int )
void MapColorScalarsThroughLookupTableOn ()
void MapColorScalarsThroughLookupTableOff ()

Specify the data for the texture map.

void SetInput (vtkStructuredPoints *)
vtkStructuredPoints *GetInput ()

Specify the lookup table to convert scalars if necessary

void SetInput (vtkImageCache *)
void SetLookupTable (vtkLookupTable *)
vtkLookupTable *GetLookupTable ()

Get Mapped Scalars

vtkScalars *GetMappedScalars ()

Map scalar values into color scalars.

unsigned char *MapScalarsToColors (vtkScalars *)