Package org.web3d.x3d.sai.Shape
Interface Appearance
- All Superinterfaces:
X3DAppearanceNode
,X3DNode
- All Known Implementing Classes:
Appearance
Appearance specifies the visual properties of geometry by containing the Material, ImageTexture/MovieTexture/PixelTexture, FillProperties, LineProperties, programmable shader nodes (ComposedShader, PackagedShader, ProgramShader) and TextureTransform nodes.
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.
Appearance node tooltip: [X3DAppearanceNode] Appearance specifies the visual properties of geometry by containing the Material, ImageTexture/MovieTexture/PixelTexture, FillProperties, LineProperties, programmable shader nodes (ComposedShader, PackagedShader, ProgramShader) and TextureTransform nodes.
- Hint: insert a Shape node before adding geometry or Appearance. Interchange profile
- Hint: only Material and ImageTexture children are allowed.
- Hint: DEF/USE copies of a single node can provide a similar "look + feel" style for related shapes in a scene.
- Hint: Advanced uses can contain MultiTexture, MultiTextureTransform/TextureTransformMatrix3D/TextureTransform3D, ComposedShader/PackagedShader/ProgramShader, ComposedTexture3D/ImageTexture3D/PixelTexture3D, or ComposedCubeMapTexture/GeneratedCubeMapTexture/ImageCubeMapTexture.
- Hint: X3D Architecture 12.2.2 Appearance node https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/shape.html#Appearancenode
- Hint: X3D Architecture 17.2.2 Lighting model https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/lighting.html#Lightingmodel
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
addShaders
(X3DNode[] newValue) Add array of child shaders nodes to array of existing nodes (if any).Provide org.web3d.x3d.sai.Shape.AcousticProperties instance (using a properly typed node) from inputOutput SFNode field acousticProperties.float
Provide float value within allowed range of [0,1] from inputOutput SFFloat field named alphaCutoff.Provide String enumeration value (baseType SFString) ["AUTO" | "OPAQUE" | "MASK" | "BLEND"] from inputOutput SFString field named alphaMode.Provide org.web3d.x3d.sai.Shape.X3DMaterialNode instance (using a properly typed node) from inputOutput SFNode field backMaterial.Provide org.web3d.x3d.sai.Shape.FillProperties instance (using a properly typed node) from inputOutput SFNode field fillProperties.Provide org.web3d.x3d.sai.Shape.LineProperties instance (using a properly typed node) from inputOutput SFNode field lineProperties.Provide org.web3d.x3d.sai.Shape.X3DMaterialNode instance (using a properly typed node) from inputOutput SFNode field material.Provide org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.Provide org.web3d.x3d.sai.Shape.PointProperties instance (using a properly typed node) from inputOutput SFNode field pointProperties.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 shaders.Provide org.web3d.x3d.sai.Texturing.X3DTextureNode instance (using a properly typed node) from inputOutput SFNode field texture.Provide org.web3d.x3d.sai.Texturing.X3DTextureTransformNode instance (using a properly typed node) from inputOutput SFNode field textureTransform.setAcousticProperties
(AcousticProperties newValue) Accessor method to assign org.web3d.x3d.sai.Shape.AcousticProperties instance (using a properly typed node) to inputOutput SFNode field acousticProperties.setAlphaCutoff
(float newValue) Accessor method to assign float value to inputOutput SFFloat field named alphaCutoff.setAlphaMode
(String newValue) Accessor method to assign String enumeration value ("AUTO" | "OPAQUE" | "MASK" | "BLEND") to inputOutput SFString field named alphaMode.setBackMaterial
(X3DMaterialNode newValue) Accessor method to assign org.web3d.x3d.sai.Shape.X3DMaterialNode instance (using a properly typed node) to inputOutput SFNode field backMaterial.setFillProperties
(FillProperties newValue) Accessor method to assign org.web3d.x3d.sai.Shape.FillProperties instance (using a properly typed node) to inputOutput SFNode field fillProperties.setLineProperties
(LineProperties newValue) Accessor method to assign org.web3d.x3d.sai.Shape.LineProperties instance (using a properly typed node) to inputOutput SFNode field lineProperties.setMaterial
(X3DMaterialNode newValue) Accessor method to assign org.web3d.x3d.sai.Shape.X3DMaterialNode instance (using a properly typed node) to inputOutput SFNode field material.setMetadata
(X3DMetadataObject newValue) Accessor method to assign org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.setPointProperties
(PointProperties newValue) Accessor method to assign org.web3d.x3d.sai.Shape.PointProperties instance (using a properly typed node) to inputOutput SFNode field pointProperties.void
setShaders
(X3DNode newValue) Set single child shaders node, replacing prior array of existing nodes (if any).setShaders
(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 shaders.setTexture
(X3DTextureNode newValue) Accessor method to assign org.web3d.x3d.sai.Texturing.X3DTextureNode instance (using a properly typed node) to inputOutput SFNode field texture.setTextureTransform
(X3DTextureTransformNode newValue) Accessor method to assign org.web3d.x3d.sai.Texturing.X3DTextureTransformNode instance (using a properly typed node) to inputOutput SFNode field textureTransform.
-
Method Details
-
getAcousticProperties
AcousticProperties getAcousticProperties()Provide org.web3d.x3d.sai.Shape.AcousticProperties instance (using a properly typed node) from inputOutput SFNode field acousticProperties.
Tooltip: [AcousticProperties] Single contained acousticProperties node that can specify additional acoustic attributes applied to associated surface geometry. *- Returns:
- value of acousticProperties field
-
setAcousticProperties
Accessor method to assign org.web3d.x3d.sai.Shape.AcousticProperties instance (using a properly typed node) to inputOutput SFNode field acousticProperties.
Tooltip: [AcousticProperties] Single contained acousticProperties node that can specify additional acoustic attributes applied to associated surface geometry. *- Parameters:
newValue
- is new value for the acousticProperties field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getAlphaCutoff
float getAlphaCutoff()Provide float value within allowed range of [0,1] from inputOutput SFFloat field named alphaCutoff.
Tooltip: [0,1] Threshold value used for pixel rendering either transparent or opaque, used when alphaMode="MASK".- Hint: glTF version 2 Alpha Coverage, https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#alpha-coverage
- Returns:
- value of alphaCutoff field
-
setAlphaCutoff
Accessor method to assign float value to inputOutput SFFloat field named alphaCutoff.
Tooltip: [0,1] Threshold value used for pixel rendering either transparent or opaque, used when alphaMode="MASK".- Hint: glTF version 2 Alpha Coverage, https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#alpha-coverage
- Parameters:
newValue
- is new value for the alphaCutoff field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getAlphaMode
String getAlphaMode()Provide String enumeration value (baseType SFString) ["AUTO" | "OPAQUE" | "MASK" | "BLEND"] from inputOutput SFString field named alphaMode.
Tooltip: Provides options for control of alpha transparency handling for textures. AUTO means Material transparency is applied to texture transparency for full backwards compatility with X3D3, OPAQUE means ignore alpha transparency to render texture as opaque, MASK means alpha-testing of pixels as fully transparent when alpha value is less than alphaCutoff and fully opaque when alpha value is greater than or equal to alphaCutoff, BLEND combines partial transparency of textures and materials.- Hint: glTF version 2 Alpha Coverage, https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#alpha-coverage
- Returns:
- value of alphaMode field
-
setAlphaMode
Accessor method to assign String enumeration value ("AUTO" | "OPAQUE" | "MASK" | "BLEND") to inputOutput SFString field named alphaMode.
Tooltip: Provides options for control of alpha transparency handling for textures. AUTO means Material transparency is applied to texture transparency for full backwards compatility with X3D3, OPAQUE means ignore alpha transparency to render texture as opaque, MASK means alpha-testing of pixels as fully transparent when alpha value is less than alphaCutoff and fully opaque when alpha value is greater than or equal to alphaCutoff, BLEND combines partial transparency of textures and materials.- Hint: glTF version 2 Alpha Coverage, https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#alpha-coverage
- Parameters:
newValue
- is new value for the alphaMode field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getBackMaterial
X3DMaterialNode getBackMaterial()Provide org.web3d.x3d.sai.Shape.X3DMaterialNode instance (using a properly typed node) from inputOutput SFNode field backMaterial.- Returns:
- value of backMaterial field
-
setBackMaterial
Accessor method to assign org.web3d.x3d.sai.Shape.X3DMaterialNode instance (using a properly typed node) to inputOutput SFNode field backMaterial.- Parameters:
newValue
- is new value for the backMaterial field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getFillProperties
FillProperties getFillProperties()Provide org.web3d.x3d.sai.Shape.FillProperties instance (using a properly typed node) from inputOutput SFNode field fillProperties.
Tooltip: [FillProperties] Single contained FillProperties node that can specify additional visual attributes applied to polygonal areas of corresponding geometry, on top of whatever other appearance is already defined. *- Returns:
- value of fillProperties field
-
setFillProperties
Accessor method to assign org.web3d.x3d.sai.Shape.FillProperties instance (using a properly typed node) to inputOutput SFNode field fillProperties.
Tooltip: [FillProperties] Single contained FillProperties node that can specify additional visual attributes applied to polygonal areas of corresponding geometry, on top of whatever other appearance is already defined. *- Parameters:
newValue
- is new value for the fillProperties field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getLineProperties
LineProperties getLineProperties()Provide org.web3d.x3d.sai.Shape.LineProperties instance (using a properly typed node) from inputOutput SFNode field lineProperties.
Tooltip: [LineProperties] Single contained LineProperties node that can specify additional visual attributes applied to corresponding line geometry. *- Returns:
- value of lineProperties field
-
setLineProperties
Accessor method to assign org.web3d.x3d.sai.Shape.LineProperties instance (using a properly typed node) to inputOutput SFNode field lineProperties.
Tooltip: [LineProperties] Single contained LineProperties node that can specify additional visual attributes applied to corresponding line geometry. *- Parameters:
newValue
- is new value for the lineProperties field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getMaterial
X3DMaterialNode getMaterial()Provide org.web3d.x3d.sai.Shape.X3DMaterialNode instance (using a properly typed node) from inputOutput SFNode field material.
Tooltip: [X3DMaterialNode] Single contained Material node that can specify visual attributes for lighting response (color types, transparency, etc.) applied to corresponding geometry.- Warning: if material is NULL or unspecified, lighting is off (all lights ignored) for this Shape and unlit object color is (1, 1, 1).
- Returns:
- value of material field
-
setMaterial
Accessor method to assign org.web3d.x3d.sai.Shape.X3DMaterialNode instance (using a properly typed node) to inputOutput SFNode field material.
Tooltip: [X3DMaterialNode] Single contained Material node that can specify visual attributes for lighting response (color types, transparency, etc.) applied to corresponding geometry.- Warning: if material is NULL or unspecified, lighting is off (all lights ignored) for this Shape and unlit object color is (1, 1, 1).
- Parameters:
newValue
- is new value for the material field.- Returns:
Appearance
- 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 interfaceX3DAppearanceNode
- Specified by:
getMetadata
in interfaceX3DNode
- 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 interfaceX3DAppearanceNode
- Specified by:
setMetadata
in interfaceX3DNode
- Parameters:
newValue
- is new value for the metadata field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
getPointProperties
PointProperties getPointProperties()Provide org.web3d.x3d.sai.Shape.PointProperties instance (using a properly typed node) from inputOutput SFNode field pointProperties.
Tooltip: [LineProperties] Single contained PointProperties node that can specify additional visual attributes applied to corresponding point geometry. *- Returns:
- value of pointProperties field
-
setPointProperties
Accessor method to assign org.web3d.x3d.sai.Shape.PointProperties instance (using a properly typed node) to inputOutput SFNode field pointProperties.
Tooltip: [LineProperties] Single contained PointProperties node that can specify additional visual attributes applied to corresponding point geometry. *- Parameters:
newValue
- is new value for the pointProperties field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getShaders
X3DNode[] getShaders()Provide array of org.web3d.x3d.sai.Core.X3DNode results (using an array consisting of properly typed nodes or ProtoInstances) from inputOutput MFNode field shaders.
Tooltip: [X3DShaderNode] Zero or more contained programmable shader nodes (ComposedShader, PackagedShader, ProgramShader) that specify, in order of preference, author-programmed rendering characteristics.- Hint: X3D Architecture 31 Programmable shaders component https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/shaders.html
Warning: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DShaderNode.- Returns:
- value of shaders field
- See Also:
-
setShaders
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 shaders.
Tooltip: [X3DShaderNode] Zero or more contained programmable shader nodes (ComposedShader, PackagedShader, ProgramShader) that specify, in order of preference, author-programmed rendering characteristics.- Hint: X3D Architecture 31 Programmable shaders component https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/shaders.html
Note: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DShaderNode.- Parameters:
newValue
- is new value for the shaders field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
addShaders
Add array of child shaders nodes to array of existing nodes (if any).
Note: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DShaderNode.- Parameters:
newValue
- is new value array to be appended the shaders field.
-
setShaders
Set single child shaders node, replacing prior array of existing nodes (if any).- Parameters:
newValue
- is new node for the shaders field
-
getTexture
X3DTextureNode getTexture()Provide org.web3d.x3d.sai.Texturing.X3DTextureNode instance (using a properly typed node) from inputOutput SFNode field texture.
Tooltip: [X3DTextureNode] Single contained texture node (ImageTexture, MovieTexture, PixelTexture, MultiTexture) that maps image(s) to surface geometry.- 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
- Returns:
- value of texture field
-
setTexture
Accessor method to assign org.web3d.x3d.sai.Texturing.X3DTextureNode instance (using a properly typed node) to inputOutput SFNode field texture.
Tooltip: [X3DTextureNode] Single contained texture node (ImageTexture, MovieTexture, PixelTexture, MultiTexture) that maps image(s) to surface geometry.- 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
- Parameters:
newValue
- is new value for the texture field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getTextureTransform
X3DTextureTransformNode getTextureTransform()Provide org.web3d.x3d.sai.Texturing.X3DTextureTransformNode instance (using a properly typed node) from inputOutput SFNode field textureTransform.
Tooltip: [X3DTextureTransformNode] Single contained TextureTransform node that defines 2D transformation applied to texture coordinates.- Hint: Texture coordinates are reapplied (or else recomputed if textureTransform field initially NULL) whenever the corresponding vertex-based geometry changes.
- Hint: if textureTransform array is empty, then this field has no effect.
- Returns:
- value of textureTransform field
-
setTextureTransform
Accessor method to assign org.web3d.x3d.sai.Texturing.X3DTextureTransformNode instance (using a properly typed node) to inputOutput SFNode field textureTransform.
Tooltip: [X3DTextureTransformNode] Single contained TextureTransform node that defines 2D transformation applied to texture coordinates.- Hint: Texture coordinates are reapplied (or else recomputed if textureTransform field initially NULL) whenever the corresponding vertex-based geometry changes.
- Hint: if textureTransform array is empty, then this field has no effect.
- Parameters:
newValue
- is new value for the textureTransform field.- Returns:
Appearance
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-