BodyMotionFindBase

abstract class BodyMotionFindBase

Class BodyMotionFindBase. Provides bodymotionfindbase functionality for the Hytale server.

java.lang.Object > BodyMotionFindBase

Field Summary

sharedNodePoolProvider

protected AStarNodePoolProvider sharedNodePoolProvider

Field sharedNodePoolProvider.

throttleCount

protected int throttleCount

Field throttleCount.

throttleTime

protected double throttleTime

Field throttleTime.

targetDeltaSquared

protected double targetDeltaSquared

Field targetDeltaSquared.

wasSteering

protected boolean wasSteering

Field wasSteering.

throttleDelay

protected double throttleDelay

Field throttleDelay.

passedWaypoint

protected boolean passedWaypoint

Field passedWaypoint.

wasAvoidingBlockDamage

protected boolean wasAvoidingBlockDamage

Field wasAvoidingBlockDamage.

dbgDisplayString

protected boolean dbgDisplayString

Field dbgDisplayString.

debugString

protected StringBuilder debugString

Field debugString.

throttleDelayRange

final double[] throttleDelayRange

Field throttleDelayRange.

debugFlags

final EnumSet debugFlags

Field debugFlags.

transformComponent

final TransformComponent transformComponent

Field transformComponent.

activeMotionController

final MotionController activeMotionController

Field activeMotionController.

position

final Vector3d position

Field position.

unobstructed

final boolean unobstructed

Field unobstructed.

mustRecomputePath

final boolean mustRecomputePath

Field mustRecomputePath.

forceRecomputePath

final boolean forceRecomputePath

Field forceRecomputePath.

targetPosition

final Vector3d targetPosition

Field targetPosition.

progress2

final AStarBase.Progress progress2

Field progress2.

pathLengthSquared

final double pathLengthSquared

Field pathLengthSquared.

motionController

final MotionController motionController

Field motionController.

approachDesiredHeight

final boolean approachDesiredHeight

Field approachDesiredHeight.

withinRange

final boolean withinRange

Field withinRange.

desiredAltitudeRange

final MotionController.VerticalRange desiredAltitudeRange

Field desiredAltitudeRange.

dirX

final double dirX

Field dirX.

dirZ

final double dirZ

Field dirZ.

length

final double length

Field length.

aStarPath

final AStarNode aStarPath

Field aStarPath.

avoidingBlockDamage

final boolean avoidingBlockDamage

Field avoidingBlockDamage.

Method Detail

BodyMotionFindBase

public public BodyMotionFindBase (@Nonnull final BuilderBodyMotionFindBase builderBodyMotionFindBase, @Nonnull final BuilderSupport support, @Nonnull final T aStar)

Method BodyMotionFindBase.

Parameters:
@Nonnull final BuilderBodyMotionFindBase builderBodyMotionFindBase
@Nonnull final BuilderSupport support
@Nonnull final T aStar

activate

public void activate (@Nonnull final Ref ref, @Nonnull final Role role, @Nonnull final ComponentAccessor componentAccessor)

Method activate.

Parameters:
@Nonnull final Ref ref
@Nonnull final Role role
@Nonnull final ComponentAccessor componentAccessor

deactivate

public void deactivate (@Nonnull final Ref ref, @Nonnull final Role role, @Nonnull final ComponentAccessor componentAccessor)

Method deactivate.

Parameters:
@Nonnull final Ref ref
@Nonnull final Role role
@Nonnull final ComponentAccessor componentAccessor

computeSteering

public boolean computeSteering (@Nonnull final Ref ref, @Nonnull final Role role, @Nullable final InfoProvider infoProvider, final double dt, @Nonnull final Steering desiredSteering, @Nonnull final ComponentAccessor componentAccessor)

Method computeSteering.

Parameters:
@Nonnull final Ref ref
@Nonnull final Role role
@Nullable final InfoProvider infoProvider
final double dt
@Nonnull final Steering desiredSteering
@Nonnull final ComponentAccessor componentAccessor

if

