Package org.web3d.x3d.sai.HAnim
Interface HAnimMotion
- All Superinterfaces:
X3DChildNode
,X3DNode
- All Known Implementing Classes:
HAnimMotion
An HAnimMotion node supports discrete frame-by-frame playback for HAnim motion data animation.
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.
HAnimMotion node tooltip: [X3DChildNode] An HAnimMotion node supports discrete frame-by-frame playback for HAnim motion data animation. Design characteristics include integration with HAnim figure data and HAnimJoint nodes, animation control, and playback of raw motion data.
- Hint: HAnim Specification https://www.web3d.org/documents/specifications/19774/V2.0
- Hint: HAnim Specification, clause 6.2 Introduction to Motion objectshttps://www.web3d.org/documents/specifications/19774/V2.0/MotionDataAnimation/MotionNodes.html#IntroductionToMotionNodes
- Hint: HAnim Specification part 2, clause 6.6 Example Usage of Motion object https://www.web3d.org/documents/specifications/19774/V2.0/MotionDataAnimation/MotionNodes.html#MotionObjectExample
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 String value from inputOutput SFString field named channels.boolean[]
Provide array of boolean results from inputOutput MFBool field named channelsEnabled.double
Provide double value in seconds within allowed range of [0,infinity) from outputOnly SFTime field named cycleTime.Provide String value from inputOutput SFString field named description.double
Provide double value in seconds within allowed range of [0,infinity) from outputOnly SFTime field named elapsedTime.boolean
Provide boolean value from inputOutput SFBool field named enabled.int
Provide int value within allowed range of [0,infinity) from inputOutput SFInt32 field named endFrame.int
Provide int value within allowed range of [0,infinity) from outputOnly SFInt32 field named frameCount.double
Provide double value in seconds within allowed range of (0,infinity) from inputOutput SFTime field named frameDuration.int
Provide int value from inputOutput SFInt32 field named frameIncrement.int
Provide int value within allowed range of [0,infinity) from inputOutput SFInt32 field named frameIndex.Provide String value from inputOutput SFString field named joints.int
getLoa()
Provide int value within allowed range of [-1,4] from inputOutput SFInt32 field named loa.boolean
getLoop()
Provide boolean value from inputOutput SFBool field named loop.Provide org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.getName()
Provide String value from inputOutput SFString field named name.int
Provide int value within allowed range of [0,infinity) from inputOutput SFInt32 field named startFrame.float[]
Provide array of float results from inputOutput MFFloat field named values.setChannels
(String newValue) Accessor method to assign String value to inputOutput SFString field named channels.setChannelsEnabled
(boolean[] newValue) Accessor method to assign boolean array to inputOutput MFBool field named channelsEnabled.setDescription
(String newValue) Accessor method to assign String value to inputOutput SFString field named description.setEnabled
(boolean newValue) Accessor method to assign boolean value to inputOutput SFBool field named enabled.setEndFrame
(int newValue) Accessor method to assign int value to inputOutput SFInt32 field named endFrame.setFrameDuration
(double newValue) Accessor method to assign double value in seconds to inputOutput SFTime field named frameDuration.setFrameIncrement
(int newValue) Accessor method to assign int value to inputOutput SFInt32 field named frameIncrement.setFrameIndex
(int newValue) Accessor method to assign int value to inputOutput SFInt32 field named frameIndex.Accessor method to assign String value to inputOutput SFString field named joints.setLoa
(int newValue) Accessor method to assign int value to inputOutput SFInt32 field named loa.setLoop
(boolean newValue) Accessor method to assign boolean value to inputOutput SFBool field named loop.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 value to inputOutput SFString field named name.setNext
(boolean newValue) Accessor method to assign boolean value to inputOnly SFBool field named next.setPrevious
(boolean newValue) Accessor method to assign boolean value to inputOnly SFBool field named previous.setStartFrame
(int newValue) Accessor method to assign int value to inputOutput SFInt32 field named startFrame.setValues
(float[] newValue) Accessor method to assign float array to inputOutput MFFloat field named values.
-
Method Details
-
getChannels
String getChannels()Provide String value from inputOutput SFString field named channels.
Tooltip: list of number of channels for transformation, followed by transformation type of each channel of data. Each value is space or comma separated.- Hint: channels are enabled by default, unless otherwise indicated by channelsEnabled field.
- Returns:
- value of channels field
-
setChannels
Accessor method to assign String value to inputOutput SFString field named channels.
Tooltip: list of number of channels for transformation, followed by transformation type of each channel of data. Each value is space or comma separated.- Hint: channels are enabled by default, unless otherwise indicated by channelsEnabled field.
- Parameters:
newValue
- is new value for the channels field.- Returns:
HAnimMotion
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getChannelsEnabled
boolean[] getChannelsEnabled()Provide array of boolean results from inputOutput MFBool field named channelsEnabled.
Tooltip: boolean values for each channel indicating whether enabled. *- Returns:
- value of channelsEnabled field
-
setChannelsEnabled
Accessor method to assign boolean array to inputOutput MFBool field named channelsEnabled.
Tooltip: boolean values for each channel indicating whether enabled. *- Parameters:
newValue
- is new value for the channelsEnabled field.- Returns:
HAnimMotion
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getCycleTime
double getCycleTime()Provide double value in seconds within allowed range of [0,infinity) from outputOnly SFTime field named cycleTime.
Tooltip: cycleTime sends a time event at initial starting time and at beginning of each new cycle.- Hint: this event is useful for synchronization with other time-based animation objects.
- 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 cycleTime field
-
getDescription
String getDescription()Provide String value from inputOutput SFString field named description.
Tooltip: Author-provided prose that describes intended purpose of this node.- 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).
- 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 this node.- 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).
- Parameters:
newValue
- is new value for the description field.- Returns:
HAnimMotion
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getElapsedTime
double getElapsedTime()Provide double value in seconds within allowed range of [0,infinity) from outputOnly SFTime field named elapsedTime.
Tooltip: [0,+infinity) elapsedTime is computed elapsed time since the Motion object was activated and running, counting all traversed frames (as if frameIndex equaled 1) and multiplied by frameDuration, cumulative in seconds.- Warning: it is an error to define this transient outputOnly field in an X3D file, instead only use it a source for ROUTE events.
- Hint: elapsedTime is a nonnegative SFTime duration interval, not an absolute clock time.
- Returns:
- value of elapsedTime field
-
getEnabled
boolean getEnabled()Provide boolean value from inputOutput SFBool field named enabled.
Tooltip: Enables/disables node operation. *- Returns:
- value of enabled field
-
setEnabled
Accessor method to assign boolean value to inputOutput SFBool field named enabled.
Tooltip: Enables/disables node operation. *- Parameters:
newValue
- is new value for the enabled field.- Returns:
HAnimMotion
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getEndFrame
int getEndFrame()Provide int value within allowed range of [0,infinity) from inputOutput SFInt32 field named endFrame.
Tooltip: [0,+infinity) endFrame indicates final index of animated frame. Note that endFrame can precede, equal or follow endFrame. The default endFrame value is reset to (frameCount - 1) whenever frameCount is changed.- Hint: endFrame starts at 0 and is no greater than (frameCount - 1).
- Returns:
- value of endFrame field
-
setEndFrame
Accessor method to assign int value to inputOutput SFInt32 field named endFrame.
Tooltip: [0,+infinity) endFrame indicates final index of animated frame. Note that endFrame can precede, equal or follow endFrame. The default endFrame value is reset to (frameCount - 1) whenever frameCount is changed.- Hint: endFrame starts at 0 and is no greater than (frameCount - 1).
- Parameters:
newValue
- is new value for the endFrame field.- Returns:
HAnimMotion
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getFrameCount
int getFrameCount()Provide int value within allowed range of [0,infinity) from outputOnly SFInt32 field named frameCount.
Tooltip: [0,+infinity) frameCount is computed at run time and indicates the total number of frames present in the animation, equaling the number of sets of channel data rows present in the values array. *- Returns:
- value of frameCount field
-
getFrameDuration
double getFrameDuration()Provide double value in seconds within allowed range of (0,infinity) from inputOutput SFTime field named frameDuration.
Tooltip: (0,+infinity) frameDuration specifies the duration of each frame in seconds. *- Returns:
- value of frameDuration field
-
setFrameDuration
Accessor method to assign double value in seconds to inputOutput SFTime field named frameDuration.
Tooltip: (0,+infinity) frameDuration specifies the duration of each frame in seconds. *- Parameters:
newValue
- is new value for the frameDuration field.- Returns:
HAnimMotion
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getFrameIncrement
int getFrameIncrement()Provide int value from inputOutput SFInt32 field named frameIncrement.
Tooltip: [-infinity,+infinity) frameIncrement field controls whether playback direction is forwards or backwards, and also whether frames are skipped (for example, subsampled replay). For a single animation step, the next frameIndex value equals (frameIndex + frameIncrement) modulo frameCount.- Hint: note that setting frameIncrement to 0 prevents automatic advancement of frameIndex and pauses animation of HAnimMotion node.
- Returns:
- value of frameIncrement field
-
setFrameIncrement
Accessor method to assign int value to inputOutput SFInt32 field named frameIncrement.
Tooltip: [-infinity,+infinity) frameIncrement field controls whether playback direction is forwards or backwards, and also whether frames are skipped (for example, subsampled replay). For a single animation step, the next frameIndex value equals (frameIndex + frameIncrement) modulo frameCount.- Hint: note that setting frameIncrement to 0 prevents automatic advancement of frameIndex and pauses animation of HAnimMotion node.
- Parameters:
newValue
- is new value for the frameIncrement field.- Returns:
HAnimMotion
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getFrameIndex
int getFrameIndex()Provide int value within allowed range of [0,infinity) from inputOutput SFInt32 field named frameIndex.
Tooltip: [0,+infinity) frameIndex indicates index of current frame. Note that frameIndex can be modified whether the Motion node is enabled or not, and becomes effective when the next animation cycle occurs. Thus the frameIndex value indicates the frame currently (or next) being processed.- Hint: frameIndex starts at 0 and is no greater than (frameCount - 1). Values less than 0 are reset as 0. Values greater or equal to frameCount are stored as (frameCount - 1). Thus the value of frameIndex shall be greater than or equal to zero, and less than frameCount.
- Returns:
- value of frameIndex field
-
setFrameIndex
Accessor method to assign int value to inputOutput SFInt32 field named frameIndex.
Tooltip: [0,+infinity) frameIndex indicates index of current frame. Note that frameIndex can be modified whether the Motion node is enabled or not, and becomes effective when the next animation cycle occurs. Thus the frameIndex value indicates the frame currently (or next) being processed.- Hint: frameIndex starts at 0 and is no greater than (frameCount - 1). Values less than 0 are reset as 0. Values greater or equal to frameCount are stored as (frameCount - 1). Thus the value of frameIndex shall be greater than or equal to zero, and less than frameCount.
- Parameters:
newValue
- is new value for the frameIndex field.- Returns:
HAnimMotion
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getJoints
String getJoints()Provide String value from inputOutput SFString field named joints.
Tooltip: joints field lists names of joints that raw motion data is to be applied to. The number and order of the names in the joints field shall match the number and order of the channels field information, and the number and order of the sets of values in the values field for each frame of the animation.- Hint: values are space or comma separated.
- Hint: The joint name IGNORED shall be used for channel of motion data that is not used for any joint.
- Returns:
- value of joints field
-
setJoints
Accessor method to assign String value to inputOutput SFString field named joints.
Tooltip: joints field lists names of joints that raw motion data is to be applied to. The number and order of the names in the joints field shall match the number and order of the channels field information, and the number and order of the sets of values in the values field for each frame of the animation.- Hint: values are space or comma separated.
- Hint: The joint name IGNORED shall be used for channel of motion data that is not used for any joint.
- Parameters:
newValue
- is new value for the joints field.- Returns:
HAnimMotion
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getLoa
int getLoa()Provide int value within allowed range of [-1,4] from inputOutput SFInt32 field named loa.
Tooltip: [-1,4] Level Of Articulation 0..4 indicates complexity and detail of joints for given humanoid skeletal hierarchy.- Hint: loa value of -1 indicates that no LOA conformance is provided.
- Hint: Humanoid Animation (HAnim) Specification, Part 1 Architecture, 4.8.4 Levels of articulation, https://www.web3d.org/documents/specifications/19774/V2.0/Architecture/concepts.html#LevelsOfArticulation
- Returns:
- value of loa field
-
setLoa
Accessor method to assign int value to inputOutput SFInt32 field named loa.
Tooltip: [-1,4] Level Of Articulation 0..4 indicates complexity and detail of joints for given humanoid skeletal hierarchy.- Hint: loa value of -1 indicates that no LOA conformance is provided.
- Hint: Humanoid Animation (HAnim) Specification, Part 1 Architecture, 4.8.4 Levels of articulation, https://www.web3d.org/documents/specifications/19774/V2.0/Architecture/concepts.html#LevelsOfArticulation
- Parameters:
newValue
- is new value for the loa field.- Returns:
HAnimMotion
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getLoop
boolean getLoop()Provide boolean value from inputOutput SFBool field named loop.
Tooltip: Repeat indefinitely when loop=true, repeat only once when loop=false. *- Returns:
- value of loop field
-
setLoop
Accessor method to assign boolean value to inputOutput SFBool field named loop.
Tooltip: Repeat indefinitely when loop=true, repeat only once when loop=false. *- Parameters:
newValue
- is new value for the loop field.- Returns:
HAnimMotion
- 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 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 interfaceX3DNode
- Parameters:
newValue
- is new value for the metadata field.- Returns:
HAnimMotion
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
getName
String getName()Provide String value from inputOutput SFString field named name.
Tooltip: Unique name attribute must be defined so that HAnimMotion node can be identified at run time for animation purposes. *- Returns:
- value of name field
-
setName
Accessor method to assign String value to inputOutput SFString field named name.
Tooltip: Unique name attribute must be defined so that HAnimMotion node can be identified at run time for animation purposes. *
@see X3D Scene Authoring Hints: Naming Conventions- Parameters:
newValue
- is new value for the name field.- Returns:
HAnimMotion
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setNext
Accessor method to assign boolean value to inputOnly SFBool field named next.
Tooltip: Send next output value in values array, using/updating various frame values as appropriate.- Hint: this input event will "wrap around" boundary of frame array, i.e. continue from endFrame next to startFrame if necessary.
- Warning: it is an error to define this transient inputOnly field in an X3D file, instead only use it a destination for ROUTE events.
- Parameters:
newValue
- is new value for the next field.- Returns:
HAnimMotion
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
setPrevious
Accessor method to assign boolean value to inputOnly SFBool field named previous.
Tooltip: Send previous output value in values array, using/updating various frame values as appropriate.- Hint: this input event will "wrap around" boundary of frame array, i.e. continue from startFrame next to endFrame if necessary.
- Warning: it is an error to define this transient inputOnly field in an X3D file, instead only use it a destination for ROUTE events.
- Parameters:
newValue
- is new value for the previous field.- Returns:
HAnimMotion
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getStartFrame
int getStartFrame()Provide int value within allowed range of [0,infinity) from inputOutput SFInt32 field named startFrame.
Tooltip: [0,+infinity) startFrame indicates initial index of animated frame. Note that startFrame can precede, equal or follow endFrame.- Hint: startFrame starts at 0 and is no greater than (frameCount - 1).
- Returns:
- value of startFrame field
-
setStartFrame
Accessor method to assign int value to inputOutput SFInt32 field named startFrame.
Tooltip: [0,+infinity) startFrame indicates initial index of animated frame. Note that startFrame can precede, equal or follow endFrame.- Hint: startFrame starts at 0 and is no greater than (frameCount - 1).
- Parameters:
newValue
- is new value for the startFrame field.- Returns:
HAnimMotion
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getValues
float[] getValues()Provide array of float results from inputOutput MFFloat field named values.
Tooltip: values field contains all transformation values, ordered first by frame, then by joint, and then by transformation Sets of floats in the values array matching the order listed in joints and channels fields. *- Returns:
- value of values field
-
setValues
Accessor method to assign float array to inputOutput MFFloat field named values.
Tooltip: values field contains all transformation values, ordered first by frame, then by joint, and then by transformation Sets of floats in the values array matching the order listed in joints and channels fields. *- Parameters:
newValue
- is new value for the values field.- Returns:
HAnimMotion
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-