PathFollower

public class PathFollower

Class PathFollower. Provides pathfollower functionality for the Hytale server.

java.lang.Object > PathFollower

Field Summary

currentWaypoint

protected IWaypoint currentWaypoint

Field currentWaypoint.

currentWaypointDistanceSquared

protected double currentWaypointDistanceSquared

Field currentWaypointDistanceSquared.

frozenWaypoint

protected FrozenWaypoint frozenWaypoint

Field frozenWaypoint.

isWaypointFrozen

protected boolean isWaypointFrozen

Field isWaypointFrozen.

pathSmoothing

protected int pathSmoothing

Field pathSmoothing.

blendHeading

protected double blendHeading

Field blendHeading.

relativeSpeed

protected double relativeSpeed

Field relativeSpeed.

relativeSpeedWaypoint

protected double relativeSpeedWaypoint

Field relativeSpeedWaypoint.

waypointRadius

protected double waypointRadius

Field waypointRadius.

rejectionWeight

protected double rejectionWeight

Field rejectionWeight.

waypointRadiusSquared

protected double waypointRadiusSquared

Field waypointRadiusSquared.

debugNodes

protected boolean debugNodes

Field debugNodes.

shouldSmoothPath

protected boolean shouldSmoothPath

Field shouldSmoothPath.

waypoint

final IWaypoint waypoint

Field waypoint.

target

final Vector3d target

Field target.

length

final double length

Field length.

dotDD

final double dotDD

Field dotDD.

dotDP

final double dotDP

Field dotDP.

nextWaypoint

final IWaypoint nextWaypoint

Field nextWaypoint.

yaw

final float yaw

Field yaw.

startLength

final int startLength

Field startLength.

middleSkip

final int middleSkip

Field middleSkip.

middleNode

final IWaypoint middleNode

Field middleNode.

l

final int l

Field l.

Method Detail

PathFollower

public public PathFollower ()

Method PathFollower.

setPathSmoothing

public void setPathSmoothing (final int pathSmoothing)

Method setPathSmoothing.

Parameters:
final int pathSmoothing

getRelativeSpeed

public double getRelativeSpeed ()

Method getRelativeSpeed.

setRelativeSpeed

public void setRelativeSpeed (final double relativeSpeed)

Method setRelativeSpeed.

Parameters:
final double relativeSpeed

setRelativeSpeedWaypoint

public void setRelativeSpeedWaypoint (final double relativeSpeedWaypoint)

Method setRelativeSpeedWaypoint.

Parameters:
final double relativeSpeedWaypoint

setWaypointRadius

public void setWaypointRadius (final double waypointRadius)

Method setWaypointRadius.

Parameters:
final double waypointRadius

setDebugNodes

public void setDebugNodes (final boolean debugNodes)

Method setDebugNodes.

Parameters:
final boolean debugNodes

shouldSmoothPath

public boolean shouldSmoothPath ()

Method shouldSmoothPath.

setRejectionWeight

public void setRejectionWeight (final double rejectionWeight)

Method setRejectionWeight.

Parameters:
final double rejectionWeight

setBlendHeading

public void setBlendHeading (double blendHeading)

Method setBlendHeading.

Parameters:
double blendHeading

getCurrentWaypoint

public IWaypoint getCurrentWaypoint ()

Method getCurrentWaypoint.

getCurrentWaypointPosition

public Vector3d getCurrentWaypointPosition ()

Method getCurrentWaypointPosition.

getNextWaypoint

public IWaypoint getNextWaypoint ()

Method getNextWaypoint.

getNextWaypointPosition

public Vector3d getNextWaypointPosition ()

Method getNextWaypointPosition.

setPath

public void setPath (final IWaypoint firstWaypoint, @Nonnull final Vector3d startPosition)

Method setPath.

Parameters:
final IWaypoint firstWaypoint
@Nonnull final Vector3d startPosition

clearPath

public void clearPath ()

Method clearPath.

pathInFinalStage

public boolean pathInFinalStage ()

Method pathInFinalStage.

freezeWaypoint

public boolean freezeWaypoint ()

Method freezeWaypoint.

isWaypointFrozen

public boolean isWaypointFrozen ()

Method isWaypointFrozen.

setWaypointFrozen

public void setWaypointFrozen (final boolean waypointFrozen)

Method setWaypointFrozen.

Parameters:
final boolean waypointFrozen

executePath

public void executePath (@Nonnull final Vector3d currentPosition, @Nonnull final MotionController activeMotionController, @Nonnull final Steering desiredSteering)

Method executePath.

Parameters:
@Nonnull final Vector3d currentPosition
@Nonnull final MotionController activeMotionController
@Nonnull final Steering desiredSteering

computeRejection

public void computeRejection (@Nonnull final Vector3d currentPosition, @Nonnull final Vector3d target, @Nonnull final MotionController activeMotionController)

Method computeRejection.

Parameters:
@Nonnull final Vector3d currentPosition
@Nonnull final Vector3d target
@Nonnull final MotionController activeMotionController

updateCurrentTarget

public boolean updateCurrentTarget (@Nonnull final Vector3d entityPosition, @Nonnull final MotionController motionController)

Method updateCurrentTarget.

Parameters:
@Nonnull final Vector3d entityPosition
@Nonnull final MotionController motionController

smoothPath

public 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 Ref ref
@Nonnull final Vector3d position
@Nonnull final MotionController motionController
@Nonnull final ProbeMoveData probeMoveData
@Nonnull final ComponentAccessor componentAccessor

canMoveTo

protected 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 Ref ref
@Nonnull final MotionController motionController
@Nonnull final Vector3d position
@Nonnull final Vector3d targetPosition
@Nonnull final ProbeMoveData probeMoveData
@Nonnull final ComponentAccessor componentAccessor

getLength

public int getLength ()

Method getLength.

getPosition

public Vector3d getPosition ()

Method getPosition.

advance

public IWaypoint advance (final int skip)

Method advance.

Parameters:
final int skip