Class EntityCollisionProvider
java.lang.Object
com.hypixel.hytale.server.core.modules.collision.EntityCollisionProvider
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intprotected Boxprotected final Vector3dprotected EntityContactData[]protected intprotected Vector3dprotected BiPredicate<Ref<EntityStore>, ComponentAccessor<EntityStore>> protected static final doubleprotected Ref<EntityStore> protected Ref<EntityStore> protected final Vector2dprotected doubleprotected Vector3dprotected EntityContactData[]protected final Box -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidacceptNearestIgnore(Ref<EntityStore> ref, EntityCollisionProvider collisionProvider, ComponentAccessor<EntityStore> componentAccessor) voidclear()protected voiddoublecomputeNearest(Box entityBoundingBox, Vector3d pos, Vector3d dir, Ref<EntityStore> ignoreSelf, Ref<EntityStore> ignore, ComponentAccessor<EntityStore> componentAccessor) doublecomputeNearest(Vector3d pos, Vector3d dir, Box boundingBox, double radius, BiPredicate<Ref<EntityStore>, ComponentAccessor<EntityStore>> entityFilter, Ref<EntityStore> ignoreSelf, Ref<EntityStore> ignoreOther, ComponentAccessor<EntityStore> componentAccessor) static booleandefaultEntityFilter(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) getContact(int index) intgetCount()protected booleanisColliding(Ref<EntityStore> ref, Vector2d minMax, ComponentAccessor<EntityStore> componentAccessor) protected voiditerateEntitiesInSphere(Vector3d pos, Vector3d dir, Box boundingBox, double radius, BiConsumer<Ref<EntityStore>, EntityCollisionProvider> consumer, BiConsumer<Ref<EntityStore>, EntityCollisionProvider> consumerPlayer, ComponentAccessor<EntityStore> componentAccessor) protected voidsetContact(Entity entity)
-
Field Details
-
ALLOC_SIZE
protected static final int ALLOC_SIZE- See Also:
-
EXTRA_DISTANCE
protected static final double EXTRA_DISTANCE- See Also:
-
contacts
-
sortBuffer
-
count
protected int count -
minMax
-
collisionPosition
-
tempBox
-
nearestCollisionStart
protected double nearestCollisionStart -
position
-
direction
-
boundingBox
-
entityFilter
-
ignoreSelf
-
ignoreOther
-
-
Constructor Details
-
EntityCollisionProvider
public EntityCollisionProvider()
-
-
Method Details
-
getCount
public int getCount() -
getContact
-
clear
public void clear() -
computeNearest
public double computeNearest(@Nonnull Box entityBoundingBox, @Nonnull Vector3d pos, @Nonnull Vector3d dir, @Nullable Ref<EntityStore> ignoreSelf, @Nullable Ref<EntityStore> ignore, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
computeNearest
public double computeNearest(@Nonnull Vector3d pos, @Nonnull Vector3d dir, @Nonnull Box boundingBox, double radius, @Nonnull BiPredicate<Ref<EntityStore>, ComponentAccessor<EntityStore>> entityFilter, @Nullable Ref<EntityStore> ignoreSelf, @Nullable Ref<EntityStore> ignoreOther, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
iterateEntitiesInSphere
protected void iterateEntitiesInSphere(@Nonnull Vector3d pos, @Nonnull Vector3d dir, @Nonnull Box boundingBox, double radius, @Nonnull BiConsumer<Ref<EntityStore>, EntityCollisionProvider> consumer, @Nonnull BiConsumer<Ref<EntityStore>, EntityCollisionProvider> consumerPlayer, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
setContact
-
isColliding
protected boolean isColliding(@Nonnull Ref<EntityStore> ref, @Nonnull Vector2d minMax, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
clearRefs
protected void clearRefs() -
defaultEntityFilter
public static boolean defaultEntityFilter(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
acceptNearestIgnore
protected static void acceptNearestIgnore(@Nonnull Ref<EntityStore> ref, @Nonnull EntityCollisionProvider collisionProvider, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
-