Box2D

public class Box2D implements Shape2D

Class Box2D. Provides box2d functionality for the Hytale server.

java.lang.Object > Box2D

Field Summary

t

final double t

Field t.

min

final Vector2d min

Field min.

max

final Vector2d max

Field max.

min2

final Vector2d min2

Field min2.

max2

final Vector2d max2

Field max2.

x

final double x

Field x.

y

final double y

Field y.

Method Detail

Box2D

public public Box2D ()

Method Box2D.

setMinMax

Method setMinMax.

Parameters:
@Nonnull final Vector2d min
@Nonnull final Vector2d max

setEmpty

public Box2D setEmpty ()

Method setEmpty.

union

public Box2D union (@Nonnull final Box2D bb)

Method union.

Parameters:
@Nonnull final Box2D bb

assign

public Box2D assign (@Nonnull final Box2D other)

Method assign.

Parameters:
@Nonnull final Box2D other

minkowskiSum

public Box2D minkowskiSum (@Nonnull final Box2D bb)

Method minkowskiSum.

Parameters:
@Nonnull final Box2D bb

normalize

public Box2D normalize ()

Method normalize.

offset

public Box2D offset (@Nonnull final Vector2d pos)

Method offset.

Parameters:
@Nonnull final Vector2d pos

sweep

public Box2D sweep (@Nonnull final Vector2d v)

Method sweep.

Parameters:
@Nonnull final Vector2d v

if

public else if (v.x > 0.0)

Method if.

Parameters:
v.x > 0.0

extendToInt

public Box2D extendToInt ()

Method extendToInt.

extend

public Box2D extend (final double extentX, final double extentY)

Method extend.

Parameters:
final double extentX
final double extentY

width

public double width ()

Method width.

height

public double height ()

Method height.

isIntersecting

public boolean isIntersecting (@Nonnull final Box2D other)

Method isIntersecting.

Parameters:
@Nonnull final Box2D other

getBox

public Box2D getBox (final double x, final double y)

Method getBox.

Parameters:
final double x
final double y

containsPosition

public boolean containsPosition (@Nonnull final Vector2d origin, @Nonnull final Vector2d position)

Method containsPosition.

Parameters:
@Nonnull final Vector2d origin
@Nonnull final Vector2d position

toString

public String toString ()

Method toString.

KeyedCodec

public new KeyedCodec ("Max", Vector2d.CODEC)

Method KeyedCodec.

Parameters:
"Max" "Max"
Vector2d.CODEC Vector2d.CODEC