Interface IndexedTriangleFanSet
- All Superinterfaces:
X3DComposedGeometryNode
,X3DGeometryNode
,X3DNode
- All Known Implementing Classes:
IndexedTriangleFanSet
IndexedTriangleFanSet is a geometry node containing a Coordinate|CoordinateDouble node, and can also contain Color|ColorRGBA, Normal and TextureCoordinate 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.
IndexedTriangleFanSet node tooltip: [X3DComposedGeometryNode] IndexedTriangleFanSet is a geometry node containing a Coordinate|CoordinateDouble node, and can also contain Color|ColorRGBA, Normal and TextureCoordinate nodes.
- Hint: color, normal and texCoord values are applied in the same order as coord values.
- Hint: insert a Shape node before adding geometry or Appearance.
- Hint: for advanced extensibility, authors can substitute a type-matched ProtoInstance node (with correct containerField value) for contained node content.
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
Add array of child attrib nodes to array of existing nodes (if any).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 attrib.boolean
getCcw()
Provide boolean value from initializeOnly SFBool field named ccw.getColor()
Provide org.web3d.x3d.sai.Rendering.X3DColorNode instance (using a properly typed node) using RGB values [0..1] from inputOutput SFNode field color.boolean
Provide boolean value from initializeOnly SFBool field named colorPerVertex.getCoord()
Provide org.web3d.x3d.sai.Rendering.X3DCoordinateNode instance (using a properly typed node) from inputOutput SFNode field coord.Provide org.web3d.x3d.sai.EnvironmentalEffects.FogCoordinate instance (using a properly typed node) from inputOutput SFNode field fogCoord.int[]
getIndex()
Provide array of int results within allowed range of [-1,infinity) from initializeOnly MFInt32 field named index.Provide org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.Provide org.web3d.x3d.sai.Rendering.X3DNormalNode instance (using a properly typed node) from inputOutput SFNode field normal.boolean
Provide boolean value from initializeOnly SFBool field named normalPerVertex.boolean
getSolid()
Provide boolean value from initializeOnly SFBool field named solid.Provide org.web3d.x3d.sai.Core.X3DNode instance (using a properly typed node) with acceptable node types limited to X3DSingleTextureCoordinateNode|MultiTextureCoordinate, from inputOutput SFNode field texCoord.void
Set single child attrib node, replacing prior array of existing nodes (if any).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 attrib.setCcw
(boolean newValue) Accessor method to assign boolean value to initializeOnly SFBool field named ccw.setColor
(X3DColorNode newValue) Accessor method to assign org.web3d.x3d.sai.Rendering.X3DColorNode instance (using a properly typed node) to inputOutput SFNode field color.setColorPerVertex
(boolean newValue) Accessor method to assign boolean value to initializeOnly SFBool field named colorPerVertex.setCoord
(X3DCoordinateNode newValue) Accessor method to assign org.web3d.x3d.sai.Rendering.X3DCoordinateNode instance (using a properly typed node) to inputOutput SFNode field coord.setFogCoord
(FogCoordinate newValue) Accessor method to assign org.web3d.x3d.sai.EnvironmentalEffects.FogCoordinate instance (using a properly typed node) to inputOutput SFNode field fogCoord.setIndex
(int[] newValue) Accessor method to assign int array to initializeOnly MFInt32 field named index.setMetadata
(X3DMetadataObject newValue) Accessor method to assign org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.setNormal
(X3DNormalNode newValue) Accessor method to assign org.web3d.x3d.sai.Rendering.X3DNormalNode instance (using a properly typed node) to inputOutput SFNode field normal.setNormalPerVertex
(boolean newValue) Accessor method to assign boolean value to initializeOnly SFBool field named normalPerVertex.setSolid
(boolean newValue) Accessor method to assign boolean value to initializeOnly SFBool field named solid.setTexCoord
(X3DNode newValue) Accessor method to assign org.web3d.x3d.sai.Core.X3DNode instance (using a properly typed node) to inputOutput SFNode field texCoord.
-
Method Details
-
getAttrib
X3DNode[] getAttrib()Provide array of org.web3d.x3d.sai.Core.X3DNode results (using an array consisting of properly typed nodes or ProtoInstances) from inputOutput MFNode field attrib.
Tooltip: [X3DVertexAttributeNode] Single contained FloatVertexAttribute node that can specify list of per-vertex attribute information for programmable shaders.- Hint: X3D Architecture 32.2.2.4 Per-vertex attributes, https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/shaders.html#Pervertexattributes
Warning: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DVertexAttributeNode.- Specified by:
getAttrib
in interfaceX3DComposedGeometryNode
- Returns:
- value of attrib field
- See Also:
-
setAttrib
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 attrib.
Tooltip: [X3DVertexAttributeNode] Single contained FloatVertexAttribute node that can specify list of per-vertex attribute information for programmable shaders.- Hint: X3D Architecture 32.2.2.4 Per-vertex attributes, https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/shaders.html#Pervertexattributes
Note: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DVertexAttributeNode.- Specified by:
setAttrib
in interfaceX3DComposedGeometryNode
- Parameters:
newValue
- is new value for the attrib field.- Returns:
IndexedTriangleFanSet
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
addAttrib
Add array of child attrib nodes to array of existing nodes (if any).
Note: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DVertexAttributeNode.- Specified by:
addAttrib
in interfaceX3DComposedGeometryNode
- Parameters:
newValue
- is new value array to be appended the attrib field.
-
setAttrib
Set single child attrib node, replacing prior array of existing nodes (if any).- Specified by:
setAttrib
in interfaceX3DComposedGeometryNode
- Parameters:
newValue
- is new node for the attrib field
-
getCcw
boolean getCcw()Provide boolean value from initializeOnly SFBool field named ccw.
Tooltip: ccw defines clockwise/counterclockwise ordering of vertex coordinates, which in turn defines front/back orientation of polygon normals according to Right-Hand Rule (RHR).- Hint: a good debugging technique for problematic polygons is to try changing the value of ccw, which can reverse solid effects (single-sided backface culling) and normal-vector direction.
- Warning: consistent and correct ordering of left-handed or right-handed point sequences is important throughout the coord array of point values.
- Hint: clockwise https://en.wikipedia.org/wiki/Clockwise
- Specified by:
getCcw
in interfaceX3DComposedGeometryNode
- Returns:
- value of ccw field
-
setCcw
Accessor method to assign boolean value to initializeOnly SFBool field named ccw.
Tooltip: ccw defines clockwise/counterclockwise ordering of vertex coordinates, which in turn defines front/back orientation of polygon normals according to Right-Hand Rule (RHR).- Hint: a good debugging technique for problematic polygons is to try changing the value of ccw, which can reverse solid effects (single-sided backface culling) and normal-vector direction.
- Warning: consistent and correct ordering of left-handed or right-handed point sequences is important throughout the coord array of point values.
- Hint: clockwise https://en.wikipedia.org/wiki/Clockwise
- Specified by:
setCcw
in interfaceX3DComposedGeometryNode
- Parameters:
newValue
- is new value for the ccw field.- Returns:
IndexedTriangleFanSet
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getColor
X3DColorNode getColor()Provide org.web3d.x3d.sai.Rendering.X3DColorNode instance (using a properly typed node) using RGB values [0..1] from inputOutput SFNode field color.
Tooltip: [X3DColorNode] Single contained Color or ColorRGBA node that can specify color values applied to corresponding vertices according to colorIndex and colorPerVertex fields. *- Specified by:
getColor
in interfaceX3DComposedGeometryNode
- Returns:
- value of color field
-
setColor
Accessor method to assign org.web3d.x3d.sai.Rendering.X3DColorNode instance (using a properly typed node) to inputOutput SFNode field color.
Tooltip: [X3DColorNode] Single contained Color or ColorRGBA node that can specify color values applied to corresponding vertices according to colorIndex and colorPerVertex fields. *- Specified by:
setColor
in interfaceX3DComposedGeometryNode
- Parameters:
newValue
- is new value for the color field.- Returns:
IndexedTriangleFanSet
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getColorPerVertex
boolean getColorPerVertex()Provide boolean value from initializeOnly SFBool field named colorPerVertex.
Tooltip: Whether Color|ColorRGBA values are applied to each point vertex (true) or to each polygon face (false).- Warning: the provided value of IndexedTriangleFanSet colorPerVertex field is ignored and always treated as true.
- Warning: if child Color|ColorRGBA node is not provided, then geometry is rendered using corresponding Appearance and material/texture values.
- Hint: X3D Scene Authoring Hints, Color https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#Color
- Specified by:
getColorPerVertex
in interfaceX3DComposedGeometryNode
- Returns:
- value of colorPerVertex field
-
setColorPerVertex
Accessor method to assign boolean value to initializeOnly SFBool field named colorPerVertex.
Tooltip: Whether Color|ColorRGBA values are applied to each point vertex (true) or to each polygon face (false).- Warning: the provided value of IndexedTriangleFanSet colorPerVertex field is ignored and always treated as true.
- Warning: if child Color|ColorRGBA node is not provided, then geometry is rendered using corresponding Appearance and material/texture values.
- Hint: X3D Scene Authoring Hints, Color https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#Color
- Specified by:
setColorPerVertex
in interfaceX3DComposedGeometryNode
- Parameters:
newValue
- is new value for the colorPerVertex field.- Returns:
IndexedTriangleFanSet
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getCoord
X3DCoordinateNode getCoord()Provide org.web3d.x3d.sai.Rendering.X3DCoordinateNode instance (using a properly typed node) from inputOutput SFNode field coord.
Tooltip: [X3DCoordinateNode] Single contained Coordinate or CoordinateDouble node that can specify a list of vertex values. *- Specified by:
getCoord
in interfaceX3DComposedGeometryNode
- Returns:
- value of coord field
-
setCoord
Accessor method to assign org.web3d.x3d.sai.Rendering.X3DCoordinateNode instance (using a properly typed node) to inputOutput SFNode field coord.
Tooltip: [X3DCoordinateNode] Single contained Coordinate or CoordinateDouble node that can specify a list of vertex values. *- Specified by:
setCoord
in interfaceX3DComposedGeometryNode
- Parameters:
newValue
- is new value for the coord field.- Returns:
IndexedTriangleFanSet
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getFogCoord
FogCoordinate getFogCoord()Provide org.web3d.x3d.sai.EnvironmentalEffects.FogCoordinate instance (using a properly typed node) from inputOutput SFNode field fogCoord.
Tooltip: [FogCoordinate] Single contained FogCoordinate node that can specify depth parameters for fog in corresponding geometry. *- Specified by:
getFogCoord
in interfaceX3DComposedGeometryNode
- Returns:
- value of fogCoord field
-
setFogCoord
Accessor method to assign org.web3d.x3d.sai.EnvironmentalEffects.FogCoordinate instance (using a properly typed node) to inputOutput SFNode field fogCoord.
Tooltip: [FogCoordinate] Single contained FogCoordinate node that can specify depth parameters for fog in corresponding geometry. *- Specified by:
setFogCoord
in interfaceX3DComposedGeometryNode
- Parameters:
newValue
- is new value for the fogCoord field.- Returns:
IndexedTriangleFanSet
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getIndex
int[] getIndex()Provide array of int results within allowed range of [-1,infinity) from initializeOnly MFInt32 field named index.
Tooltip: [-1,+infinity) index list specifies triangles by connecting Coordinate vertices, each individual fan separated by -1 sentinel value.- Hint: first indexed coordinate in each sequence is fan center.
- Returns:
- value of index field
-
setIndex
Accessor method to assign int array to initializeOnly MFInt32 field named index.
Tooltip: [-1,+infinity) index list specifies triangles by connecting Coordinate vertices, each individual fan separated by -1 sentinel value.- Hint: first indexed coordinate in each sequence is fan center.
- Parameters:
newValue
- is new value for the index field.- Returns:
IndexedTriangleFanSet
- 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 interfaceX3DComposedGeometryNode
- Specified by:
getMetadata
in interfaceX3DGeometryNode
- 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 interfaceX3DComposedGeometryNode
- Specified by:
setMetadata
in interfaceX3DGeometryNode
- Specified by:
setMetadata
in interfaceX3DNode
- Parameters:
newValue
- is new value for the metadata field.- Returns:
IndexedTriangleFanSet
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
getNormal
X3DNormalNode getNormal()Provide org.web3d.x3d.sai.Rendering.X3DNormalNode instance (using a properly typed node) from inputOutput SFNode field normal.
Tooltip: [X3DNormalNode] Single contained Normal node that can specify perpendicular vectors for corresponding vertices to support rendering computations, applied according to the normalPerVertex field.- Hint: useful for special effects. Normal vector computation by 3D graphics hardware is quite fast so adding normals to a scene is typically unnecessary.
- Warning: normal vectors increase file size, typically doubling geometry definitions. Normal vectors are rapidly computed at run time by GPUs and thus are rarely needed in model files if no special effects are expected.
- Specified by:
getNormal
in interfaceX3DComposedGeometryNode
- Returns:
- value of normal field
-
setNormal
Accessor method to assign org.web3d.x3d.sai.Rendering.X3DNormalNode instance (using a properly typed node) to inputOutput SFNode field normal.
Tooltip: [X3DNormalNode] Single contained Normal node that can specify perpendicular vectors for corresponding vertices to support rendering computations, applied according to the normalPerVertex field.- Hint: useful for special effects. Normal vector computation by 3D graphics hardware is quite fast so adding normals to a scene is typically unnecessary.
- Warning: normal vectors increase file size, typically doubling geometry definitions. Normal vectors are rapidly computed at run time by GPUs and thus are rarely needed in model files if no special effects are expected.
- Specified by:
setNormal
in interfaceX3DComposedGeometryNode
- Parameters:
newValue
- is new value for the normal field.- Returns:
IndexedTriangleFanSet
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getNormalPerVertex
boolean getNormalPerVertex()Provide boolean value from initializeOnly SFBool field named normalPerVertex.
Tooltip: Whether Normal node vector values are applied to each point vertex (true) or to each polygon face (false).- Hint: if no child Normal node is provided, the X3D browser shall automatically generate normals, using creaseAngle to determine smoothed shading across shared vertices.
- Specified by:
getNormalPerVertex
in interfaceX3DComposedGeometryNode
- Returns:
- value of normalPerVertex field
-
setNormalPerVertex
Accessor method to assign boolean value to initializeOnly SFBool field named normalPerVertex.
Tooltip: Whether Normal node vector values are applied to each point vertex (true) or to each polygon face (false).- Hint: if no child Normal node is provided, the X3D browser shall automatically generate normals, using creaseAngle to determine smoothed shading across shared vertices.
- Specified by:
setNormalPerVertex
in interfaceX3DComposedGeometryNode
- Parameters:
newValue
- is new value for the normalPerVertex field.- Returns:
IndexedTriangleFanSet
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getSolid
boolean getSolid()Provide boolean value from initializeOnly SFBool field named solid.
Tooltip: Setting solid true means draw only one side of polygons (backface culling on), setting solid false means draw both sides of polygons (backface culling off).- Hint: mnemonic "this geometry is solid like a brick" (you don't render the inside of a brick).
- Warning: default value true can completely hide geometry if viewed from wrong side!
- Hint: if in doubt, use solid='false' for maximum visibility.
- Hint: accessType relaxed to inputOutput in order to support animation and visualization.
- Specified by:
getSolid
in interfaceX3DComposedGeometryNode
- Returns:
- value of solid field
-
setSolid
Accessor method to assign boolean value to initializeOnly SFBool field named solid.
Tooltip: Setting solid true means draw only one side of polygons (backface culling on), setting solid false means draw both sides of polygons (backface culling off).- Hint: mnemonic "this geometry is solid like a brick" (you don't render the inside of a brick).
- Warning: default value true can completely hide geometry if viewed from wrong side!
- Hint: if in doubt, use solid='false' for maximum visibility.
- Hint: accessType relaxed to inputOutput in order to support animation and visualization.
- Specified by:
setSolid
in interfaceX3DComposedGeometryNode
- Parameters:
newValue
- is new value for the solid field.- Returns:
IndexedTriangleFanSet
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getTexCoord
X3DNode getTexCoord()Provide org.web3d.x3d.sai.Core.X3DNode instance (using a properly typed node) with acceptable node types limited to X3DSingleTextureCoordinateNode|MultiTextureCoordinate, from inputOutput SFNode field texCoord.
Tooltip: [X3DTextureCoordinateNode] Single contained TextureCoordinate, TextureCoordinateGenerator or MultiTextureCoordinate node that can specify coordinates for texture mapping onto corresponding geometry. *- Specified by:
getTexCoord
in interfaceX3DComposedGeometryNode
- Returns:
- value of texCoord field
-
setTexCoord
Accessor method to assign org.web3d.x3d.sai.Core.X3DNode instance (using a properly typed node) to inputOutput SFNode field texCoord.
Tooltip: [X3DTextureCoordinateNode] Single contained TextureCoordinate, TextureCoordinateGenerator or MultiTextureCoordinate node that can specify coordinates for texture mapping onto corresponding geometry. *- Specified by:
setTexCoord
in interfaceX3DComposedGeometryNode
- Parameters:
newValue
- is new value for the texCoord field.- Returns:
IndexedTriangleFanSet
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-