'\"! tbl | mmdoc '\"macro stdmacro .ie n \{\ . ds Cr \fB . ds Cb \fB .\} .el \{\ . ds Cr \f7 . ds Cb \f8 .\} .TH SoTexture2(3IV) .SH NAME SoTexture2 \(em texture mapping node .SH INHERITS FROM SoBase > SoFieldContainer > SoNode > SoTexture2 .SH SYNOPSIS .ps -1 \*(Cr#include .sp .in 0.5i \*(Crenum \*(CbModel\*(Cr { .in 1i .ta 22m .in 1.5i+22n .ti 1i .ta 22m .ds Pt \*(CbSoTexture2::MODULATE\f1 .ie \w'\*(Pt'>=22n \{\ .ne 3 \*(Pt .ti 1i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} The texture color is multiplied by the surface color .br .in 1.5i+22n .ti 1i .ta 22m .ds Pt \*(CbSoTexture2::DECAL\f1 .ie \w'\*(Pt'>=22n \{\ .ne 3 \*(Pt .ti 1i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} The texture color replaces the surface color .br .in 1.5i+22n .ti 1i .ta 22m .ds Pt \*(CbSoTexture2::BLEND\f1 .ie \w'\*(Pt'>=22n \{\ .ne 3 \*(Pt .ti 1i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} Blends between the surface color and a specified blend color .br .in 0.5i \*(Cr} .sp .in 0.5i \*(Crenum \*(CbWrap\*(Cr { .in 1i .ta 20m .in 1.5i+20n .ti 1i .ta 20m .ds Pt \*(CbSoTexture2::REPEAT\f1 .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 1i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} Repeats texture outside 0-1 texture coordinate range .br .in 1.5i+20n .ti 1i .ta 20m .ds Pt \*(CbSoTexture2::CLAMP\f1 .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 1i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} Clamps texture coordinates to lie within 0-1 range .br .in 0.5i \*(Cr} .sp .in 1i \f1Fields from class SoTexture2: .in 0.5i .sp .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFString .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbfilename .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFImage .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbimage .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFEnum .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbwrapS .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFEnum .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbwrapT .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFEnum .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbmodel .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFColor .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbblendColor .sp .in 1i \f1Methods from class SoTexture2: .in 0.5i .sp .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Cr .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbSoTexture2\*(Cr() .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crstatic SoType .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetClassTypeId\*(Cr() .sp .in 1i \f1Methods from class SoNode: .in 0.5i .sp .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetOverride\*(Cr(SbBool state) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbisOverride\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoNode * .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbcopy\*(Cr(SbBool copyConnections = FALSE) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual SbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbaffectsState\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crstatic SoNode * .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetByName\*(Cr(const SbName &name) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crstatic int .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetByName\*(Cr(const SbName &name, SoNodeList &list) .sp .in 1i \f1Methods from class SoFieldContainer: .in 0.5i .sp .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetToDefaults\*(Cr() .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbhasDefaultValues\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbfieldsAreEqual\*(Cr(const SoFieldContainer *fc) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbcopyFieldValues\*(Cr(const SoFieldContainer *fc, SbBool copyConnections = FALSE) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbset\*(Cr(const char *fieldDataString) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbget\*(Cr(SbString &fieldDataString) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual int .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetFields\*(Cr(SoFieldList &resultList) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual SoField * .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetField\*(Cr(const SbName &fieldName) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetFieldName\*(Cr(const SoField *field, SbName &fieldName) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbisNotifyEnabled\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbenableNotify\*(Cr(SbBool flag) .sp .in 1i \f1Methods from class SoBase: .in 0.5i .sp .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbref\*(Cr() .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbunref\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbunrefNoDelete\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbtouch\*(Cr() .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual SoType .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetTypeId\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbisOfType\*(Cr(SoType type) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual void .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetName\*(Cr(const SbName &name) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual SbName .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetName\*(Cr() const .sp .SH DESCRIPTION This property node defines a texture map and parameters for that map. This map is used to apply texture to subsequent shapes as they are rendered. .sp The texture can be read from the file specified by the \*(Cbfilename\f1 \&field. Once the texture has been read, the \*(Cbimage\f1 field contains the texture data. However, this field is marked so the image is not written out when the texture node is written to a file. To turn off texturing, \&set the \*(Cbfilename\f1 field to an empty string (""). .sp Textures can also be specified in memory by setting the \*(Cbimage\f1 field to contain the texture data. Doing so resets the \*(Cbfilename\f1 to the empty string. .sp If the texture image's width \&or height is not a power of 2, or the image's width or height is greater than the maximum supported by OpenGL, then the image will be automatically scaled up or down to the next power of 2 or the maximum \&texture size. For maximum speed, point-sampling is used to do the scale; if you want more accurate resampling, pre-filter images to a power of 2 smaller than the maximum texture size (use the OpenGL glGetIntegerv(GL_MAX_TEXTURE_SIZE...) \&call to determine maximum texture for a specific OpenGL implementation). .sp The quality of the texturing is affected by the \*(CbtextureQuality\f1 field of the \*(CbSoComplexity\f1 node. The \*(CbtextureQuality\f1 field affects what kind of filtering is done to the texture \&when it must be minified or magnified. The mapping of a particular texture quality value to a particular OpenGL filtering technique is implementation dependent, and varies based on the texturing performance. \&If mipmap filtering is required, mipmaps are automatically created using the simple box filter. .SH FIELDS .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFString .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbfilename .br .in 1i \f1Names file from which to read texture image. Currently only SGI .rgb files are supported. If the filename is not an absolute path name, the list of directories maintained by \*(CbSoInput\f1 is searched. If the texture \&is not found in any of those directories, then the file is searched for relative to the directory from which the \*(CbSoTexture2\f1 node was read. For example, if an \*(CbSoTexture2\f1 node with a filename of \*(Cr"../tofu.rgb"\f1 is read from \*(Cr/usr/people/bob/models/food.iv\f1, then \*(Cr/usr/people/bob/tofu.rgb\f1 will be \&read (assuming \*(Crtofu.rgb\f1 isn't found in the directories maintained by \*(CbSoInput\f1). .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFImage .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbimage .br .in 1i \f1Contains an in-memory representation of the texture map. It is either the contents of the file read from \*(Cbfilename\f1, an image read directly from an Inventor file, or an image set programmatically using the methods \&provided by \*(CbSoSFImage\f1. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFEnum .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbwrapS .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFEnum .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbwrapT .br .in 1i \f1Indicates what to do when texture coordinates in the S (horizontal) or T (vertical) direction lie outside the range 0-1. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFEnum .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbmodel .br .in 1i \f1Specifies how to map texture onto surface. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFColor .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbblendColor .br .in 1i \f1Color used for \*(CrBLEND\f1 model. .sp .in 0.5i .SH METHODS .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Cr .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbSoTexture2\*(Cr() .br .in 1i \f1Creates a texture node with default settings. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crstatic SoType .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetClassTypeId\*(Cr() .br .in 1i \f1Returns type identifier for this class. .sp .in 0.5i .SH ACTION BEHAVIOR \*(CbSoGLRenderAction, SoCallbackAction .br .in 1i \f1Sets current texture in state. .sp .in 0.5i .SH FILE FORMAT/DEFAULTS .nf \*(CrTexture2 { .in 1i .ta 12m filename "" image 0 0 0 wrapS REPEAT wrapT REPEAT model MODULATE blendColor 0 0 0 .in 0.5i } .SH SEE ALSO \*(CbSoComplexity, SoMaterial, SoTexture2Transform, SoTextureCoordinate2, SoTextureCoordinateBinding, SoTextureCoordinateFunction