com.supermap.data
Class NodeAnimation
- java.lang.Object
-
- com.supermap.data.InternalHandle
-
- com.supermap.data.NodeAnimation
-
public class NodeAnimation extends InternalHandle
Node animation class, you can set the model along the specified route movement, you can control its movement state.
-
-
Constructor Summary
Constructors Constructor and Description NodeAnimation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
addTimePositionChangedListener(TimePositionChangedListener l)
Add a listener for receiving node animation time position change events (TimePositionChangedListener
).double
getDirection()
Get the forward direction angle of the node animation, which is the angle between the forward direction and the north direction in the horizontal direction.double
getLength()
Get the duration of the node animation run cycle in seconds.double
getPitch()
Get the tilt angle of the node animation, which is the angle between the tilt direction and the horizontal plane, and the orientation is positive.NodeAnimationPlayMode
getPlayMode()
Get the playback mode of the node animation.Point3D
getPostition()
Gets the spatial position of the node animation.double
getTimePosition()
The time at which the animation was taken, in seconds.Geometry3D
getTrack()
Returns the motion trajectory of the node animation.boolean
isEnabled()
Gets whether the node animation is enabled. false indicates that the animation is paused at the current position, true to resume motion from the current position.void
removeTimePositionChangedListener(TimePositionChangedListener l)
Removes a listener for receiving node animation time position change events (TimePositionChangedListener
).void
setEnabled(boolean enable)
Set whether the node animation is enabled. false indicates that the animation is paused at the current position, true to resume motion from the current position.void
setLength(double length)
Sets the duration of the node's animation run cycle, in seconds.void
setPlayMode(NodeAnimationPlayMode mode)
Sets the playback mode of the node animation.void
setTimePosition(double position)
Sets the time position of the animation, in seconds.boolean
setTrack(Geometry3D trackLine)
Set the motion of the node animation trajectory, currently only accept the type of GeoLine3D parameters, other types are invalid.
-
-
-
Method Detail
-
getLength
public double getLength()
Get the duration of the node animation run cycle in seconds.- Returns:
- The duration of the node animation.
-
setLength
public void setLength(double length)
Sets the duration of the node's animation run cycle, in seconds.- Parameters:
length
- Specify the length of time.
-
isEnabled
public boolean isEnabled()
Gets whether the node animation is enabled. false indicates that the animation is paused at the current position, true to resume motion from the current position.- Returns:
- Whether the node animation is enabled.
-
setEnabled
public void setEnabled(boolean enable)
Set whether the node animation is enabled. false indicates that the animation is paused at the current position, true to resume motion from the current position.- Parameters:
enable
- Specifies whether node animation is enabled.
-
getPlayMode
public NodeAnimationPlayMode getPlayMode()
Get the playback mode of the node animation.- Returns:
- The animation mode of the node animation.
-
setPlayMode
public void setPlayMode(NodeAnimationPlayMode mode)
Sets the playback mode of the node animation.- Parameters:
mode
- Specifies the playback mode of the node animation.
-
getTimePosition
public double getTimePosition()
The time at which the animation was taken, in seconds.- Returns:
- Return to the time position
-
setTimePosition
public void setTimePosition(double position)
Sets the time position of the animation, in seconds. An animation period is from 0 to Length. When this property is set, the model moves immediately to the time position in the animation cycle.- Parameters:
position
- Time position
-
getPostition
public Point3D getPostition()
Gets the spatial position of the node animation.- Returns:
- The location of the space.
-
getDirection
public double getDirection()
Get the forward direction angle of the node animation, which is the angle between the forward direction and the north direction in the horizontal direction.- Returns:
- Forward direction angle.
-
getPitch
public double getPitch()
Get the tilt angle of the node animation, which is the angle between the tilt direction and the horizontal plane, and the orientation is positive.- Returns:
- Tilt angle.
-
setTrack
public boolean setTrack(Geometry3D trackLine)
Set the motion of the node animation trajectory, currently only accept the type of GeoLine3D parameters, other types are invalid.- Parameters:
trackLine
- Specifies the motion trajectory of the node animation.- Returns:
- True if the setting is successful, false otherwise.
-
getTrack
public Geometry3D getTrack()
Returns the motion trajectory of the node animation.- Returns:
- The motion trajectory of the node animation.
-
addTimePositionChangedListener
public void addTimePositionChangedListener(TimePositionChangedListener l)
Add a listener for receiving node animation time position change events (TimePositionChangedListener
).- Parameters:
l
- A listener for a user to receive a node animation time position to change events.
-
removeTimePositionChangedListener
public void removeTimePositionChangedListener(TimePositionChangedListener l)
Removes a listener for receiving node animation time position change events (TimePositionChangedListener
).- Parameters:
l
- A listener for a user to receive a node animation time position to change events.
-
-