abstract class BodyMotionFindBase
Class BodyMotionFindBase. Provides bodymotionfindbase functionality for the Hytale server.
java.lang.Object > BodyMotionFindBase
Field Summary
sharedNodePoolProvider
Field sharedNodePoolProvider.
throttleCount
Field throttleCount.
throttleTime
Field throttleTime.
targetDeltaSquared
Field targetDeltaSquared.
wasSteering
Field wasSteering.
throttleDelay
Field throttleDelay.
passedWaypoint
Field passedWaypoint.
wasAvoidingBlockDamage
Field wasAvoidingBlockDamage.
dbgDisplayString
Field dbgDisplayString.
debugString
Field debugString.
throttleDelayRange
Field throttleDelayRange.
debugFlags
Field debugFlags.
transformComponent
Field transformComponent.
activeMotionController
Field activeMotionController.
position
Field position.
unobstructed
Field unobstructed.
mustRecomputePath
Field mustRecomputePath.
forceRecomputePath
Field forceRecomputePath.
targetPosition
Field targetPosition.
progress2
Field progress2.
pathLengthSquared
Field pathLengthSquared.
motionController
Field motionController.
approachDesiredHeight
Field approachDesiredHeight.
withinRange
Field withinRange.
desiredAltitudeRange
Field desiredAltitudeRange.
dirX
Field dirX.
dirZ
Field dirZ.
length
Field length.
aStarPath
Field aStarPath.
avoidingBlockDamage
Field avoidingBlockDamage.
Method Detail
BodyMotionFindBase
public
BodyMotionFindBase
(@Nonnull final BuilderBodyMotionFindBase builderBodyMotionFindBase, @Nonnull final BuilderSupport support, @Nonnull final T aStar)
Method BodyMotionFindBase.
- Parameters:
@Nonnull final BuilderBodyMotionFindBasebuilderBodyMotionFindBase@Nonnull final BuilderSupportsupport@Nonnull final TaStar
activate
void
activate
(@Nonnull final Ref ref, @Nonnull final Role role, @Nonnull final ComponentAccessor componentAccessor)
Method activate.
- Parameters:
@Nonnull final Refref@Nonnull final Rolerole@Nonnull final ComponentAccessorcomponentAccessor
deactivate
void
deactivate
(@Nonnull final Ref ref, @Nonnull final Role role, @Nonnull final ComponentAccessor componentAccessor)
Method deactivate.
- Parameters:
@Nonnull final Refref@Nonnull final Rolerole@Nonnull final ComponentAccessorcomponentAccessor
computeSteering
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 Refref@Nonnull final Rolerole@Nullable final InfoProviderinfoProviderfinal doubledt@Nonnull final SteeringdesiredSteering@Nonnull final ComponentAccessorcomponentAccessor
if
else
if
(!this.aStar.isComputing()
Method if.
- Parameters:
!this.aStar.isComputing(!this.aStar.isComputing(
startPathFinder
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 Refref@Nonnull final Vector3dpositionfinal Rolerole@Nonnull final MotionControlleractiveMotionController@Nonnull final ComponentAccessorcomponentAccessor
continuePathFinder
boolean
continuePathFinder
(@Nonnull final Ref ref, @Nonnull final MotionController activeMotionController, @Nonnull final ComponentAccessor componentAccessor)
Method continuePathFinder.
- Parameters:
@Nonnull final Refref@Nonnull final MotionControlleractiveMotionController@Nonnull final ComponentAccessorcomponentAccessor
updatePathFollower
boolean
updatePathFollower
(@Nonnull final Ref ref, @Nonnull final Vector3d position, @Nonnull final MotionController activeMotionController, @Nonnull final ComponentAccessor componentAccessor)
Method updatePathFollower.
- Parameters:
@Nonnull final Refref@Nonnull final Vector3dposition@Nonnull final MotionControlleractiveMotionController@Nonnull final ComponentAccessorcomponentAccessor
canSwitchToSteering
boolean
canSwitchToSteering
(@Nonnull final Ref ref, final MotionController motionController, @Nonnull final ComponentAccessor componentAccessor)
Method canSwitchToSteering.
- Parameters:
@Nonnull final Refreffinal MotionControllermotionController@Nonnull final ComponentAccessorcomponentAccessor
shouldSkipSteering
boolean
shouldSkipSteering
(@Nonnull final Ref ref, final MotionController activeMotionController, final Vector3d position, @Nonnull final ComponentAccessor componentAccessor)
Method shouldSkipSteering.
- Parameters:
@Nonnull final Refreffinal MotionControlleractiveMotionControllerfinal Vector3dposition@Nonnull final ComponentAccessorcomponentAccessor
scaleSteering
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 Refref@Nonnull final Rolerole@Nonnull final SteeringForceWithTargetsteeringForce@Nonnull final SteeringdesiredSteeringfinal doubledesiredAltitudeWeight@Nonnull final ComponentAccessorcomponentAccessor
computeDesiredYTranslation
double
computeDesiredYTranslation
(@Nonnull final Steering desiredSteering, final float maxAngle, final double desiredAltitudeWeight)
Method computeDesiredYTranslation.
- Parameters:
@Nonnull final SteeringdesiredSteeringfinal floatmaxAnglefinal doubledesiredAltitudeWeight
onBlockedPath
void
onBlockedPath
()
Method onBlockedPath.
onSteering
void
onSteering
(final MotionController activeMotionController, final Ref ref, final ComponentAccessor componentAccessor)
Method onSteering.
- Parameters:
final MotionControlleractiveMotionControllerfinal Refreffinal ComponentAccessorcomponentAccessor
onThrottling
void
onThrottling
(final MotionController motionController, final Ref ref, final Steering steering, final ComponentAccessor componentAccessor)
Method onThrottling.
- Parameters:
final MotionControllermotionControllerfinal Refreffinal Steeringsteeringfinal ComponentAccessorcomponentAccessor
onDeferring
void
onDeferring
(final MotionController motionController, final Ref ref, final Steering steering, final ComponentAccessor componentAccessor)
Method onDeferring.
- Parameters:
final MotionControllermotionControllerfinal Refreffinal Steeringsteeringfinal ComponentAccessorcomponentAccessor
mustAbortThrottling
Method mustAbortThrottling.
- Parameters:
final MotionControllermotionControllerfinal Refref
decorateDebugString
void
decorateDebugString
(final StringBuilder dbgString)
Method decorateDebugString.
- Parameters:
final StringBuilderdbgString
setPath
void
setPath
(@Nonnull final Ref ref, @Nonnull final Vector3d position, @Nonnull final MotionController activeMotionController, @Nonnull final ComponentAccessor componentAccessor)
Method setPath.
- Parameters:
@Nonnull final Refref@Nonnull final Vector3dposition@Nonnull final MotionControlleractiveMotionController@Nonnull final ComponentAccessorcomponentAccessor
resetThrottleCount
void
resetThrottleCount
()
Method resetThrottleCount.
startComputePath
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 Refreffinal Rolerole@Nonnull final MotionControlleractiveMotionController@Nonnull final Vector3dposition@Nonnull final ComponentAccessorcomponentAccessor
shouldDeferPathComputation
boolean
shouldDeferPathComputation
(final MotionController motionController, final Vector3d position, @Nonnull final ComponentAccessor componentAccessor)
Method shouldDeferPathComputation.
- Parameters:
final MotionControllermotionControllerfinal Vector3dposition@Nonnull final ComponentAccessorcomponentAccessor
canComputeMotion
boolean
canComputeMotion
(@Nonnull final Ref ref, @Nonnull final Role role, @Nullable final InfoProvider positionProvider, @Nonnull final ComponentAccessor componentAccessor)
Method canComputeMotion.
- Parameters:
@Nonnull final Refref@Nonnull final Rolerole@Nullable final InfoProviderpositionProvider@Nonnull final ComponentAccessorcomponentAccessor
mustRecomputePath
Method mustRecomputePath.
- Parameters:
@Nonnull final MotionControlleractiveMotionController
getRelativeSpeed
double
getRelativeSpeed
()
Method getRelativeSpeed.
forceRecomputePath
Method forceRecomputePath.
- Parameters:
final MotionControlleractiveMotionController
DebugFlags
private
DebugFlags
(final String description)
Method DebugFlags.
- Parameters:
final Stringdescription
get
String
get
()
Method get.