public else if (!this.aStar.isComputing()

Method if.

Parameters:
!this.aStar.isComputing( !this.aStar.isComputing(

startPathFinder

protected boolean startPathFinder (@Nonnull final Ref ref, @Nonnull final Vector3d position, final Role role, @Nonnull final MotionController activeMotionController, @Nonnull final ComponentAccessor componentAccessor)

Method startPathFinder.

Parameters:
@Nonnull final Ref ref
@Nonnull final Vector3d position
final Role role
@Nonnull final MotionController activeMotionController
@Nonnull final ComponentAccessor componentAccessor

continuePathFinder

protected boolean continuePathFinder (@Nonnull final Ref ref, @Nonnull final MotionController activeMotionController, @Nonnull final ComponentAccessor componentAccessor)

Method continuePathFinder.

Parameters:
@Nonnull final Ref ref
@Nonnull final MotionController activeMotionController
@Nonnull final ComponentAccessor componentAccessor

updatePathFollower

protected boolean updatePathFollower (@Nonnull final Ref ref, @Nonnull final Vector3d position, @Nonnull final MotionController activeMotionController, @Nonnull final ComponentAccessor componentAccessor)

Method updatePathFollower.

Parameters:
@Nonnull final Ref ref
@Nonnull final Vector3d position
@Nonnull final MotionController activeMotionController
@Nonnull final ComponentAccessor componentAccessor

canSwitchToSteering

protected boolean canSwitchToSteering (@Nonnull final Ref ref, final MotionController motionController, @Nonnull final ComponentAccessor componentAccessor)

Method canSwitchToSteering.

Parameters:
@Nonnull final Ref ref
final MotionController motionController
@Nonnull final ComponentAccessor componentAccessor

shouldSkipSteering

protected boolean shouldSkipSteering (@Nonnull final Ref ref, final MotionController activeMotionController, final Vector3d position, @Nonnull final ComponentAccessor componentAccessor)

Method shouldSkipSteering.

Parameters:
@Nonnull final Ref ref
final MotionController activeMotionController
final Vector3d position
@Nonnull final ComponentAccessor componentAccessor

scaleSteering

protected boolean scaleSteering (@Nonnull final Ref ref, @Nonnull final Role role, @Nonnull final SteeringForceWithTarget steeringForce, @Nonnull final Steering desiredSteering, final double desiredAltitudeWeight, @Nonnull final ComponentAccessor componentAccessor)

Method scaleSteering.

Parameters:
@Nonnull final Ref ref
@Nonnull final Role role
@Nonnull final SteeringForceWithTarget steeringForce
@Nonnull final Steering desiredSteering
final double desiredAltitudeWeight
@Nonnull final ComponentAccessor componentAccessor

computeDesiredYTranslation

protected double computeDesiredYTranslation (@Nonnull final Steering desiredSteering, final float maxAngle, final double desiredAltitudeWeight)

Method computeDesiredYTranslation.

Parameters:
@Nonnull final Steering desiredSteering
final float maxAngle
final double desiredAltitudeWeight

onNoPathFound

protected void onNoPathFound (final MotionController motionController)

Method onNoPathFound.

Parameters:
final MotionController motionController

onBlockedPath

protected void onBlockedPath ()

Method onBlockedPath.

onSteering

protected void onSteering (final MotionController activeMotionController, final Ref ref, final ComponentAccessor componentAccessor)

Method onSteering.

Parameters:
final MotionController activeMotionController
final Ref ref
final ComponentAccessor componentAccessor

onThrottling

protected void onThrottling (final MotionController motionController, final Ref ref, final Steering steering, final ComponentAccessor componentAccessor)

Method onThrottling.

Parameters:
final MotionController motionController
final Ref ref
final Steering steering
final ComponentAccessor componentAccessor

onDeferring

protected void onDeferring (final MotionController motionController, final Ref ref, final Steering steering, final ComponentAccessor componentAccessor)

Method onDeferring.

Parameters:
final MotionController motionController
final Ref ref
final Steering steering
final ComponentAccessor componentAccessor

mustAbortThrottling

protected boolean mustAbortThrottling (final MotionController motionController, final Ref ref)

Method mustAbortThrottling.

Parameters:
final MotionController motionController
final Ref ref

setNavState

protected void setNavState (final NavState state, final String label, final boolean reset, @Nonnull final MotionController activeMotionController)

Method setNavState.

Parameters:
final NavState state
final String label
final boolean reset
@Nonnull final MotionController activeMotionController

decorateDebugString

protected void decorateDebugString (final StringBuilder dbgString)

Method decorateDebugString.

Parameters:
final StringBuilder dbgString

setNavStateInit

protected void setNavStateInit (@Nonnull final MotionController motionController)

Method setNavStateInit.

Parameters:
@Nonnull final MotionController motionController

setNavStateComputing

protected void setNavStateComputing (@Nonnull final MotionController motionController)

Method setNavStateComputing.

Parameters:
@Nonnull final MotionController motionController

setNavStateDeferred

protected void setNavStateDeferred (@Nonnull final MotionController motionController)

Method setNavStateDeferred.

Parameters:
@Nonnull final MotionController motionController

setNavStateAtGoal

protected void setNavStateAtGoal (@Nonnull final MotionController motionController)

Method setNavStateAtGoal.

Parameters:
@Nonnull final MotionController motionController

setNavStateFollowing

protected void setNavStateFollowing (@Nonnull final MotionController motionController)

Method setNavStateFollowing.

Parameters:
@Nonnull final MotionController motionController

setNavStateSteering

protected void setNavStateSteering (@Nonnull final MotionController motionController)

Method setNavStateSteering.

Parameters:
@Nonnull final MotionController motionController

setNavStateBlocked

protected void setNavStateBlocked (@Nonnull final MotionController motionController)

Method setNavStateBlocked.

Parameters:
@Nonnull final MotionController motionController

setNavStateAborted

protected void setNavStateAborted (@Nonnull final MotionController motionController)

Method setNavStateAborted.

Parameters:
@Nonnull final MotionController motionController

setNavStateThrottling

protected void setNavStateThrottling (@Nonnull final MotionController motionController)

Method setNavStateThrottling.

Parameters:
@Nonnull final MotionController motionController

setPath

protected void setPath (@Nonnull final Ref ref, @Nonnull final Vector3d position, @Nonnull final MotionController activeMotionController, @Nonnull final ComponentAccessor componentAccessor)

Method setPath.

Parameters:
@Nonnull final Ref ref
@Nonnull final Vector3d position
@Nonnull final MotionController activeMotionController
@Nonnull final ComponentAccessor componentAccessor

resetThrottleCount

protected void resetThrottleCount ()

Method resetThrottleCount.

startComputePath

protected AStarBase.Progress startComputePath (@Nonnull final Ref ref, final Role role, @Nonnull final MotionController activeMotionController, @Nonnull final Vector3d position, @Nonnull final ComponentAccessor componentAccessor)

Method startComputePath.

Parameters:
@Nonnull final Ref ref
final Role role
@Nonnull final MotionController activeMotionController
@Nonnull final Vector3d position
@Nonnull final ComponentAccessor componentAccessor

shouldDeferPathComputation

protected boolean shouldDeferPathComputation (final MotionController motionController, final Vector3d position, @Nonnull final ComponentAccessor componentAccessor)

Method shouldDeferPathComputation.

Parameters:
final MotionController motionController
final Vector3d position
@Nonnull final ComponentAccessor componentAccessor

canComputeMotion

protected boolean canComputeMotion (@Nonnull final Ref ref, @Nonnull final Role role, @Nullable final InfoProvider positionProvider, @Nonnull final ComponentAccessor componentAccessor)

Method canComputeMotion.

Parameters:
@Nonnull final Ref ref
@Nonnull final Role role
@Nullable final InfoProvider positionProvider
@Nonnull final ComponentAccessor componentAccessor

mustRecomputePath

protected boolean mustRecomputePath (@Nonnull final MotionController activeMotionController)

Method mustRecomputePath.

Parameters:
@Nonnull final MotionController activeMotionController

getRelativeSpeed

protected double getRelativeSpeed ()

Method getRelativeSpeed.

forceRecomputePath

protected void forceRecomputePath (final MotionController activeMotionController)

Method forceRecomputePath.

Parameters:
final MotionController activeMotionController

DebugFlags

public private DebugFlags (final String description)

Method DebugFlags.

Parameters:
final String description

get

public String get ()

Method get.