NAME
vtkTCoords - abstract interface to texture coordinates
SYNOPSIS
#include "/opt/vtk-c++/common/vtkTCoords.h"
class VTK_EXPORT vtkTCoords : public vtkReferenceCount
vtkTCoords(int dim=2);
const char *GetClassName() {return "vtkTCoords";};
void PrintSelf(ostream& os, vtkIndent indent);
virtual vtkTCoords *MakeObject(int sze, int d=2, int ext=1000) = 0;
virtual char *GetDataType() = 0;
virtual int GetNumberOfTCoords() = 0;
virtual float *GetTCoord(int id) = 0;
virtual void GetTCoord(int id, float tc[3]);
virtual void SetNumberOfTCoords(int number) = 0;
virtual void SetTCoord(int id, float *tc) = 0;
virtual void InsertTCoord(int id, float *tc) = 0;
void InsertTCoord(int id, float tc1, float tc2, float tc3);
virtual int InsertNextTCoord(float *tc) = 0;
int InsertNextTCoord(float tc1, float tc2, float tc3);
virtual void Squeeze() = 0;
void GetTCoords(vtkIdList& ptId, vtkFloatTCoords& fp);
void SetDimension(int);
int GetDimension();
DESCRIPTION
vtkTCoords provides an abstract interface to 2D or 3D texture coordinates. Texture coordinates are 2D (s,t) or 3D (r,s,t) parametric values that map geometry into regular 2D or 3D arrays of color and/or transparency values. During rendering the array are mapped onto the geometry for fast image detailing. The subclasses of vtkTCoords are concrete data types (float, int, etc.) that implement the interface of vtkTCoords.
SUMMARY
virtual vtkTCoords *MakeObject(int sze, int d=2, int ext=1000) = 0; Create a copy of this object.
virtual char *GetDataType() = 0;
Return data type. One of "bit", "unsigned char", "short", "int", "float", or "double".
virtual int GetNumberOfTCoords() = 0;
Return number of texture coordinates in array.
virtual float *GetTCoord(int id) = 0;
Return a float texture coordinate tc[2/3] for a particular point id.
virtual void GetTCoord(int id, float tc[3]);
Copy float texture coordinates into user provided array tc[2/3] for specified point id.
virtual void SetNumberOfTCoords(int number) = 0;
Specify the number of texture coords for this object to hold. Does an allocation as well as setting the MaxId ivar. Used in conjunction with SetTCoord() method for fast insertion.
virtual void SetTCoord(int id, float *tc) = 0;
Insert texture coordinate into object. No range checking performed (fast!). Make sure you use SetNumberOfPoints() to allocate memory prior to using SetPoint().
virtual void InsertTCoord(int id, float *tc) = 0;
Insert texture coordinate into object. Range checking performed and memory allocated as necessary.
virtual int InsertNextTCoord(float *tc) = 0;
Insert texture coordinate into next available slot. Returns point id of slot.
virtual void Squeeze() = 0;
Reclaim any extra memory.
void InsertTCoord(int id, float tc1, float tc2, float tc3) Insert texture coordinate into position indicated. Although up to three texture components may be specified (i.e., tc1, tc2, tc3), if the texture coordinates are less than 3 dimensions the extra components will be ignored.
int InsertNextTCoord(float tc1, float tc2, float tc3) Insert texture coordinate into position indicated. Although up to three texture components may be specified (i.e., tc1, tc2, tc3), if the texture coordinates are less than 3 dimensions, the extra components will be ignored.
vtkTCoords(int dim)
Construct object whose texture coordinates are of specified dimension.
void GetTCoords(vtkIdList& ptId, vtkFloatTCoords& ftc)
Given a list of pt ids, return an array of texture coordinates.