Interface MultiTexture
- All Superinterfaces:
X3DAppearanceChildNode
,X3DNode
,X3DTextureNode
- All Known Implementing Classes:
MultiTexture
MultiTexture applies several individual textures to a single geometry node, enabling a variety of visual effects that include light mapping and environment mapping.
Warning: this is an abstract interface that cannot be instantiated as a concrete object. Java programmers typically only need to use concrete objects provided by the
Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
Warning: this is an abstract interface that cannot be instantiated as a concrete object. Java programmers typically only need to use concrete objects provided by the
org.web3d.x3d.jsail
classes.
MultiTexture node tooltip: [X3DTextureNode] MultiTexture applies several individual textures to a single geometry node, enabling a variety of visual effects that include light mapping and environment mapping. MultiTexture can contain zero or more ImageTexture, MovieTexture, PixelTexture, ComposedCubeMapTexture, GeneratedCubeMapTexture, ImageCubeMapTexture, ComposedTexture3D, ImageTexture3D, and PixelTexture3D nodes. Texture maps have a 2D coordinate system (s, t) horizontal and vertical, with (s, t) texture-coordinate values in range [0.0, 1.0] for opposite corners of the image.
- Hint: insert Shape and Appearance nodes before adding texture.
- Hint: Texture mapping https://en.wikipedia.org/wiki/Texture_mapping
- Warning: the number of textures to be blended may have a significant impact on performance, depending on available graphics hardware capabilities.
- Hint: multitexturing is accomplished using MultiTexture, MultiTextureCoordinate and MultiTextureTransform nodes.
- Hint: Texture coordinates are reapplied (or else recomputed if textureTransform field initially NULL) whenever the corresponding vertex-based geometry changes.
- Hint: X3D Texturing component Figure 18.2 Lightmap example, https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/texturing.html#f-Lightmapexample
- Hint: X3D Texturing component Table 18.2: Comparison of single texture and multitexture attributes, https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/texturing.html#t-SingleAndMultitextureAttrs
- Hint: MultiTexture does not need to be included in LoadSensor watchList since any child ImageTexture and MovieTexture nodes of interest can be handled separately.
- Warning: MultiTexture may not contain another MultiTexture node.
Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addTexture
(X3DNode[] newValue) Add array of child texture nodes to array of existing nodes (if any).float
getAlpha()
Provide float value within allowed range of [0,1] from inputOutput SFFloat field named alpha.float[]
getColor()
Provide array of 3-tuple float results using RGB values [0..1] using RGB values [0..1] from inputOutput SFColor field named color.Provide String value from inputOutput SFString field named description.String[]
Provide array of String enumeration results (baseType MFString) ['"COMPLEMENT"' | '"ALPHAREPLICATE"' | '""' | '"etc."'] from inputOutput MFString field named function.Provide org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.String[]
getMode()
Provide array of String enumeration results (baseType MFString) ['"ADD"' | '"ADDSIGNED"' | '"ADDSIGNED2X"' | '"ADDSMOOTH"' | '"BLENDCURRENTALPHA"' | '"BLENDDIFFUSEALPHA"' | '"BLENDFACTORALPHA"' | '"BLENDTEXTUREALPHA"' | '"DOTPRODUCT3"' | '"MODULATE"' | '"MODULATE2X"' | '"MODULATE4X"' | '"MODULATEALPHA_ADDCOLOR"' | '"MODULATEINVALPHA_ADDCOLOR"' | '"MODULATEINVCOLOR_ADDALPHA"' | '"OFF"' | '"REPLACE"' | '"SELECTARG1"' | '"SELECTARG2"' | '"SUBTRACT"' | '"etc."'] from inputOutput MFString field named mode.String[]
Provide array of String enumeration results (baseType MFString) ['"DIFFUSE"' | '"FACTOR"' | '"SPECULAR"' | '""' | '"etc."'] from inputOutput MFString field named source.X3DNode[]
Provide array of org.web3d.x3d.sai.Core.X3DNode results (using an array consisting of properly typed nodes or ProtoInstances) from inputOutput MFNode field texture.setAlpha
(float newValue) Accessor method to assign float value to inputOutput SFFloat field named alpha.setColor
(float[] newValue) Accessor method to assign 3-tuple float array using RGB values [0..1] to inputOutput SFColor field named color.setDescription
(String newValue) Accessor method to assign String value to inputOutput SFString field named description.setFunction
(String[] newValue) Accessor method to assign String enumeration array (""COMPLEMENT"" | ""ALPHAREPLICATE"" | """") to inputOutput MFString field named function.setMetadata
(X3DMetadataObject newValue) Accessor method to assign org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.Accessor method to assign String enumeration array (""ADD"" | ""ADDSIGNED"" | ""ADDSIGNED2X"" | ""ADDSMOOTH"" | ""BLENDCURRENTALPHA"" | ""BLENDDIFFUSEALPHA"" | ""BLENDFACTORALPHA"" | ""BLENDTEXTUREALPHA"" | ""DOTPRODUCT3"" | ""MODULATE"" | ""MODULATE2X"" | ""MODULATE4X"" | ""MODULATEALPHA_ADDCOLOR"" | ""MODULATEINVALPHA_ADDCOLOR"" | ""MODULATEINVCOLOR_ADDALPHA"" | ""OFF"" | ""REPLACE"" | ""SELECTARG1"" | ""SELECTARG2"" | ""SUBTRACT"") to inputOutput MFString field named mode.Accessor method to assign String enumeration array (""DIFFUSE"" | ""FACTOR"" | ""SPECULAR"" | """") to inputOutput MFString field named source.void
setTexture
(X3DNode newValue) Set single child texture node, replacing prior array of existing nodes (if any).setTexture
(X3DNode[] newValue) Accessor method to assign org.web3d.x3d.sai.Core.X3DNode array (using an array consisting of properly typed nodes or ProtoInstances) to inputOutput MFNode field texture.
-
Method Details
-
getAlpha
float getAlpha()Provide float value within allowed range of [0,1] from inputOutput SFFloat field named alpha.
Tooltip: [0,1] The alpha field defines the alpha (1-transparency) base value for mode operations. *- Returns:
- value of alpha field
-
setAlpha
Accessor method to assign float value to inputOutput SFFloat field named alpha.
Tooltip: [0,1] The alpha field defines the alpha (1-transparency) base value for mode operations. *- Parameters:
newValue
- is new value for the alpha field.- Returns:
MultiTexture
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getColor
float[] getColor()Provide array of 3-tuple float results using RGB values [0..1] using RGB values [0..1] from inputOutput SFColor field named color.
Tooltip: [0,1] The color field defines the RGB base values for mode operations.- Hint: X3D Scene Authoring Hints, Color https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#Color
- Returns:
- value of color field
-
setColor
Accessor method to assign 3-tuple float array using RGB values [0..1] to inputOutput SFColor field named color.
Tooltip: [0,1] The color field defines the RGB base values for mode operations.- Hint: X3D Scene Authoring Hints, Color https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#Color
- Parameters:
newValue
- is new value for the color field.- Returns:
MultiTexture
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getDescription
String getDescription()Provide String value from inputOutput SFString field named description.
Tooltip: Author-provided prose that describes intended purpose of the url asset.- Hint: many XML tools substitute XML character references for special characters automatically if needed within an attribute value (such as & for & ampersand character, or " for " quotation-mark character).
- Specified by:
getDescription
in interfaceX3DTextureNode
- Returns:
- value of description field
-
setDescription
Accessor method to assign String value to inputOutput SFString field named description.
Tooltip: Author-provided prose that describes intended purpose of the url asset.- Hint: many XML tools substitute XML character references for special characters automatically if needed within an attribute value (such as & for & ampersand character, or " for " quotation-mark character).
- Specified by:
setDescription
in interfaceX3DTextureNode
- Parameters:
newValue
- is new value for the description field.- Returns:
MultiTexture
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getFunction
String[] getFunction()Provide array of String enumeration results (baseType MFString) ['"COMPLEMENT"' | '"ALPHAREPLICATE"' | '""' | '"etc."'] from inputOutput MFString field named function.
Tooltip: function operators COMPLEMENT or ALPHAREPLICATE can be applied after the mode blending operation. Empty string value "" indicates that no function operation is applied for that stage.- Hint: include the same number of function values as textures, otherwise the default of no function operation is applied for each remaining stage.
- Hint: X3D Architecture Table 18.5 Values for the function field https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/texturing.html#t-ValuesForFunctionField for further details.
- Returns:
- value of function field
-
setFunction
Accessor method to assign String enumeration array (""COMPLEMENT"" | ""ALPHAREPLICATE"" | """") to inputOutput MFString field named function.
Tooltip: function operators COMPLEMENT or ALPHAREPLICATE can be applied after the mode blending operation. Empty string value "" indicates that no function operation is applied for that stage.- Hint: include the same number of function values as textures, otherwise the default of no function operation is applied for each remaining stage.
- Hint: X3D Architecture Table 18.5 Values for the function field https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/texturing.html#t-ValuesForFunctionField for further details.
- Parameters:
newValue
- is new value for the function field.- Returns:
MultiTexture
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getMetadata
X3DMetadataObject getMetadata()Provide org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.
Tooltip: [X3DMetadataObject] Information about this node can be contained in a MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataString or MetadataSet node.- Hint: X3D Architecture 7.2.4 Metadata https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/core.html#Metadata
- Specified by:
getMetadata
in interfaceX3DAppearanceChildNode
- Specified by:
getMetadata
in interfaceX3DNode
- Specified by:
getMetadata
in interfaceX3DTextureNode
- Returns:
- value of metadata field
- See Also:
-
setMetadata
Accessor method to assign org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.
Tooltip: [X3DMetadataObject] Information about this node can be contained in a MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataString or MetadataSet node.- Hint: X3D Architecture 7.2.4 Metadata https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/core.html#Metadata
- Specified by:
setMetadata
in interfaceX3DAppearanceChildNode
- Specified by:
setMetadata
in interfaceX3DNode
- Specified by:
setMetadata
in interfaceX3DTextureNode
- Parameters:
newValue
- is new value for the metadata field.- Returns:
MultiTexture
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
getMode
String[] getMode()Provide array of String enumeration results (baseType MFString) ['"ADD"' | '"ADDSIGNED"' | '"ADDSIGNED2X"' | '"ADDSMOOTH"' | '"BLENDCURRENTALPHA"' | '"BLENDDIFFUSEALPHA"' | '"BLENDFACTORALPHA"' | '"BLENDTEXTUREALPHA"' | '"DOTPRODUCT3"' | '"MODULATE"' | '"MODULATE2X"' | '"MODULATE4X"' | '"MODULATEALPHA_ADDCOLOR"' | '"MODULATEINVALPHA_ADDCOLOR"' | '"MODULATEINVCOLOR_ADDALPHA"' | '"OFF"' | '"REPLACE"' | '"SELECTARG1"' | '"SELECTARG2"' | '"SUBTRACT"' | '"etc."'] from inputOutput MFString field named mode.
Tooltip: mode field indicates the type of blending operation, both for color and for alpha channel.- Hint: include the same number of mode values as textures, otherwise the default value MODULATE is added for each remaining stage.
- Warning: do not wrap extra quotation marks around these SFString enumeration values, since "quotation" "marks" are only used for MFString values.
- Hint: X3D Architecture Table 18.3 Multitexture modes https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/texturing.html#t-MultitextureModes for further details.
- Returns:
- value of mode field
-
setMode
Accessor method to assign String enumeration array (""ADD"" | ""ADDSIGNED"" | ""ADDSIGNED2X"" | ""ADDSMOOTH"" | ""BLENDCURRENTALPHA"" | ""BLENDDIFFUSEALPHA"" | ""BLENDFACTORALPHA"" | ""BLENDTEXTUREALPHA"" | ""DOTPRODUCT3"" | ""MODULATE"" | ""MODULATE2X"" | ""MODULATE4X"" | ""MODULATEALPHA_ADDCOLOR"" | ""MODULATEINVALPHA_ADDCOLOR"" | ""MODULATEINVCOLOR_ADDALPHA"" | ""OFF"" | ""REPLACE"" | ""SELECTARG1"" | ""SELECTARG2"" | ""SUBTRACT"") to inputOutput MFString field named mode.
Tooltip: mode field indicates the type of blending operation, both for color and for alpha channel.- Hint: include the same number of mode values as textures, otherwise the default value MODULATE is added for each remaining stage.
- Warning: do not wrap extra quotation marks around these SFString enumeration values, since "quotation" "marks" are only used for MFString values.
- Hint: X3D Architecture Table 18.3 Multitexture modes https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/texturing.html#t-MultitextureModes for further details.
- Parameters:
newValue
- is new value for the mode field.- Returns:
MultiTexture
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getSource
String[] getSource()Provide array of String enumeration results (baseType MFString) ['"DIFFUSE"' | '"FACTOR"' | '"SPECULAR"' | '""' | '"etc."'] from inputOutput MFString field named source.
Tooltip: source field determines whether each image source is treated as DIFFUSE, SPECULAR or a multiplicative FACTOR. Empty string value "" indicates that no source modifier is applied for that stage.- Hint: include the same number of source values as textures, otherwise the default of no source interpretation is applied for each remaining stage.
- Hint: X3D Architecture Table 18.4 Values for the source field https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/texturing.html#t-ValuesForSourceField for further details.
- Returns:
- value of source field
-
setSource
Accessor method to assign String enumeration array (""DIFFUSE"" | ""FACTOR"" | ""SPECULAR"" | """") to inputOutput MFString field named source.
Tooltip: source field determines whether each image source is treated as DIFFUSE, SPECULAR or a multiplicative FACTOR. Empty string value "" indicates that no source modifier is applied for that stage.- Hint: include the same number of source values as textures, otherwise the default of no source interpretation is applied for each remaining stage.
- Hint: X3D Architecture Table 18.4 Values for the source field https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/texturing.html#t-ValuesForSourceField for further details.
- Parameters:
newValue
- is new value for the source field.- Returns:
MultiTexture
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getTexture
X3DNode[] getTexture()Provide array of org.web3d.x3d.sai.Core.X3DNode results (using an array consisting of properly typed nodes or ProtoInstances) from inputOutput MFNode field texture.
Tooltip: [X3DSingleTextureNode] Contained texture nodes (ImageTexture, MovieTexture, PixelTexture) that map image(s) to surface geometry, defining each of the different texture channels.- Warning: MultiTexture may not contain another MultiTexture node.
- Hint: if texture node is NULL or unspecified, corresponding Shape geometry for this Appearance is not textured.
- Hint: X3D Scene Authoring Hints, Images https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#Images
- Hint: X3D Architecture 18 Texturing component https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/texturing.html
- Hint: X3D Architecture 33 Texturing3D component https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/texture3D.html
Warning: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DSingleTextureNode.- Returns:
- value of texture field
- See Also:
-
setTexture
Accessor method to assign org.web3d.x3d.sai.Core.X3DNode array (using an array consisting of properly typed nodes or ProtoInstances) to inputOutput MFNode field texture.
Tooltip: [X3DSingleTextureNode] Contained texture nodes (ImageTexture, MovieTexture, PixelTexture) that map image(s) to surface geometry, defining each of the different texture channels.- Warning: MultiTexture may not contain another MultiTexture node.
- Hint: if texture node is NULL or unspecified, corresponding Shape geometry for this Appearance is not textured.
- Hint: X3D Scene Authoring Hints, Images https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#Images
- Hint: X3D Architecture 18 Texturing component https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/texturing.html
- Hint: X3D Architecture 33 Texturing3D component https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/texture3D.html
Note: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DSingleTextureNode.- Parameters:
newValue
- is new value for the texture field.- Returns:
MultiTexture
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
addTexture
Add array of child texture nodes to array of existing nodes (if any).
Note: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DSingleTextureNode.- Parameters:
newValue
- is new value array to be appended the texture field.
-
setTexture
Set single child texture node, replacing prior array of existing nodes (if any).- Parameters:
newValue
- is new node for the texture field
-