Interface OBBFactory
- All Known Implementing Classes:
OBBFactoryImpl
public interface OBBFactory
Factory to create
OBB
instances.-
Method Summary
Modifier and TypeMethodDescriptioncreate
(net.minecraft.world.phys.AABB aabb) Creates an OBB with no rotation.create
(net.minecraft.world.phys.AABB aabb, double pitch, double yaw, double roll) Creates an OBB with the provided pitch, yaw, and roll rotation.create
(net.minecraft.world.phys.AABB aabb, org.joml.Quaternionfc rotation) Creates an OBB with the provided Quaternion as the rotation.static OBBFactory
instance()
-
Method Details
-
instance
- Returns:
- An OBBFactory instance to access API functions. All details of this object not mentioned in this file are assumed to be an implementation detail, and may change at any time.
-
create
Creates an OBB with no rotation. From a gameplay perspective, this is identical to an AABB. As such, it's recommended to just create an AABB instead.- Parameters:
aabb
- The AABB to create the OBB with.- Returns:
- A new OBB instance.
-
create
Creates an OBB with the provided pitch, yaw, and roll rotation. The rotations are applied in the order yaw->pitch->roll.- Parameters:
aabb
- The AABB that represents this OBB without rotations.pitch
- The pitch of the rotation.yaw
- The yaw of the rotation.roll
- The roll of the rotation.- Returns:
- A new OBB instance.
-
create
Creates an OBB with the provided Quaternion as the rotation.- Parameters:
aabb
- The AABB that represents this OBB without rotations.rotation
- The Quaternion specifying how the OBB is rotated.- Returns:
- A new OBB instance.
-