Abstract base class for texture mapping nodes. More...
#include <Inventor/nodes/SoTexture.h>
Public Member Functions | |
virtual SoType | getTypeId () const |
Returns the type identifier for this specific instance. | |
void | setBitmapFileType (FileType in_type) |
Sets the texture file format. | |
FileType | getBitmapFileType (void) |
Gets the texture file format. | |
virtual void | setOverride (const SbBool state) |
Set the state of the override field. | |
virtual SbBool | isOverride () const |
Returns the state of the override field. | |
Public Member Functions inherited from SoNode | |
virtual SoNode * | copy (SbBool copyConnections=FALSE) const |
Creates and returns an exact copy of the node. | |
virtual SbBool | affectsState () const |
Returns TRUE if a node has an effect on the state during traversal. | |
virtual void | touch () |
Marks an instance as modified, simulating a change to it. | |
Public Member Functions inherited from SoFieldContainer | |
void | setToDefaults () |
Sets all fields in this object to their default values. | |
SbBool | hasDefaultValues () const |
Returns TRUE if all of the object's fields have their default values. | |
SbBool | fieldsAreEqual (const SoFieldContainer *fc) const |
Returns TRUE if this object's fields are exactly equal to fc's fields. | |
void | copyFieldValues (const SoFieldContainer *fc, SbBool copyConnections=FALSE) |
Copies the contents of fc's fields into this object's fields. | |
SoNONUNICODE SbBool | set (const char *fieldDataString) |
Sets one or more fields in this object to the values specified in the given string, which should be a string in the Open Inventor file format. | |
SbBool | set (const SbString &fieldDataString) |
Sets one or more fields in this object to the values specified in the given string, which should be a string in the Open Inventor file format. | |
void | get (SbString &fieldDataString) |
Returns the values of the fields of this object in the Open Inventor ASCII file format in the given string. | |
virtual int | getFields (SoFieldList &list) const |
Appends references to all of this object's fields to resultList, and returns the number of fields appended. | |
virtual int | getAllFields (SoFieldList &list) const |
Returns a list of fields, including the eventIn's and eventOut's. | |
virtual SoField * | getField (const SbName &fieldName) const |
Returns a the field of this object whose name is fieldName. | |
virtual SoField * | getEventIn (const SbName &fieldName) const |
Returns a the eventIn with the given name. | |
virtual SoField * | getEventOut (const SbName &fieldName) const |
Returns the eventOut with the given name. | |
SbBool | getFieldName (const SoField *field, SbName &fieldName) const |
Returns the name of the given field in the fieldName argument. | |
SbBool | enableNotify (SbBool flag) |
Notification at this Field Container is enabled (if flag == TRUE) or disabled (if flag == FALSE). | |
SbBool | isNotifyEnabled () const |
Notification is the process of telling interested objects that this object has changed. | |
virtual void | setUserData (void *data) |
Sets application data. | |
void * | getUserData (void) const |
Gets user application data. | |
Public Member Functions inherited from SoBase | |
virtual SbName | getName () const |
Returns the name of an instance. | |
virtual void | setName (const SbName &name) |
Sets the name of an instance. | |
void | setSynchronizable (const bool b) |
Sets this to be a ScaleViz synchronizable object. | |
bool | isSynchronizable () const |
Gets the ScaleViz synchronizable state of this object. | |
Public Member Functions inherited from SoRefCounter | |
void | ref () const |
Adds a reference to an instance. | |
void | unref () const |
Removes a reference from an instance. | |
void | unrefNoDelete () const |
unrefNoDelete() should be called when it is desired to decrement the reference count, but not delete the instance if this brings the reference count to zero. | |
int | getRefCount () const |
Returns current reference count. | |
void | lock () const |
lock this instance. | |
void | unlock () const |
unlock this instance. | |
Public Member Functions inherited from SoTypedObject | |
SbBool | isOfType (const SoType &type) const |
Returns TRUE if this object is of the type specified in type or is derived from that type. | |
template<typename TypedObjectClass > | |
SbBool | isOfType () const |
Returns TRUE if this object is of the type of class TypedObjectClass or is derived from that class. | |
Static Public Member Functions | |
static SoType | getClassTypeId () |
Returns the type identifier for this class. | |
static SbBool | isSupported (HW_Feature feature) |
Returns information about hardware support for various texture features. | |
static SbRasterImage * | readTexture (const SbString &filename, FileType filetype=UNKNOWN) |
Convenience function that loads the image data from any texture file supported by Open Inventor and returns an SbRasterImage object. | |
Static Public Member Functions inherited from SoNode | |
static SoType | getClassTypeId () |
Returns the type identifier for this class. | |
static SoNode * | getByName (const SbName &name) |
A node's name can be set using SoBase::setName(). | |
static int | getByName (const SbName &name, SoNodeList &list) |
A node's name can be set using SoBase::setName(). | |
Static Public Member Functions inherited from SoFieldContainer | |
static SoType | getClassTypeId () |
Returns the type of this class. | |
Static Public Member Functions inherited from SoBase | |
static SoType | getClassTypeId () |
Returns type identifier for this class. | |
Static Public Member Functions inherited from SoTypedObject | |
static SoType | getClassTypeId () |
Returns the type identifier for this class. | |
Public Attributes | |
SoSFEnum | internalFormat |
Internal format for texture storage. | |
SoSFBool | enableCompressedTexture |
Enables storage of textures on the graphics board in compressed form. | |
SoSFEnum | wrapS |
Indicates what to do when texture coordinates in the S (horizontal) direction lie outside the range 0-1. | |
SoSFEnum | model |
Specifies how to map texture onto surface. | |
SoSFColor | blendColor |
Color used for BLEND model. | |
SoSFBool | enableBorder |
Enables borders for textures. | |
SoSFVec4f | borderColor |
Defines border color used for border texture filtering. | |
SoSFFloat | maxAnisotropy |
Specifies on a per-texture object basis, the maximum degree of anisotropy to account for in texture filtering. | |
SoSFEnum | minFilter |
Specifies the OpenGL minFilter. | |
SoSFEnum | magFilter |
Specifies the OpenGL magFilter. | |
Abstract base class for texture mapping nodes.
This is the abstract base class for all texture image nodes. It defines the common methods and fields that all texture image nodes have. When a texture image node is encountered during traversal, the associated image and parameters are applied to the current texture unit (see SoTextureUnit) and used to apply the texture to subsequent shapes.
Open Inventor provides multiple texture image nodes optimized for different purposes, including:
Applications may use the isSupported() method to check if the graphics hardware supports a specific texture mapping feature.
SoComplexity, SoExtTexture2, SoIndexedTexture2, SoMaterial, SoTexture2, SoTexture2Transform, SoTexture3, SoTextureCombiner, SoTextureCoordinate2, SoTextureCoordinateBinding, SoTextureCoordinateFunction, SoTextureCubeMap, SoTextureUnit
Definition at line 156 of file SoTexture.h.
enum SoTexture::FileType |
File Type possible values.
Enumerator | |
---|---|
UNKNOWN | Unknown file. |
RGB | RGB. |
SGI | SGI. |
TIFF | TIFF. |
GIF | GIF. |
JPEG | JPEG. |
BMP | BMP. |
PNG | PNG. |
JPEG2000 | JPEG2000. |
DDS | DDS. |
HDRI | HDRI. |
NUM_FILETYPES | NUM_FILETYPES. |
Definition at line 642 of file SoTexture.h.
enum SoTexture::Filter |
Specifies the OpenGL filtering method for minification and magnification.
AUTO is the default value. In this case Open Inventor automatically selects the filtering method depending on SoComplexity::textureQuality.
Definition at line 452 of file SoTexture.h.
Definition at line 473 of file SoTexture.h.
Texture internal storage format.
AUTO_INTERNAL_FORMAT (equivalent to RGB_FORMAT) by default.
Definition at line 166 of file SoTexture.h.
enum SoTexture::Model |
Texture Combiner Functions.
Definition at line 360 of file SoTexture.h.
enum SoTexture::Wrap |
Texture wrap type.
Definition at line 408 of file SoTexture.h.
FileType SoTexture::getBitmapFileType | ( | void | ) |
Gets the texture file format.
|
static |
Returns the type identifier for this class.
|
virtual |
Returns the type identifier for this specific instance.
Reimplemented from SoNode.
Reimplemented in SoExtTexture2, SoIndexedTexture2, SoTexture2, SoTexture3, SoTextureCubeMap, SoUniformGridClipping, and SoUniformGridProjectionClipping.
|
inlinevirtual |
Returns the state of the override field.
Reimplemented from SoNode.
Definition at line 705 of file SoTexture.h.
|
static |
Returns information about hardware support for various texture features.
When using a debug build of Open Inventor, some "no context available" warning messages may be generated. You can ignore them or see SoGLExtension for an example of using SoGLContext to avoid them.
|
static |
Convenience function that loads the image data from any texture file supported by Open Inventor and returns an SbRasterImage object.
Returns null if the load fails for any reason.
If the file type is known, you may specify it using the FileType enum and Open Inventor will use the corresponding image reader. If filetype is UNKNOWN, Open Inventor will try to automatically determine which image reader should be used for the given file.
void SoTexture::setBitmapFileType | ( | FileType | in_type | ) |
Sets the texture file format.
Default is UNKNOWN. If file type is set to UNKNOWN, Open Inventor tries to determine the file type from the file name extension (e.g., foo. gif implies a GIF file). If the set or determined file type is not UNKNOWN, Open Inventor attempts to read the file as that format. If this fails, Open Inventor will try reading the file as each possible format in turn. It is not necessary to set the file type if the image file has the standard file name extension.
|
inlinevirtual |
Set the state of the override field.
see SoNode::setOverride doc.
Reimplemented from SoNode.
Definition at line 699 of file SoTexture.h.
|
friend |
Definition at line 806 of file SoTexture.h.
|
friend |
Definition at line 807 of file SoTexture.h.
|
friend |
Definition at line 808 of file SoTexture.h.
|
friend |
Definition at line 810 of file SoTexture.h.
|
friend |
Definition at line 811 of file SoTexture.h.
|
friend |
Definition at line 808 of file SoTexture.h.
SoSFColor SoTexture::blendColor |
Color used for BLEND model.
Definition at line 571 of file SoTexture.h.
SoSFVec4f SoTexture::borderColor |
Defines border color used for border texture filtering.
This value is only used if enableBorder is FALSE.
NOTE: field available since Open Inventor 5.0
Definition at line 587 of file SoTexture.h.
SoSFBool SoTexture::enableBorder |
Enables borders for textures.
This means that the border is already in the texture.
NOTE: field available since Open Inventor 5.0
Definition at line 579 of file SoTexture.h.
SoSFBool SoTexture::enableCompressedTexture |
Enables storage of textures on the graphics board in compressed form.
The application supplies textures as usual, then OpenGL compresses the textures. This can reduce usage of texture memory significantly, depending on the texture image.
To use this option, you must be using OpenGL 1.3 or higher, or your board must support the OpenGL GL_ARB_texture_compression extension.
NOTE: field available since Open Inventor 4.0
Definition at line 553 of file SoTexture.h.
SoSFEnum SoTexture::internalFormat |
Internal format for texture storage.
If not available on the graphics device, internalFormat is set back to AUTO_INTERNAL_FORMAT. Use enum InternalFormat. Default is AUTO_INTERNAL_FORMAT. If internal format is set to AUTO_INTERNAL_FORMAT texture precision could only be 16-bit maximum. To go beyond this limitation, you must set the internal format to the needed value.
NOTE: field available since Open Inventor 6.0
Definition at line 538 of file SoTexture.h.
SoSFEnum SoTexture::magFilter |
Specifies the OpenGL magFilter.
Use enum Filter. Default is AUTO. Only the following Filter values are valid: AUTO, NEAREST, and LINEAR.
The magnification filter is used when the rendered size of the geometry is larger than the texture image to be applied (typically near objects). Effectively controls whether the GPU will select the "nearest" texel in the texture image or do linear interpolation (smoothing). Using NEAREST may allow better performance, but the LINEAR options produce much higher quality rendering.
Only the values NEAREST and LINEAR are valid in this field (see OpenGL specification).
The default value (AUTO) means that the magnification filter setting is actually controlled by the SoComplexity::textureQuality field.
NOTE: field available since Open Inventor 5.0
Definition at line 639 of file SoTexture.h.
SoSFFloat SoTexture::maxAnisotropy |
Specifies on a per-texture object basis, the maximum degree of anisotropy to account for in texture filtering.
If the specified value is greater than the maximum supported by the graphics board, the value is clamped to GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT.
To use this option, you must be using OpenGL 1.1 or higher, or your board must support the OpenGL GL_EXT_filter_anisotropic extension.
NOTE: field available since Open Inventor 5.0
Definition at line 600 of file SoTexture.h.
SoSFEnum SoTexture::minFilter |
Specifies the OpenGL minFilter.
Use enum Filter. Default is AUTO. The minification filter is used when the rendered size of the geometry is smaller than the texture image to be applied (typically far away objects). Effectively controls whether the GPU will select the "nearest" texel in the texture image or do linear interpolation (smoothing) or even interpolate between mipmap levels (subsampled versions of the base image). Using NEAREST may allow better performance, but the LINEAR options produce much higher quality rendering.
The default value (AUTO) means that the minification filter setting is actually controlled by the SoComplexity::textureQuality field.
NOTE: field available since Open Inventor 5.0
Definition at line 618 of file SoTexture.h.
SoSFEnum SoTexture::model |
Specifies how to map texture onto surface.
Use enum Model. Default is MODULATE.
Definition at line 566 of file SoTexture.h.
SoSFEnum SoTexture::wrapS |
Indicates what to do when texture coordinates in the S (horizontal) direction lie outside the range 0-1.
Use enum Wrap. Default is REPEAT.
Definition at line 560 of file SoTexture.h.