BodyMotionPath

public class BodyMotionPath extends BodyMotionBase

Class BodyMotionPath. Provides bodymotionpath functionality for the Hytale server.

java.lang.Object > BodyMotionBase > BodyMotionPath

Field Summary

currentWaypointIndex

protected int currentWaypointIndex

Field currentWaypointIndex.

currentDirection

protected Direction currentDirection

Field currentDirection.

visitIndex

protected int visitIndex

Field visitIndex.

currentSpeed

protected double currentSpeed

Field currentSpeed.

nextPositionValid

protected boolean nextPositionValid

Field nextPositionValid.

currentNodeDelay

protected double currentNodeDelay

Field currentNodeDelay.

pendingNodeDelay

protected boolean pendingNodeDelay

Field pendingNodeDelay.

rotatingToView

protected boolean rotatingToView

Field rotatingToView.

nodeViewDirection

protected float nodeViewDirection

Field nodeViewDirection.

nodeWaitTime

protected double nodeWaitTime

Field nodeWaitTime.

observationSector

protected float observationSector

Field observationSector.

currentObservationDelay

protected double currentObservationDelay

Field currentObservationDelay.

rotating

protected boolean rotating

Field rotating.

currentViewSegment

protected int currentViewSegment

Field currentViewSegment.

delayScaleRange

final double[] delayScaleRange

Field delayScaleRange.

delayPercentRange

final double[] delayPercentRange

Field delayPercentRange.

info

final IPathProvider info

Field info.

path

final IPath path

Field path.

numWaypoints

final int numWaypoints

Field numWaypoints.

transformComponent

final TransformComponent transformComponent

Field transformComponent.

position

final Vector3d position

Field position.

heading

final float heading

Field heading.

activeMotionController

final MotionController activeMotionController

Field activeMotionController.

componentSelector

final Vector3d componentSelector

Field componentSelector.

worldSupport

final WorldSupport worldSupport

Field worldSupport.

lastIndex

final int lastIndex

Field lastIndex.

wayPoint

final IPathWaypoint wayPoint

Field wayPoint.

maxDistance

final double maxDistance

Field maxDistance.

distance

final double distance

Field distance.

angle

final float angle

Field angle.

fullSector

final float fullSector

Field fullSector.

start

final float start

Field start.

segment

final float segment

Field segment.

thisSegment

final int thisSegment

Field thisSegment.

pos

final Vector3d pos

Field pos.

pathWaypoint

final IPathWaypoint pathWaypoint

Field pathWaypoint.

pathWaypointPosition

final Vector3d pathWaypointPosition

Field pathWaypointPosition.

Method Detail

BodyMotionPath

public public BodyMotionPath (@Nonnull final BuilderBodyMotionPath builder, @Nonnull final BuilderSupport support)

Method BodyMotionPath.

Parameters:
@Nonnull final BuilderBodyMotionPath builder
@Nonnull final BuilderSupport support

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

loaded

public void loaded (final Role role)

Method loaded.

Parameters:
final Role role

computeSteering

public boolean computeSteering (@Nonnull final Ref ref, @Nonnull final Role role, @Nullable final InfoProvider sensorInfo, 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 sensorInfo
final double dt
@Nonnull final Steering desiredSteering
@Nonnull final ComponentAccessor componentAccessor

tickObservationDelay

protected boolean tickObservationDelay (final double dt)

Method tickObservationDelay.

Parameters:
final double dt

pickNextObservationAngle

protected void pickNextObservationAngle ()

Method pickNextObservationAngle.

if

public else if (this.viewSegments > 1)

Method if.

Parameters:
this.viewSegments > 1

closeToPosition

protected boolean closeToPosition (final Vector3d position, @Nonnull final MotionController motionController)

Method closeToPosition.

Parameters:
final Vector3d position
@Nonnull final MotionController motionController

invalidateWaypoint

protected void invalidateWaypoint ()

Method invalidateWaypoint.

nextWayPoint

protected boolean nextWayPoint (@Nonnull final IPath path, @Nonnull final WorldSupport support, @Nonnull final ComponentAccessor componentAccessor)

Method nextWayPoint.

Parameters:
@Nonnull final IPath path
@Nonnull final WorldSupport support
@Nonnull final ComponentAccessor componentAccessor

getFirstWaypoint

protected boolean getFirstWaypoint (@Nonnull final Ref ref, @Nonnull final Role role, @Nullable final IPath path, @Nonnull final Vector3d lastPos, @Nonnull final ComponentAccessor componentAccessor)

Method getFirstWaypoint.

Parameters:
@Nonnull final Ref ref
@Nonnull final Role role
@Nullable final IPath path
@Nonnull final Vector3d lastPos
@Nonnull final ComponentAccessor componentAccessor

waypointIndexUpdated

protected void waypointIndexUpdated (@Nonnull final IPath path, @Nonnull final ComponentAccessor componentAccessor)

Method waypointIndexUpdated.

Parameters:
@Nonnull final IPath path
@Nonnull final ComponentAccessor componentAccessor

initializeCurrentDirection

protected void initializeCurrentDirection ()

Method initializeCurrentDirection.

reset

protected void reset ()

Method reset.

Direction

public private Direction (final String description)

Method Direction.

Parameters:
final String description

get

public String get ()

Method get.

segments

public line segments (last node leads to first node)

Method segments.

Parameters:
last node leads to first node

Shape

public private Shape (final String description)

Method Shape.

Parameters:
final String description