.TH "SoVRMLTextureTransform" 3 "Sat Oct 12 2013" "Version 4.0.0a" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoVRMLTextureTransform \- .PP The \fBSoVRMLTextureTransform\fP class defines a transformation applied to texture coordinates\&. .PP \fBThe 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:\fP .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBSoNode\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "virtual \fBSoType\fP \fBgetTypeId\fP (void) const " .br .RI "\fIReturns the type identification of an object derived from a class inheriting \fBSoBase\fP\&. This is used for run-time type checking and 'downward' casting\&. \fP" .ti -1c .RI "\fBSoVRMLTextureTransform\fP (void)" .br .ti -1c .RI "virtual void \fBdoAction\fP (\fBSoAction\fP *action)" .br .ti -1c .RI "virtual void \fBcallback\fP (\fBSoCallbackAction\fP *action)" .br .ti -1c .RI "virtual void \fBGLRender\fP (\fBSoGLRenderAction\fP *action)" .br .ti -1c .RI "virtual void \fBgetMatrix\fP (\fBSoGetMatrixAction\fP *action)" .br .ti -1c .RI "virtual void \fBpick\fP (\fBSoPickAction\fP *action)" .br .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .RI "\fIThis static method returns the \fBSoType\fP object associated with objects of this class\&. \fP" .ti -1c .RI "static void \fBinitClass\fP (void)" .br .RI "\fISets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system\&. \fP" .in -1c .SS "Public Attributes" .in +1c .ti -1c .RI "\fBSoSFVec2f\fP \fBtranslation\fP" .br .ti -1c .RI "\fBSoSFFloat\fP \fBrotation\fP" .br .ti -1c .RI "\fBSoSFVec2f\fP \fBscale\fP" .br .ti -1c .RI "\fBSoSFVec2f\fP \fBcenter\fP" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "virtual const \fBSoFieldData\fP * \fBgetFieldData\fP (void) const " .br .ti -1c .RI "virtual \fB~SoVRMLTextureTransform\fP ()" .br .in -1c .SS "Static Protected Member Functions" .in +1c .ti -1c .RI "static const \fBSoFieldData\fP ** \fBgetFieldDataPtr\fP (void)" .br .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP The \fBSoVRMLTextureTransform\fP class defines a transformation applied to texture coordinates\&. .PP \fBThe 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:\fP .PP .nf 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) } .fi .PP .PP The TextureTransform node defines a 2D transformation that is applied to texture coordinates (see \fBSoVRMLTextureCoordinate\fP)\&. This node affects the way textures coordinates are applied to the geometric surface\&. The transformation consists of (in order): .PP .IP "\(bu" 2 a translation; .IP "\(bu" 2 a rotation about the centre point; .IP "\(bu" 2 a non-uniform scale about the centre point\&. .PP .PP 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\&. .PP The \fIcenter\fP field specifies a translation offset in texture coordinate space about which the rotation and scale fields are applied\&. The \fIscale\fP 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 \fIrotation\fP 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 \fItranslation\fP field specifies a translation of the texture coordinates\&. .PP 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, .PP .PP .nf Tc' = -C × S × R × C × T × Tc .fi .PP .PP 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)\&. .SH "Constructor & Destructor Documentation" .PP .SS "SoVRMLTextureTransform::SoVRMLTextureTransform (void)" Constructor\&. .SS "SoVRMLTextureTransform::~SoVRMLTextureTransform ()\fC [protected]\fP, \fC [virtual]\fP" Destructor\&. .SH "Member Function Documentation" .PP .SS "\fBSoType\fP SoVRMLTextureTransform::getTypeId (void) const\fC [virtual]\fP" .PP Returns the type identification of an object derived from a class inheriting \fBSoBase\fP\&. This is used for run-time type checking and 'downward' casting\&. Usage example: .PP .PP .nf void foo(SoNode * node) { if (node->getTypeId() == SoFile::getClassTypeId()) { SoFile * filenode = (SoFile *)node; // safe downward cast, knows the type } } .fi .PP .PP For application programmers wanting to extend the library with new nodes, engines, nodekits, draggers or others: this method needs to be overridden in \fIall\fP subclasses\&. This is typically done as part of setting up the full type system for extension classes, which is usually accomplished by using the pre-defined macros available through for instance \fBInventor/nodes/SoSubNode\&.h\fP (SO_NODE_INIT_CLASS and SO_NODE_CONSTRUCTOR for node classes), Inventor/engines/SoSubEngine\&.h (for engine classes) and so on\&. .PP For more information on writing Coin extensions, see the class documentation of the toplevel superclasses for the various class groups\&. .PP Implements \fBSoBase\fP\&. .SS "const \fBSoFieldData\fP ** SoVRMLTextureTransform::getFieldDataPtr (void)\fC [static]\fP, \fC [protected]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .PP Reimplemented from \fBSoNode\fP\&. .SS "const \fBSoFieldData\fP * SoVRMLTextureTransform::getFieldData (void) const\fC [protected]\fP, \fC [virtual]\fP" Returns a pointer to the class-wide field data storage object for this instance\&. If no fields are present, returns \fCNULL\fP\&. .PP Reimplemented from \fBSoFieldContainer\fP\&. .SS "void SoVRMLTextureTransform::doAction (\fBSoAction\fP *action)\fC [virtual]\fP" This function performs the typical operation of a node for any action\&. .PP Reimplemented from \fBSoNode\fP\&. .SS "void SoVRMLTextureTransform::callback (\fBSoCallbackAction\fP *action)\fC [virtual]\fP" Action method for \fBSoCallbackAction\fP\&. .PP Simply updates the state according to how the node behaves for the render action, so the application programmer can use the \fBSoCallbackAction\fP for extracting information about the scene graph\&. .PP Reimplemented from \fBSoNode\fP\&. .SS "void SoVRMLTextureTransform::GLRender (\fBSoGLRenderAction\fP *action)\fC [virtual]\fP" Action method for the \fBSoGLRenderAction\fP\&. .PP This is called during rendering traversals\&. Nodes influencing the rendering state in any way or who wants to throw geometry primitives at OpenGL overrides this method\&. .PP Reimplemented from \fBSoNode\fP\&. .SS "void SoVRMLTextureTransform::getMatrix (\fBSoGetMatrixAction\fP *action)\fC [virtual]\fP" Action method for \fBSoGetMatrixAction\fP\&. .PP Updates \fIaction\fP by accumulating with the transformation matrix of this node (if any)\&. .PP Reimplemented from \fBSoNode\fP\&. .SS "void SoVRMLTextureTransform::pick (\fBSoPickAction\fP *action)\fC [virtual]\fP" Action method for \fBSoPickAction\fP\&. .PP Does common processing for \fBSoPickAction\fP \fIaction\fP instances\&. .PP Reimplemented from \fBSoNode\fP\&. .SH "Member Data Documentation" .PP .SS "\fBSoSFVec2f\fP SoVRMLTextureTransform::translation" Translation value\&. Default values is (0, 0, 0)\&. .SS "\fBSoSFFloat\fP SoVRMLTextureTransform::rotation" Rotation, in radians, around the centre points\&. Default value is 0\&. .SS "\fBSoSFVec2f\fP SoVRMLTextureTransform::scale" Scale vector about the centre point\&. Default value is (1, 1)\&. .SS "\fBSoSFVec2f\fP SoVRMLTextureTransform::center" Texture centre\&. Default value is (0\&.0, 0\&.0)\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.