Public Member Functions
|TextureTransform3D (Inst< DisplayList > _displayList=0, Inst< SFNode > _metadata=0, Inst< SFVec3f > _center=0, Inst< SFRotation > _rotation=0, Inst< SFVec3f > _scale=0, Inst< SFVec3f > _translation=0)|
|virtual void||render ()|
|Set the GL_TEXTURE matrix to the specified texture transform for the currently active texture unit. |
|auto_ptr< SFVec3f >||center|
|The offset in texture coordinate space about which the rotation and scale fields are applied. |
|auto_ptr< SFRotation >||rotation|
|Specifies a rotation in radians of the texture coordinates about the center point after the scale has been applied. |
|auto_ptr< SFVec3f >||scale|
|Specifies a scaling factor in S and T of the texture coordinates about the center point. |
|auto_ptr< SFVec3f >||translation|
|Specifies a translation of the texture coordinates. |
Static Public Attributes
|The H3DNodeDatabase for this node. |
This node affects the way textures coordinates are applied to the geometric surface. The transformation consists of (in order):
These parameters support changes to the size, orientation, and position of textures on shapes. Note that these operations appear reversed when viewed on the surface of geometry. For example, a scale value of (1 2 2) will scale the texture coordinates and have the net effect of shrinking the texture size by a factor of 2 (texture coordinates are twice as large and thus cause the texture to repeat) in the T and R dimensions and leave the S dimension unscaled. A translation of (0.5 0.0 0.0) translates the texture coordinates +.5 units along the S-axis and has the net effect of translating the texture 0.5 along the S-axis on the geometry's surface. A rotation of pi/2 of the texture coordinates results in a pi/2 rotation of the texture on the geometry.
The center field specifies a translation offset in texture coordinate space about which the rotation and scale fields are applied. The scale field specifies a scaling factor in S, T and R of the texture coordinates about the center point. The rotation field specifies a rotation in radians of the texture coordinates about the center point after the scale has been applied. A positive rotation value makes the texture coordinates rotate counterclockwise about the centre, thereby rotating the appearance of the texture itself clockwise. The translation field specifies a translation of the texture coordinates.
In matrix transformation notation, where Tc is the untransformed texture coordinate, Tc' is the transformed texture coordinate, C (center), T (translation), R (rotation), and S (scale) are the intermediate transformation matrices,
Note that this transformation order is the reverse of the Transform node transformation order since the texture coordinates, not the texture, are being transformed (i.e., the texture coordinate system).