table of contents
other sections
SoTexture2(3IV)() | SoTexture2(3IV)() |
NAME¶
SoTexture2 — texture mapping nodeINHERITS FROM¶
SoBase > SoFieldContainer > SoNode > SoTexture2SYNOPSIS¶
#include <Inventor/nodes/SoTexture2.h>enum Model {
SoTexture2::MODULATE The texture color is multiplied by the surface color
SoTexture2::DECAL The texture color replaces the surface color
SoTexture2::BLEND Blends between the surface color and a specified blend color
}
enum Wrap {
SoTexture2::REPEAT Repeats texture outside 0-1 texture coordinate range
SoTexture2::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
Methods from class SoTexture2:
SoTexture2()
static SoType getClassTypeId()
Methods from class SoNode:
void setOverride(SbBool state)
SbBool isOverride() const
SoNode * copy(SbBool copyConnections = FALSE) const
virtual SbBool affectsState() const
static SoNode * getByName(const SbName &name)
static int getByName(const SbName &name, SoNodeList &list)
Methods from class SoFieldContainer:
void setToDefaults()
SbBool hasDefaultValues() const
SbBool fieldsAreEqual(const SoFieldContainer *fc) const
void copyFieldValues(const SoFieldContainer *fc, SbBool copyConnections = FALSE)
SbBool set(const char *fieldDataString)
void get(SbString &fieldDataString)
virtual int getFields(SoFieldList &resultList) const
virtual SoField * getField(const SbName &fieldName) const
SbBool getFieldName(const SoField *field, SbName &fieldName) const
SbBool isNotifyEnabled() const
SbBool enableNotify(SbBool flag)
Methods from class SoBase:
void ref()
void unref() const
void unrefNoDelete() const
void touch()
virtual SoType getTypeId() const
SbBool isOfType(SoType type) const
virtual void setName(const SbName &name)
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.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.
METHODS¶
SoTexture2()
Creates a texture node with default settings.
static SoType getClassTypeId()
Returns type identifier for this class.
ACTION BEHAVIOR¶
SoGLRenderAction, SoCallbackActionSets current texture in state.
FILE FORMAT/DEFAULTS¶
Texture2 {
filename "" image 0 0 0 wrapS REPEAT wrapT REPEAT model MODULATE blendColor 0 0 0
}