BodyMotionFindWithTarget

abstract class BodyMotionFindWithTarget extends BodyMotionFindBase

Class BodyMotionFindWithTarget. Provides bodymotionfindwithtarget functionality for the Hytale server.

java.lang.Object > BodyMotionFindBase > BodyMotionFindWithTarget

Field Summary

targetBoundingBox

protected Box targetBoundingBox

Field targetBoundingBox.

selfBoundingBox

protected Box selfBoundingBox

Field selfBoundingBox.

waitForTargetMovement

protected boolean waitForTargetMovement

Field waitForTargetMovement.

haveValidTargetPosition

private boolean haveValidTargetPosition

Field haveValidTargetPosition.

haveAccessibleTargetPosition

private boolean haveAccessibleTargetPosition

Field haveAccessibleTargetPosition.

lastAccessibleTargetPositionIsCurrent

private boolean lastAccessibleTargetPositionIsCurrent

Field lastAccessibleTargetPositionIsCurrent.

self

protected String self

Field self.

other

protected String other

Field other.

cosine

final float cosine

Field cosine.

boundingBoxComponent

final BoundingBox boundingBoxComponent

Field boundingBoxComponent.

positionProvider

final IPositionProvider positionProvider

Field positionProvider.

targetEntityReference

final Ref targetEntityReference

Field targetEntityReference.

targetEntityBoundingBoxComponent

final BoundingBox targetEntityBoundingBoxComponent

Field targetEntityBoundingBoxComponent.

npcEntityComponent

final NPCEntity npcEntityComponent

Field npcEntityComponent.

movementStatesComponent

final MovementStatesComponent movementStatesComponent

Field movementStatesComponent.

entity

final Entity entity

Field entity.

distanceSquared

final double distanceSquared

Field distanceSquared.

transformComponent

final TransformComponent transformComponent

Field transformComponent.

Method Detail

BodyMotionFindWithTarget

public public BodyMotionFindWithTarget (@Nonnull final BuilderBodyMotionFindWithTarget builderMotionFindWithTarget, @Nonnull final BuilderSupport support)

Method BodyMotionFindWithTarget.

Parameters:
@Nonnull final BuilderBodyMotionFindWithTarget builderMotionFindWithTarget
@Nonnull final BuilderSupport support

AStarWithTarget

public new AStarWithTarget ()

Method AStarWithTarget.

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

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

mustRecomputePath

public boolean mustRecomputePath (@Nonnull final MotionController activeMotionController)

Method mustRecomputePath.

Parameters:
@Nonnull final MotionController activeMotionController

if

public else if (NPCPhysicsMath.isInViewCone(this.conePosition, this.coneDirection, this.cosHalfRecomputeConeAngle, this.getLastTargetPosition()

Method if.

Parameters:
NPCPhysicsMath.isInViewCone(this.conePosition NPCPhysicsMath.isInViewCone(this.conePosition
this.coneDirection this.coneDirection
this.cosHalfRecomputeConeAngle this.cosHalfRecomputeConeAngle
this.getLastTargetPosition( this.getLastTargetPosition(

forceRecomputePath

public void forceRecomputePath (final MotionController activeMotionController)

Method forceRecomputePath.

Parameters:
final MotionController activeMotionController

shouldDeferPathComputation

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

Method shouldDeferPathComputation.

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

mustAbortThrottling

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

Method mustAbortThrottling.

Parameters:
final MotionController motionController
final Ref ref

isGoalReached

public boolean isGoalReached (final Ref ref, final MotionController activeMotionController, final Vector3d position, final ComponentAccessor componentAccessor)

Method isGoalReached.

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

startComputePath

public 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

onBlockedPath

public void onBlockedPath ()

Method onBlockedPath.

onNoPathFound

public void onNoPathFound (final MotionController motionController)

Method onNoPathFound.

Parameters:
final MotionController motionController

onSteering

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

Method onSteering.

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

decorateDebugString

protected void decorateDebugString (@Nonnull final StringBuilder dbgString)

Method decorateDebugString.

Parameters:
@Nonnull final StringBuilder dbgString

getLastTargetPosition

protected Vector3d getLastTargetPosition ()

Method getLastTargetPosition.

getLastAccessibleTargetPosition

protected Vector3d getLastAccessibleTargetPosition (@Nonnull final MotionController motionController, final boolean approximate, @Nonnull final ComponentAccessor componentAccessor)

Method getLastAccessibleTargetPosition.

Parameters:
@Nonnull final MotionController motionController
final boolean approximate
@Nonnull final ComponentAccessor componentAccessor