GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SOTEXTURE2 (3)

NAME

SoTexture2 — texture mapping node

CONTENTS

Inherits From
Synopsis
Description
Fields
Methods
Action Behavior
File Format/defaults
See Also

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTexture2

SYNOPSIS

#include <Inventor/nodes/SoTexture2.h>

enum Model {     SoTexture2::MODULATE    
                       SoTexture2::MODULATE   The texture color is multiplied by the surface color    
SoTexture2::DECAL    
                       SoTexture2::DECAL      The texture color replaces the surface color    
SoTexture2::BLEND    
                       SoTexture2::BLEND      Blends between the surface color and a specified blend color
}

enum Wrap {     SoTexture2::REPEAT    
                     SoTexture2::REPEAT   Repeats texture outside 0-1 texture coordinate range    
SoTexture2::CLAMP    
                     SoTexture2::CLAMP    Clamps texture coordinates to lie within 0-1 range
}

Fields from class SoTexture2:

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

Methods from class SoTexture2:

       
                    
                     SoTexture2()    
static SoType    
                    
static SoType        getClassTypeId()

Methods from class SoNode:

    void    
                    
void                 setOverride(SbBool state)    
SbBool    
                    
SbBool               isOverride() const    
SoNode *    
                    
SoNode *             copy(SbBool copyConnections = FALSE) const    
virtual SbBool    
                    
virtual SbBool       affectsState() const    
static SoNode *    
                    
static SoNode *      getByName(const SbName &name)    
static int    
                    
static int           getByName(const SbName &name, SoNodeList &list)

Methods from class SoFieldContainer:

    void    
                    
void                 setToDefaults()    
SbBool    
                    
SbBool               hasDefaultValues() const    
SbBool    
                    
SbBool               fieldsAreEqual(const SoFieldContainer *fc) const    
void    
                    
void                 copyFieldValues(const SoFieldContainer *fc, SbBool copyConnections = FALSE)    
SbBool    
                    
SbBool               set(const char *fieldDataString)    
void    
                    
void                 get(SbString &fieldDataString)    
virtual int    
                    
virtual int          getFields(SoFieldList &resultList) const    
virtual SoField *    
                    
virtual SoField *    getField(const SbName &fieldName) const    
SbBool    
                    
SbBool               getFieldName(const SoField *field, SbName &fieldName) const    
SbBool    
                    
SbBool               isNotifyEnabled() const    
SbBool    
                    
SbBool               enableNotify(SbBool flag)

Methods from class SoBase:

    void    
                    
void                 ref()    
void    
                    
void                 unref() const    
void    
                    
void                 unrefNoDelete() const    
void    
                    
void                 touch()    
virtual SoType    
                    
virtual SoType       getTypeId() const    
SbBool    
                    
SbBool               isOfType(SoType type) const    
virtual void    
                    
virtual void         setName(const SbName &name)    
virtual SbName    
                    
virtual SbName       getName() const

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    
                    
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    
                    
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    
                    
SoSFEnum             wrapS    
SoSFEnum    
                    
SoSFEnum             wrapT
Indicates what to do when texture coordinates in the S (horizontal) or T (vertical) direction lie outside the range 0-1.

    SoSFEnum    
                    
SoSFEnum             model
Specifies how to map texture onto surface.

    SoSFColor    
                    
SoSFColor            blendColor
Color used for BLEND model.

METHODS

       
                    
                     SoTexture2()
Creates a texture node with default settings.

    static SoType    
                    
static SoType        getClassTypeId()
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

Search for    or go to Top of page |  Section 3 |  Main Index


SOTEXTURE2(3IV) (-->)

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.