.TH "SoTextureUnit" 3 "Wed May 23 2012" "Version 3.1.3" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoTextureUnit \- .PP The \fBSoTextureUnit\fP class is a node for setting the active texture unit\&. .PP When an \fBSoTextureUnit\fP node is inserted into the scene graph, all subsequent texture nodes (\fBSoTexture2\fP, \fBSoTextureCoordinate2\fP, \fBSoTextureCoordinate3\fP, \fBSoTexture2Transform\fP, \fBSoTexture3Transform\fP, \fBSoTextureCoordinateEnvironment\fP, \fBSoTextureCoordinatePlane\fP and \fBSoComplexity\fP) will affect the texture unit set in the unit field\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBSoNode\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "enum \fBMappingMethod\fP { \fBBUMP_MAPPING\fP, \fBIMAGE_MAPPING\fP }" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "virtual \fBSoType\fP \fBgetTypeId\fP (void) const " .br .ti -1c .RI "\fBSoTextureUnit\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 \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 .ti -1c .RI "static void \fBinitClass\fP (void)" .br .ti -1c .RI "static uint32_t \fBgetMaxTextureUnit\fP (void)" .br .in -1c .SS "Public Attributes" .in +1c .ti -1c .RI "\fBSoSFInt32\fP \fBunit\fP" .br .ti -1c .RI "\fBSoSFEnum\fP \fBmappingMethod\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~SoTextureUnit\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 \fBSoTextureUnit\fP class is a node for setting the active texture unit\&. .PP When an \fBSoTextureUnit\fP node is inserted into the scene graph, all subsequent texture nodes (\fBSoTexture2\fP, \fBSoTextureCoordinate2\fP, \fBSoTextureCoordinate3\fP, \fBSoTexture2Transform\fP, \fBSoTexture3Transform\fP, \fBSoTextureCoordinateEnvironment\fP, \fBSoTextureCoordinatePlane\fP and \fBSoComplexity\fP) will affect the texture unit set in the unit field\&. See the SoGuiExample module for an usage example for this node\&. .PP \fBFILE FORMAT/DEFAULTS:\fP .PP .nf TextureUnit { unit 0 mappingMethod IMAGE_MAPPING } .fi .PP .PP \fBSince:\fP .RS 4 Coin 2\&.2 .RE .PP .SH "Member Enumeration Documentation" .PP .SS "enum \fBSoTextureUnit::MappingMethod\fP" .PP \fBEnumerator: \fP .in +1c .TP \fB\fIBUMP_MAPPING \fP\fP Bump mapping is used\&. .TP \fB\fIIMAGE_MAPPING \fP\fP Normal image mapping is used\&. .SH "Constructor & Destructor Documentation" .PP .SS "SoTextureUnit::SoTextureUnit (void)" Constructor\&. .SS "SoTextureUnit::~SoTextureUnit ()\fC [protected]\fP, \fC [virtual]\fP" Destructor\&. .SH "Member Function Documentation" .PP .SS "\fBSoType\fP SoTextureUnit::getClassTypeId (void)\fC [static]\fP" This static method returns the \fBSoType\fP object associated with objects of this class\&. .PP Reimplemented from \fBSoNode\fP\&. .SS "\fBSoType\fP SoTextureUnit::getTypeId (void) const\fC [virtual]\fP" 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\&. .PP 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 Inventor/nodes/SoSubNode\&.h (SO_NODE_INIT_CLASS and SO_NODE_CONSTRUCTOR for node classes), \fBInventor/engines/SoSubEngine\&.h\fP (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 ** SoTextureUnit::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 * SoTextureUnit::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 SoTextureUnit::initClass (void)\fC [static]\fP" Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system\&. .PP Reimplemented from \fBSoNode\fP\&. .SS "void SoTextureUnit::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 SoTextureUnit::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 SoTextureUnit::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 SoTextureUnit::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\&. .SS "uint32_t SoTextureUnit::getMaxTextureUnit (void)\fC [static]\fP" Returns the maximum number of texture units for the current GL context\&. Do not call this method if you don't have a current active GL context\&. You should also know that your OpenGL driver supports multi-texturing\&. .PP This function is provided only to be compatible with TGS Inventor\&. It's better to use cc_glglue_max_texture_units() if you're using Coin (declared in Inventor/C/glue/gl\&.h)\&. .SH "Member Data Documentation" .PP .SS "\fBSoSFInt32\fP SoTextureUnit::unit" The texture unit which will be used for texture nodes following this node in the traversal\&. Default value of the field is 0\&. .SS "\fBSoSFEnum\fP SoTextureUnit::mappingMethod" The mapping method for this unit\&. Default is IMAGE_MAPPING\&. .PP This field is not currently supported in Coin\&. It's included to support TGS' API\&. We might support the field in the future\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.