SoTexture2(3IV)

SoTexture2 (SoTex2) - texture mapping node

As shipped in IRIX 6.5.30. Added in IRIX 6.5.22.

NAME
     SoTexture2 (SoTex2) - texture mapping node

INHERITS FROM
     SoBase > SoFieldContainer > SoNode > SoTexture2

SYNOPSIS
     #include <Inventor_c/nodes/SoTexture2.h>

     typedef SoTexture2  SoTex2

     enum SoTexture2Model {
          SO_TEX2_MODULATE    The texture color is multiplied by the surface
                                   color
          SO_TEX2_DECAL       The texture color replaces the surface color
          SO_TEX2_BLEND       Blends between the surface color and a specified
                                   blend color
     }

     enum SoTexture2Wrap {
          SO_TEX2_REPEAT      Repeats texture outside 0-1 texture coordinate
                                   range
          SO_TEX2_CLAMP       Clamps texture coordinates to lie within 0-1
                                   range
     }

          Fields from class SoTexture2:

     SoSFString          filename
     SoSFImage           image
     SoSFEnum            wrapS
     SoSFEnum            wrapT
     SoSFEnum            model
     SoSFColor           blendColor

          Functions from class SoTexture2:

     SoTexture2 *        SoTex2Create()
     SoType              SoTex2GetClassTypeId()

          Functions from class SoNode:

     void                SoTex2SetOverride(SoTex2 *this, SbBool state)
     SbBool              SoTex2IsOverride(const SoTex2 *this)
     SoNode *            SoTex2Copy(const SoTex2 *this, SbBool copyConnections
                              = FALSE)
     SbBool              SoTex2AffectsState(const SoTex2 *this)
     SoNode *            SoTex2GetByName(const char *name)
     int                 SoTex2GetByNameList(const char *name, SoNodeList
                              *list)

          Functions from class SoFieldContainer:
     void                SoTex2SetToDflts(SoTex2 *this)
     SbBool              SoTex2HasDfltVals(const SoTex2 *this)
     SbBool              SoTex2FldsAreEq(const SoTex2 *this, const
                              SoFieldContainer *fc)
     void                SoTex2CopyFieldVals(SoTex2 *this, const
                              SoFieldContainer *fc, SbBool copyConnections =
                              FALSE)
     SbBool              SoTex2Set(SoTex2 *this, const char *fieldDataString)
     void                SoTex2Get(SoTex2 *this, SbString *fieldDataString)
     int                 SoTex2GetFields(const SoTex2 *this, SoFieldList
                              *resultList)
     SoField *           SoTex2GetField(const SoTex2 *this, const char
                              *fieldName)
     SbBool              SoTex2GetFieldName(const SoTex2 *this, const SoField
                              *field, SbName *fieldName)
     SbBool              SoTex2IsNotifyEnabled(const SoTex2 *this)
     SbBool              SoTex2EnableNotify(SoTex2 *this, SbBool flag)

          Functions from class SoBase:

     void                SoTex2Ref(SoTex2 *this)
     void                SoTex2Unref(const SoTex2 *this)
     void                SoTex2UnrefNoDelete(const SoTex2 *this)
     void                SoTex2Touch(SoTex2 *this)
     SoType              SoTex2GetTypeId(const SoTex2 *this)
     SbBool              SoTex2IsOfType(const SoTex2 *this, SoType type)
     void                SoTex2SetName(SoTex2 *this, const char *name)
     SbName              SoTex2GetName(const SoTex2 *this)


DESCRIPTION
     This property node defines a texture map and parameters for that map.
     This map is used to apply texture to subsequent shapes as they are
     rendered.

     The texture can be read from the file specified by the filename field.
     Once the texture has been read, the image field contains the texture
     data. However, this field is marked so the image is not written out when
     the texture node is written to a file. To turn off texturing, set the
     filename field to an empty string ("").

     Textures can also be specified in memory by setting the image field to
     contain the texture data. Doing so resets the filename to the empty
     string.

     If the texture image's width or height is not a power of 2, or the
     image's width or height is greater than the maximum supported by OpenGL,
     then the image will be automatically scaled up or down to the next power
     of 2 or the maximum texture size. For maximum speed, point-sampling is
     used to do the scale; if you want more accurate resampling, pre-filter
     images to a power of 2 smaller than the maximum texture size (use the
     OpenGL glGetIntegerv(GL_MAX_TEXTURE_SIZE...)  call to determine maximum
     texture for a specific OpenGL implementation).

     The quality of the texturing is affected by the textureQuality field of
     the SoComplexity node. The textureQuality field affects what kind of
     filtering is done to the texture when it must be minified or magnified.
     The mapping of a particular texture quality value to a particular OpenGL
     filtering technique is implementation dependent, and varies based on the
     texturing performance.  If mipmap filtering is required, mipmaps are
     automatically created using the simple box filter.

FIELDS
     SoSFString          filename
          Names file from which to read texture image. Currently only SGI .rgb
          files are supported. If the filename is not an absolute path name,
          the list of directories maintained by SoInput is searched. If the
          texture is not found in any of those directories, then the file is
          searched for relative to the directory from which the SoTexture2
          node was read. For example, if an SoTexture2 node with a filename of
          "../tofu.rgb" is read from /usr/people/bob/models/food.iv, then
          /usr/people/bob/tofu.rgb will be read (assuming tofu.rgb isn't found
          in the directories maintained by SoInput).

     SoSFImage           image
          Contains an in-memory representation of the texture map. It is
          either the contents of the file read from filename, an image read
          directly from an Inventor file, or an image set programmatically
          using the methods provided by SoSFImage.

     SoSFEnum            wrapS
     SoSFEnum            wrapT
          Indicates what to do when texture coordinates in the S (horizontal)
          or T (vertical) direction lie outside the range 0-1.

     SoSFEnum            model
          Specifies how to map texture onto surface.

     SoSFColor           blendColor
          Color used for BLEND model.


FUNCTIONS
     SoTexture2 *        SoTex2Create()
          Creates a texture node with default settings.

     SoType              SoTex2GetClassTypeId()
          Returns type identifier for this class.


ACTION BEHAVIOR
     SoGLRenderAction, SoCallbackAction
          Sets current texture in state.

FILE FORMAT/DEFAULTS
     Texture2 {
          filename    ""
          image       0 0 0
          wrapS       REPEAT
          wrapT       REPEAT
          model       MODULATE
          blendColor  0 0 0
     }

SEE ALSO
     SoComplexity, SoMaterial, SoTexture2Transform, SoTextureCoordinate2,
     SoTextureCoordinateBinding, SoTextureCoordinateFunction