public class PathFollower
Class PathFollower. Provides pathfollower functionality for the Hytale server.
java.lang.Object > PathFollower
Field Summary
currentWaypoint
Field currentWaypoint.
currentWaypointDistanceSquared
Field currentWaypointDistanceSquared.
frozenWaypoint
Field frozenWaypoint.
isWaypointFrozen
Field isWaypointFrozen.
pathSmoothing
Field pathSmoothing.
blendHeading
Field blendHeading.
relativeSpeed
Field relativeSpeed.
relativeSpeedWaypoint
Field relativeSpeedWaypoint.
waypointRadius
Field waypointRadius.
rejectionWeight
Field rejectionWeight.
waypointRadiusSquared
Field waypointRadiusSquared.
debugNodes
Field debugNodes.
shouldSmoothPath
Field shouldSmoothPath.
waypoint
Field waypoint.
target
Field target.
length
Field length.
dotDD
Field dotDD.
dotDP
Field dotDP.
nextWaypoint
Field nextWaypoint.
yaw
Field yaw.
startLength
Field startLength.
middleSkip
Field middleSkip.
middleNode
Field middleNode.
l
Field l.
Method Detail
PathFollower
public
PathFollower
()
Method PathFollower.
setPathSmoothing
void
setPathSmoothing
(final int pathSmoothing)
Method setPathSmoothing.
- Parameters:
final intpathSmoothing
getRelativeSpeed
double
getRelativeSpeed
()
Method getRelativeSpeed.
setRelativeSpeed
void
setRelativeSpeed
(final double relativeSpeed)
Method setRelativeSpeed.
- Parameters:
final doublerelativeSpeed
setRelativeSpeedWaypoint
void
setRelativeSpeedWaypoint
(final double relativeSpeedWaypoint)
Method setRelativeSpeedWaypoint.
- Parameters:
final doublerelativeSpeedWaypoint
setWaypointRadius
void
setWaypointRadius
(final double waypointRadius)
Method setWaypointRadius.
- Parameters:
final doublewaypointRadius
setDebugNodes
void
setDebugNodes
(final boolean debugNodes)
Method setDebugNodes.
- Parameters:
final booleandebugNodes
shouldSmoothPath
boolean
shouldSmoothPath
()
Method shouldSmoothPath.
setRejectionWeight
void
setRejectionWeight
(final double rejectionWeight)
Method setRejectionWeight.
- Parameters:
final doublerejectionWeight
setBlendHeading
void
setBlendHeading
(double blendHeading)
Method setBlendHeading.
- Parameters:
doubleblendHeading
getCurrentWaypointPosition
Method getCurrentWaypointPosition.
setPath
Method setPath.
- Parameters:
final IWaypointfirstWaypoint@Nonnull final Vector3dstartPosition
clearPath
void
clearPath
()
Method clearPath.
pathInFinalStage
boolean
pathInFinalStage
()
Method pathInFinalStage.
freezeWaypoint
boolean
freezeWaypoint
()
Method freezeWaypoint.
isWaypointFrozen
boolean
isWaypointFrozen
()
Method isWaypointFrozen.
setWaypointFrozen
void
setWaypointFrozen
(final boolean waypointFrozen)
Method setWaypointFrozen.
- Parameters:
final booleanwaypointFrozen
executePath
void
executePath
(@Nonnull final Vector3d currentPosition, @Nonnull final MotionController activeMotionController, @Nonnull final Steering desiredSteering)
Method executePath.
- Parameters:
@Nonnull final Vector3dcurrentPosition@Nonnull final MotionControlleractiveMotionController@Nonnull final SteeringdesiredSteering
computeRejection
void
computeRejection
(@Nonnull final Vector3d currentPosition, @Nonnull final Vector3d target, @Nonnull final MotionController activeMotionController)
Method computeRejection.
- Parameters:
@Nonnull final Vector3dcurrentPosition@Nonnull final Vector3dtarget@Nonnull final MotionControlleractiveMotionController
updateCurrentTarget
boolean
updateCurrentTarget
(@Nonnull final Vector3d entityPosition, @Nonnull final MotionController motionController)
Method updateCurrentTarget.
- Parameters:
@Nonnull final Vector3dentityPosition@Nonnull final MotionControllermotionController
smoothPath
void
smoothPath
(@Nonnull final Ref ref, @Nonnull final Vector3d position, @Nonnull final MotionController motionController, @Nonnull final ProbeMoveData probeMoveData, @Nonnull final ComponentAccessor componentAccessor)
Method smoothPath.
- Parameters:
@Nonnull final Refref@Nonnull final Vector3dposition@Nonnull final MotionControllermotionController@Nonnull final ProbeMoveDataprobeMoveData@Nonnull final ComponentAccessorcomponentAccessor
canMoveTo
boolean
canMoveTo
(@Nonnull final Ref ref, @Nonnull final MotionController motionController, @Nonnull final Vector3d position, @Nonnull final Vector3d targetPosition, @Nonnull final ProbeMoveData probeMoveData, @Nonnull final ComponentAccessor componentAccessor)
Method canMoveTo.
- Parameters:
@Nonnull final Refref@Nonnull final MotionControllermotionController@Nonnull final Vector3dposition@Nonnull final Vector3dtargetPosition@Nonnull final ProbeMoveDataprobeMoveData@Nonnull final ComponentAccessorcomponentAccessor
getLength
int
getLength
()
Method getLength.