Package org.web3d.x3d.sai.Rendering
Interface Normal
- All Superinterfaces:
X3DGeometricPropertyNode
,X3DNode
,X3DNormalNode
- All Known Implementing Classes:
Normal
Normal defines a set of 3D surface-normal vectors that apply either to a sibling Coordinate|CoordinateDouble node, or else to a parent ElevationGrid node.
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.
Normal node tooltip: [X3DNormalNode] Normal defines a set of 3D surface-normal vectors that apply either to a sibling Coordinate|CoordinateDouble node, or else to a parent ElevationGrid node. Normal values are perpendicular directions that are used per-polygon or per-vertex when computing lighting and shading.
- Hint: Normal values are typically only calculated or applied once, during initial loading of model geometry.
- Hint: custom Normal values can produce special effects.
- Hint: if no child Normal node is provided, the X3D browser shall automatically generate normals, using creaseAngle to determine smoothed shading across shared vertices.
- Hint: computation of normal values is performed quite quickly on modern 3D graphics hardware, often with no perceptible delay.
- Warning: adding normal values to a model might significantly increase file size. Testing can help determine proper tradeoffs between file size, network transmission delays and initial rendering speed.
- Hint: normal vectors perpendicular to 3D surface https://en.wikipedia.org/wiki/Normal_(geometry)
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 TypeMethodDescriptionProvide org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.float[]
Provide array of 3-tuple float results within allowed range of [-1,1] from inputOutput MFVec3f field named vector.setMetadata
(X3DMetadataObject newValue) Accessor method to assign org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.setVector
(float[] newValue) Accessor method to assign 3-tuple float array to inputOutput MFVec3f field named vector.
-
Method Details
-
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 interfaceX3DGeometricPropertyNode
- Specified by:
getMetadata
in interfaceX3DNode
- Specified by:
getMetadata
in interfaceX3DNormalNode
- 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 interfaceX3DGeometricPropertyNode
- Specified by:
setMetadata
in interfaceX3DNode
- Specified by:
setMetadata
in interfaceX3DNormalNode
- Parameters:
newValue
- is new value for the metadata field.- Returns:
Normal
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
getVector
float[] getVector()Provide array of 3-tuple float results within allowed range of [-1,1] from inputOutput MFVec3f field named vector.
Tooltip: set of unit-length normal vectors, corresponding to indexed polygons or vertices.- Warning: unit length means a magnitude of 1.0, so normal values of (0,0,0) are invalid.
- Returns:
- value of vector field
-
setVector
Accessor method to assign 3-tuple float array to inputOutput MFVec3f field named vector.
Tooltip: set of unit-length normal vectors, corresponding to indexed polygons or vertices.- Warning: unit length means a magnitude of 1.0, so normal values of (0,0,0) are invalid.
- Parameters:
newValue
- is new value for the vector field.- Returns:
Normal
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-