Scroll to navigation

SoTexture2Transform(3IV)() SoTexture2Transform(3IV)()

NAME

SoTexture2Transform — 2D texture transformation node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTexture2Transform

SYNOPSIS

#include <Inventor/nodes/SoTexture2Transform.h>


Fields from class SoTexture2Transform:


SoSFVec2f translation

SoSFFloat rotation

SoSFVec2f scaleFactor

SoSFVec2f center


Methods from class SoTexture2Transform:


SoTexture2Transform()

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 node defines a 2D transformation applied to texture coordinates. This affects the way textures are applied to the surfaces of subsequent shapes. The transformation consists of (in order) a non-uniform scale about an arbitrary center point, a rotation about that same point, and a translation. (Note: while the transformations can be thought of as being applied in that order, the GL matrices are actually premultiplied in the opposite order. Therefore, the operations are listed in the reverse order throughout this reference page.) This allows a user to change the size and position of the textures on objects.

FIELDS


SoSFVec2f translation

Translation in S and T.



SoSFFloat rotation

Counter-clockwise rotation of the coordinate space, in radians. This results in a clockwise rotation of the texture on the object.



SoSFVec2f scaleFactor

Scaling factors in S and T.



SoSFVec2f center

Center point used for scaling and rotation.


METHODS


SoTexture2Transform()

Creates a texture transformation node with default settings.



static SoType getClassTypeId()

Returns type identifier for this class.


ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction

Concatenates transformation with the current texture transformation.


FILE FORMAT/DEFAULTS

Texture2Transform {

translation 0 0 rotation 0 scaleFactor 1 1 center 0 0
}

SEE ALSO

SoTexture2, SoTextureCoordinate2, SoTextureCoordinateFunction