Coin
4.0.3
Coin3D core library
|
The SoVRMLTextureTransform class defines a transformation applied to texture coordinates. More...
#include <Inventor/VRMLnodes/SoVRMLTextureTransform.h>
Public Attributes | |
SoSFVec2f | center |
SoSFFloat | rotation |
SoSFVec2f | scale |
SoSFVec2f | translation |
Protected Member Functions | |
virtual | ~SoVRMLTextureTransform () |
virtual const SoFieldData * | getFieldData (void) const |
Protected Member Functions inherited from SoNode | |
SoNode (void) | |
virtual | ~SoNode () |
virtual SbBool | readInstance (SoInput *in, unsigned short flags) |
Protected Member Functions inherited from SoFieldContainer | |
SoFieldContainer (void) | |
virtual | ~SoFieldContainer () |
Protected Member Functions inherited from SoBase | |
SoBase (void) | |
virtual | ~SoBase () |
virtual SoNotRec | createNotRec (void) |
virtual void | destroy (void) |
virtual const char * | getFileFormatName (void) const |
SbBool | hasMultipleWriteRefs (void) const |
void | writeFooter (SoOutput *out) const |
SbBool | writeHeader (SoOutput *out, SbBool isgroup, SbBool isengine) const |
Static Protected Member Functions | |
static const SoFieldData ** | getFieldDataPtr (void) |
Static Protected Member Functions inherited from SoNode | |
static const SoFieldData ** | getFieldDataPtr (void) |
static int | getNextActionMethodIndex (void) |
static void | incNextActionMethodIndex (void) |
static void | setCompatibilityTypes (const SoType &nodetype, const uint32_t bitmask) |
static void | setNextActionMethodIndex (int index) |
Static Protected Member Functions inherited from SoBase | |
static uint32_t | getCurrentWriteCounter (void) |
static void | staticDataLock (void) |
static void | staticDataUnlock (void) |
Additional Inherited Members | |
Public Types inherited from SoNode | |
enum | NodeType { INVENTOR = 0x0000 , VRML1 = 0x0001 , VRML2 = 0x0002 , INVENTOR_1 = 0x0004 , INVENTOR_2_0 = 0x0008 , INVENTOR_2_1 = 0x0010 , INVENTOR_2_5 = 0x0020 , INVENTOR_2_6 = 0x0040 , COIN_1_0 = 0x0080 , COIN_2_0 = 0x0100 , EXTENSION = 0x0200 , COIN_2_2 = 0x0400 , COIN_2_3 = 0x0800 , COIN_2_4 = 0x1000 , INVENTOR_5_0 = 0x2000 , COIN_2_5 = 0x4000 , COIN_3_0 = 0x8000 , INVENTOR_6_0 = 0x10000 , COIN_4_0 = 0x20000 } |
Protected Types inherited from SoBase | |
enum | BaseFlags { IS_ENGINE = 0x01 , IS_GROUP = 0x02 } |
Protected Attributes inherited from SoNode | |
SbUniqueId | uniqueId |
Protected Attributes inherited from SoFieldContainer | |
SbBool | isBuiltIn |
Static Protected Attributes inherited from SoNode | |
static int | nextActionMethodIndex = 0 |
static SbUniqueId | nextUniqueId = 1 |
The SoVRMLTextureTransform class defines a transformation applied to texture coordinates.
The detailed class documentation is taken verbatim from the VRML97 standard (ISO/IEC 14772-1:1997). It is copyright The Web3D Consortium, and is used by permission of the Consortium:
TextureTransform { exposedField SFVec2f center 0 0 # (-inf, inf) exposedField SFFloat rotation 0 # (-inf, inf) exposedField SFVec2f scale 1 1 # (-inf, inf) exposedField SFVec2f translation 0 0 # (-inf, inf) }
The TextureTransform node defines a 2D transformation that is applied to texture coordinates (see SoVRMLTextureCoordinate). 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 (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). A translation of (0.5 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 and T of the texture coordinates about the center point. scale values shall be in the range (-pi, pi). 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,
Tc' = -C × S × R × C × T × Tc
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).
SoVRMLTextureTransform::SoVRMLTextureTransform | ( | void | ) |
Constructor.
|
protectedvirtual |
Destructor.
|
virtual |
Action method for SoCallbackAction.
Simply updates the state according to how the node behaves for the render action, so the application programmer can use the SoCallbackAction for extracting information about the scene graph.
Reimplemented from SoNode.
This function performs the typical operation of a node for any action.
Reimplemented from SoNode.
This static method returns the SoType object associated with objects of this class.
|
protectedvirtual |
Returns a pointer to the class-wide field data storage object for this instance. If no fields are present, returns NULL
.
Reimplemented from SoFieldContainer.
|
staticprotected |
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.
Returns the SoFieldData class which holds information about fields in this node.
|
virtual |
Action method for SoGetMatrixAction.
Updates action by accumulating with the transformation matrix of this node (if any).
Reimplemented from SoNode.
|
virtual |
Action method for the SoGLRenderAction.
This is called during rendering traversals. Nodes influencing the rendering state in any way or want to throw geometry primitives at OpenGL override this method.
Reimplemented from SoNode.
|
virtual |
Action method for SoPickAction.
Does common processing for SoPickAction action instances.
Reimplemented from SoNode.
SoSFFloat SoVRMLTextureTransform::rotation |
Rotation, in radians, around the centre points. Default value is 0.
SoSFVec2f SoVRMLTextureTransform::scale |
Scale vector about the centre point. Default value is (1, 1).
SoSFVec2f SoVRMLTextureTransform::translation |
Translation value. Default values is (0, 0, 0).