BodyMotionFind

public class BodyMotionFind extends BodyMotionFindWithTarget

Class BodyMotionFind. Provides bodymotionfind functionality for the Hytale server.

java.lang.Object > BodyMotionFindWithTarget > BodyMotionFind

Field Summary

effectiveDistanceSquared

protected double effectiveDistanceSquared

Field effectiveDistanceSquared.

heightDifference

final double[] heightDifference

Field heightDifference.

transformComponent

final TransformComponent transformComponent

Field transformComponent.

position

final Vector3d position

Field position.

targetPosition

final Vector3d targetPosition

Field targetPosition.

motionController

final MotionController motionController

Field motionController.

desiredAltitudeWeight

final double desiredAltitudeWeight

Field desiredAltitudeWeight.

differenceY

final double differenceY

Field differenceY.

aStarWithTarget

final AStarWithTarget aStarWithTarget

Field aStarWithTarget.

bodyRotation

final Vector3f bodyRotation

Field bodyRotation.

direction

final Vector3d direction

Field direction.

Method Detail

BodyMotionFind

public public BodyMotionFind (@Nonnull final BuilderBodyMotionFind builderMotionFind, @Nonnull final BuilderSupport support)

Method BodyMotionFind.

Parameters:
@Nonnull final BuilderBodyMotionFind builderMotionFind
@Nonnull final BuilderSupport support

canSwitchToSteering

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

Method canSwitchToSteering.

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

shouldSkipSteering

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

Method shouldSkipSteering.

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

computeSteering

protected boolean computeSteering (@Nonnull final Ref ref, @Nonnull final Role role, @Nonnull final Vector3d position, @Nonnull final Steering desiredSteering, @Nonnull final ComponentAccessor componentAccessor)

Method computeSteering.

Parameters:
@Nonnull final Ref ref
@Nonnull final Role role
@Nonnull final Vector3d position
@Nonnull final Steering desiredSteering
@Nonnull final ComponentAccessor componentAccessor

canComputeMotion

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

Method canComputeMotion.

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

isGoalReached

protected boolean isGoalReached (@Nonnull final Ref ref, @Nonnull final MotionController motionController, @Nonnull final Vector3d position, @Nonnull final Vector3d targetPosition, @Nonnull final ComponentAccessor componentAccessor)

Method isGoalReached.

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

estimateToGoal

public float estimateToGoal (@Nonnull final AStarBase aStarBase, @Nonnull final Vector3d fromPosition, final MotionController motionController)

Method estimateToGoal.

Parameters:
@Nonnull final AStarBase aStarBase
@Nonnull final Vector3d fromPosition
final MotionController motionController

findBestPath

public void findBestPath (@Nonnull final AStarBase aStarBase, final MotionController controller)

Method findBestPath.

Parameters:
@Nonnull final AStarBase aStarBase
final MotionController controller

onThrottling

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

Method onThrottling.

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

onDeferring

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

Method onDeferring.

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

lookAtTarget

protected void lookAtTarget (@Nonnull final Ref ref, @Nonnull final Steering steering, @Nonnull final ComponentAccessor componentAccessor)

Method lookAtTarget.

Parameters:
@Nonnull final Ref ref
@Nonnull final Steering steering
@Nonnull final ComponentAccessor componentAccessor

canReachTarget

protected boolean canReachTarget (@Nonnull final Ref ref, @Nonnull final MotionController motionController, @Nonnull final Vector3d position, @Nonnull final Vector3d targetPosition, @Nonnull final ComponentAccessor componentAccessor)

Method canReachTarget.

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

isBoundingBoxesOverlapping

protected boolean isBoundingBoxesOverlapping (@Nonnull final Vector3d position, @Nonnull final Vector3d endPosition)

Method isBoundingBoxesOverlapping.

Parameters:
@Nonnull final Vector3d position
@Nonnull final Vector3d endPosition

containsPosition

public return containsPosition (position.x, this.selfBoundingBox.min.x - this.targetBoundingBox.max.x, this.selfBoundingBox.max.x - this.targetBoundingBox.min.x, endPosition.x)

Method containsPosition.

Parameters:
position.x position.x
this.selfBoundingBox.min.x - this.targetBoundingBox.max.x
this.selfBoundingBox.max.x - this.targetBoundingBox.min.x
endPosition.x endPosition.x