VTK
|
handles properties associated with a texture map More...
#include <vtkTexture.h>
handles properties associated with a texture map
vtkTexture is an object that handles loading and binding of texture maps. It obtains its data from an input image data 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.)
Definition at line 69 of file vtkTexture.h.
Reimplemented from vtkImageAlgorithm.
Reimplemented in vtkOpenGLTexture.
Definition at line 73 of file vtkTexture.h.
Used to specify how the texture will blend its RGB and Alpha values with other textures and the fragment the texture is rendered upon.
Definition at line 177 of file vtkTexture.h.
vtkTexture::vtkTexture | ( | ) | [protected] |
vtkTexture::~vtkTexture | ( | ) | [protected] |
static vtkTexture* vtkTexture::New | ( | ) | [static] |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkAlgorithm.
Reimplemented in vtkOpenGLTexture.
static int vtkTexture::IsTypeOf | ( | const char * | name | ) | [static] |
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkImageAlgorithm.
Reimplemented in vtkOpenGLTexture.
virtual int vtkTexture::IsA | ( | const char * | name | ) | [virtual] |
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkImageAlgorithm.
Reimplemented in vtkOpenGLTexture.
static vtkTexture* vtkTexture::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkImageAlgorithm.
Reimplemented in vtkOpenGLTexture.
virtual vtkObjectBase* vtkTexture::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkImageAlgorithm.
Reimplemented in vtkOpenGLTexture.
vtkTexture* vtkTexture::NewInstance | ( | ) | const |
Reimplemented from vtkImageAlgorithm.
Reimplemented in vtkOpenGLTexture.
void vtkTexture::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) | [virtual] |
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkImageAlgorithm.
Reimplemented in vtkOpenGLTexture.
virtual void vtkTexture::Render | ( | vtkRenderer * | ren | ) | [virtual] |
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 vtkTexture::PostRender | ( | vtkRenderer * | ) | [inline, virtual] |
Cleans up after the texture rendering to restore the state of the graphics context.
Reimplemented in vtkOpenGLTexture.
Definition at line 83 of file vtkTexture.h.
virtual void vtkTexture::ReleaseGraphicsResources | ( | vtkWindow * | ) | [inline, virtual] |
Release any graphics resources that are being consumed by this texture. The parameter window could be used to determine which graphic resources to release.
Reimplemented in vtkOpenGLTexture.
Definition at line 88 of file vtkTexture.h.
virtual void vtkTexture::Load | ( | vtkRenderer * | ) | [inline, virtual] |
Abstract interface to renderer. Each concrete subclass of vtkTexture will load its data into graphics system in response to this method invocation.
Reimplemented in vtkOpenGLTexture.
Definition at line 93 of file vtkTexture.h.
virtual int vtkTexture::GetRepeat | ( | ) | [virtual] |
Turn on/off the repetition of the texture map when the texture coords extend beyond the [0,1] range.
virtual void vtkTexture::SetRepeat | ( | int | ) | [virtual] |
Turn on/off the repetition of the texture map when the texture coords extend beyond the [0,1] range.
virtual void vtkTexture::RepeatOn | ( | ) | [virtual] |
Turn on/off the repetition of the texture map when the texture coords extend beyond the [0,1] range.
virtual void vtkTexture::RepeatOff | ( | ) | [virtual] |
Turn on/off the repetition of the texture map when the texture coords extend beyond the [0,1] range.
virtual int vtkTexture::GetEdgeClamp | ( | ) | [virtual] |
Turn on/off the clamping of the texture map when the texture coords extend beyond the [0,1] range. Only used when Repeat is off, and edge clamping is supported by the graphics card.
virtual void vtkTexture::SetEdgeClamp | ( | int | ) | [virtual] |
Turn on/off the clamping of the texture map when the texture coords extend beyond the [0,1] range. Only used when Repeat is off, and edge clamping is supported by the graphics card.
virtual void vtkTexture::EdgeClampOn | ( | ) | [virtual] |
Turn on/off the clamping of the texture map when the texture coords extend beyond the [0,1] range. Only used when Repeat is off, and edge clamping is supported by the graphics card.
virtual void vtkTexture::EdgeClampOff | ( | ) | [virtual] |
Turn on/off the clamping of the texture map when the texture coords extend beyond the [0,1] range. Only used when Repeat is off, and edge clamping is supported by the graphics card.
virtual int vtkTexture::GetInterpolate | ( | ) | [virtual] |
Turn on/off linear interpolation of the texture map when rendering.
virtual void vtkTexture::SetInterpolate | ( | int | ) | [virtual] |
Turn on/off linear interpolation of the texture map when rendering.
virtual void vtkTexture::InterpolateOn | ( | ) | [virtual] |
Turn on/off linear interpolation of the texture map when rendering.
virtual void vtkTexture::InterpolateOff | ( | ) | [virtual] |
Turn on/off linear interpolation of the texture map when rendering.
virtual void vtkTexture::SetQuality | ( | int | ) | [virtual] |
Force texture quality to 16-bit or 32-bit. This might not be supported on all machines.
virtual int vtkTexture::GetQuality | ( | ) | [virtual] |
Force texture quality to 16-bit or 32-bit. This might not be supported on all machines.
void vtkTexture::SetQualityToDefault | ( | ) | [inline] |
Force texture quality to 16-bit or 32-bit. This might not be supported on all machines.
Definition at line 124 of file vtkTexture.h.
void vtkTexture::SetQualityTo16Bit | ( | ) | [inline] |
Force texture quality to 16-bit or 32-bit. This might not be supported on all machines.
Definition at line 126 of file vtkTexture.h.
void vtkTexture::SetQualityTo32Bit | ( | ) | [inline] |
Force texture quality to 16-bit or 32-bit. This might not be supported on all machines.
Definition at line 128 of file vtkTexture.h.
virtual int vtkTexture::GetMapColorScalarsThroughLookupTable | ( | ) | [virtual] |
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.
virtual void vtkTexture::SetMapColorScalarsThroughLookupTable | ( | int | ) | [virtual] |
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.
virtual void vtkTexture::MapColorScalarsThroughLookupTableOn | ( | ) | [virtual] |
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.
virtual void vtkTexture::MapColorScalarsThroughLookupTableOff | ( | ) | [virtual] |
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.
Get the input as a vtkImageData object. This method is for backwards compatibility.
Reimplemented from vtkImageAlgorithm.
void vtkTexture::SetLookupTable | ( | vtkScalarsToColors * | ) |
Specify the lookup table to convert scalars if necessary
virtual vtkScalarsToColors* vtkTexture::GetLookupTable | ( | ) | [virtual] |
Specify the lookup table to convert scalars if necessary
virtual vtkUnsignedCharArray* vtkTexture::GetMappedScalars | ( | ) | [virtual] |
Get Mapped Scalars
unsigned char* vtkTexture::MapScalarsToColors | ( | vtkDataArray * | scalars | ) |
Map scalar values into color scalars.
void vtkTexture::SetTransform | ( | vtkTransform * | transform | ) |
Set a transform on the texture which allows one to scale, rotate and translate the texture.
virtual vtkTransform* vtkTexture::GetTransform | ( | ) | [virtual] |
Set a transform on the texture which allows one to scale, rotate and translate the texture.
virtual int vtkTexture::GetBlendingMode | ( | ) | [virtual] |
Used to specify how the texture will blend its RGB and Alpha values with other textures and the fragment the texture is rendered upon.
virtual void vtkTexture::SetBlendingMode | ( | int | ) | [virtual] |
Used to specify how the texture will blend its RGB and Alpha values with other textures and the fragment the texture is rendered upon.
virtual bool vtkTexture::GetPremultipliedAlpha | ( | ) | [virtual] |
Whether the texture colors are premultiplied by alpha. Initial value is false.
virtual void vtkTexture::SetPremultipliedAlpha | ( | bool | ) | [virtual] |
Whether the texture colors are premultiplied by alpha. Initial value is false.
virtual void vtkTexture::PremultipliedAlphaOn | ( | ) | [virtual] |
Whether the texture colors are premultiplied by alpha. Initial value is false.
virtual void vtkTexture::PremultipliedAlphaOff | ( | ) | [virtual] |
Whether the texture colors are premultiplied by alpha. Initial value is false.
virtual int vtkTexture::GetRestrictPowerOf2ImageSmaller | ( | ) | [virtual] |
When the texture is forced to be a power of 2, the default behavior is for the "new" image's dimensions to be greater than or equal to with respects to the original. Setting RestrictPowerOf2ImageSmaller to be 1 (or ON) with force the new image's dimensions to be less than or equal to with respects to the original.
virtual void vtkTexture::SetRestrictPowerOf2ImageSmaller | ( | int | ) | [virtual] |
When the texture is forced to be a power of 2, the default behavior is for the "new" image's dimensions to be greater than or equal to with respects to the original. Setting RestrictPowerOf2ImageSmaller to be 1 (or ON) with force the new image's dimensions to be less than or equal to with respects to the original.
virtual void vtkTexture::RestrictPowerOf2ImageSmallerOn | ( | ) | [virtual] |
When the texture is forced to be a power of 2, the default behavior is for the "new" image's dimensions to be greater than or equal to with respects to the original. Setting RestrictPowerOf2ImageSmaller to be 1 (or ON) with force the new image's dimensions to be less than or equal to with respects to the original.
virtual void vtkTexture::RestrictPowerOf2ImageSmallerOff | ( | ) | [virtual] |
When the texture is forced to be a power of 2, the default behavior is for the "new" image's dimensions to be greater than or equal to with respects to the original. Setting RestrictPowerOf2ImageSmaller to be 1 (or ON) with force the new image's dimensions to be less than or equal to with respects to the original.
virtual int vtkTexture::IsTranslucent | ( | ) | [virtual] |
Is this Texture Translucent? returns false (0) if the texture is either fully opaque or has only fully transparent pixels and fully opaque pixels and the Interpolate flag is turn off.
int vtkTexture::Repeat [protected] |
Definition at line 225 of file vtkTexture.h.
int vtkTexture::EdgeClamp [protected] |
Definition at line 226 of file vtkTexture.h.
int vtkTexture::Interpolate [protected] |
Definition at line 227 of file vtkTexture.h.
int vtkTexture::Quality [protected] |
Definition at line 228 of file vtkTexture.h.
int vtkTexture::MapColorScalarsThroughLookupTable [protected] |
Definition at line 229 of file vtkTexture.h.
vtkScalarsToColors* vtkTexture::LookupTable [protected] |
Definition at line 230 of file vtkTexture.h.
vtkUnsignedCharArray* vtkTexture::MappedScalars [protected] |
Definition at line 231 of file vtkTexture.h.
vtkTransform* vtkTexture::Transform [protected] |
Definition at line 232 of file vtkTexture.h.
int vtkTexture::BlendingMode [protected] |
Definition at line 234 of file vtkTexture.h.
int vtkTexture::RestrictPowerOf2ImageSmaller [protected] |
Definition at line 235 of file vtkTexture.h.
int vtkTexture::SelfAdjustingTableRange [protected] |
Definition at line 237 of file vtkTexture.h.
bool vtkTexture::PremultipliedAlpha [protected] |
Definition at line 238 of file vtkTexture.h.
vtkTimeStamp vtkTexture::TranslucentComputationTime [protected] |
Definition at line 241 of file vtkTexture.h.
int vtkTexture::TranslucentCachedResult [protected] |
Definition at line 242 of file vtkTexture.h.