Package org.web3d.x3d.sai.Interpolation
Interface ColorInterpolator
- All Superinterfaces:
X3DChildNode
,X3DInterpolatorNode
,X3DNode
- All Known Implementing Classes:
ColorInterpolator
ColorInterpolator generates a range of color values.
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.
ColorInterpolator node tooltip: [X3DInterpolatorNode] ColorInterpolator generates a range of color values. Authors can ROUTE value_changed output events to various color fields of Material or Color nodes.
- Hint: typical input connection is ROUTE someTimeSensorDEF.fraction_changed TO thisInterpolatorDEF.set_fraction.
- Hint: typical output connection is ROUTE thisInterpolatorDEF.value_changed TO someDestinationNodeDEF.set_someAttribute.
- Hint: X3D Scene Authoring Hints, Color https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#Color
- Hint: example scenes and authoring assets at https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter07EventAnimationInterpolation
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 TypeMethodDescriptionfloat[]
getKey()
Provide array of float results from inputOutput MFFloat field named key.float[]
Provide array of 3-tuple float results using RGB values [0..1] using RGB values [0..1] from inputOutput MFColor field named keyValue.Provide org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.float[]
getValue()
Provide array of 3-tuple float results using RGB values [0..1] using RGB values [0..1] from outputOnly SFColor field named value_changed.setKey
(float[] newValue) Accessor method to assign float array to inputOutput MFFloat field named key.setKeyValue
(float[] newValue) Accessor method to assign 3-tuple float array using RGB values [0..1] to inputOutput MFColor field named keyValue.setMetadata
(X3DMetadataObject newValue) Accessor method to assign org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.
-
Method Details
-
getKey
float[] getKey()Provide array of float results from inputOutput MFFloat field named key.
Tooltip: Definition values for linear-interpolation function input intervals, listed in non-decreasing order and corresponding to a value in the keyValue array.- Warning: number of keys must match number of keyValues!
- Warning: values in key array shall be monotonically non-decreasing, meaning that each value is greater than or equal to the preceding value.
- Hint: typical interval for values in key array is within range of 0 to 1, but larger intervals can be defined with arbitrary bounds.
- Specified by:
getKey
in interfaceX3DInterpolatorNode
- Returns:
- value of key field
-
setKey
Accessor method to assign float array to inputOutput MFFloat field named key.
Tooltip: Definition values for linear-interpolation function input intervals, listed in non-decreasing order and corresponding to a value in the keyValue array.- Warning: number of keys must match number of keyValues!
- Warning: values in key array shall be monotonically non-decreasing, meaning that each value is greater than or equal to the preceding value.
- Hint: typical interval for values in key array is within range of 0 to 1, but larger intervals can be defined with arbitrary bounds.
- Specified by:
setKey
in interfaceX3DInterpolatorNode
- Parameters:
newValue
- is new value for the key field.- Returns:
ColorInterpolator
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getKeyValue
float[] getKeyValue()Provide array of 3-tuple float results using RGB values [0..1] using RGB values [0..1] from inputOutput MFColor field named keyValue.
Tooltip: Output values for linear interpolation, each corresponding to an input-fraction value in the key array.- Hint: identical adjacent entries in keyValue array have the effect of defining constant-value step functions. https://en.wikipedia.org/wiki/Step_function
- Warning: number of keys must match number of keyValues!
- Returns:
- value of keyValue field
-
setKeyValue
Accessor method to assign 3-tuple float array using RGB values [0..1] to inputOutput MFColor field named keyValue.
Tooltip: Output values for linear interpolation, each corresponding to an input-fraction value in the key array.- Hint: identical adjacent entries in keyValue array have the effect of defining constant-value step functions. https://en.wikipedia.org/wiki/Step_function
- Warning: number of keys must match number of keyValues!
- Parameters:
newValue
- is new value for the keyValue field.- Returns:
ColorInterpolator
- 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 interfaceX3DChildNode
- Specified by:
getMetadata
in interfaceX3DInterpolatorNode
- 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 interfaceX3DChildNode
- Specified by:
setMetadata
in interfaceX3DInterpolatorNode
- Specified by:
setMetadata
in interfaceX3DNode
- Parameters:
newValue
- is new value for the metadata field.- Returns:
ColorInterpolator
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
getValue
float[] getValue()Provide array of 3-tuple float results using RGB values [0..1] using RGB values [0..1] from outputOnly SFColor field named value_changed.
Tooltip: Linearly interpolated output value determined by current key time and corresponding keyValue pair.- Hint: X3D players might not send unchanging intermediate values, thus avoiding excessive superfluous events that have no effect.
- Warning: it is an error to define this transient outputOnly field in an X3D file, instead only use it a source for ROUTE events.
- Returns:
- value of value_changed field
-