Interface Pose3dc
- All Known Implementing Classes:
Pose3d
A read-only 3D pose, consisting of a position, rotation, and scale.
- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault org.joml.Matrix4dbakeIntoMatrix(org.joml.Matrix4d dest) Bakes this pose into a matrix transform.default Pose3dLerps this pose towards the given pose by the given amount.org.joml.Quaterniondcorg.joml.Vector3dcposition()org.joml.Vector3dcorg.joml.Vector3dcscale()default net.minecraft.world.phys.Vec3transformNormal(net.minecraft.world.phys.Vec3 local) Transforms a local normal to a global normal.default org.joml.Vector3dtransformNormal(org.joml.Vector3d local) Transforms and mutates a local normal to a global normal.default org.joml.Vector3dtransformNormal(org.joml.Vector3dc local, org.joml.Vector3d dest) Transforms a local normal to a global normal.default net.minecraft.world.phys.Vec3transformNormalInverse(net.minecraft.world.phys.Vec3 global) Transform a global normal to a local normal.default org.joml.Vector3dtransformNormalInverse(org.joml.Vector3d global) Transforms and mutates a global normal to a local normal.default org.joml.Vector3dtransformNormalInverse(org.joml.Vector3dc global, org.joml.Vector3d dest) Transforms a global normal to a local normal.default net.minecraft.world.phys.Vec3transformPosition(net.minecraft.world.phys.Vec3 local) Transform a local position to a global position.default org.joml.Vector3dtransformPosition(org.joml.Vector3d local) Transforms and mutates a local position to a global position.default org.joml.Vector3dtransformPosition(org.joml.Vector3dc local, org.joml.Vector3d dest) Transform a local position to a global position.default net.minecraft.world.phys.Vec3transformPositionInverse(net.minecraft.world.phys.Vec3 global) Transform a global position to a local position.default org.joml.Vector3dtransformPositionInverse(org.joml.Vector3d global) Transforms and mutates a global position to a local position.default org.joml.Vector3dtransformPositionInverse(org.joml.Vector3dc global, org.joml.Vector3d dest) Transform a global position to a local position.default booleanwithinTolerance(Pose3d pose3d, double distanceTolerance, double angularTolerance)
-
Method Details
-
position
@Contract(pure=true) org.joml.Vector3dc position()- Returns:
- the global position of this pose.
-
orientation
@Contract(pure=true) org.joml.Quaterniondc orientation()- Returns:
- the global orientation of this pose.
-
rotationPoint
@Contract(pure=true) org.joml.Vector3dc rotationPoint()- Returns:
- the rotation point of this pose.
-
scale
@Contract(pure=true) org.joml.Vector3dc scale()- Returns:
- the global scale of this pose.
-
transformPosition
@Contract(value="_,_->param2", mutates="param2") default org.joml.Vector3d transformPosition(org.joml.Vector3dc local, org.joml.Vector3d dest) Transform a local position to a global position.- Parameters:
local- the local position to transformdest- will hold the result- Returns:
- dest
-
transformPosition
@Contract(value="_->new", pure=true) default net.minecraft.world.phys.Vec3 transformPosition(net.minecraft.world.phys.Vec3 local) Transform a local position to a global position.- Parameters:
local- the local position to transform- Returns:
- a new vector holding the result
-
transformPositionInverse
@Contract(value="_->new", pure=true) default net.minecraft.world.phys.Vec3 transformPositionInverse(net.minecraft.world.phys.Vec3 global) Transform a global position to a local position.- Parameters:
global- the global position to transform- Returns:
- a new vector holding the result
-
transformPositionInverse
@Contract(value="_,_->param2", mutates="param2") default org.joml.Vector3d transformPositionInverse(org.joml.Vector3dc global, org.joml.Vector3d dest) Transform a global position to a local position.- Parameters:
global- the global position to transformdest- will hold the result- Returns:
- dest
-
transformNormal
@Contract(value="_,_->param2", mutates="param2") default org.joml.Vector3d transformNormal(org.joml.Vector3dc local, org.joml.Vector3d dest) Transforms a local normal to a global normal. If the scale is non-uniform, the result will not be of the same magnitude.- Parameters:
local- the local normal to transformdest- will hold the result- Returns:
- dest
-
transformNormalInverse
@Contract(value="_,_->param2", mutates="param2") default org.joml.Vector3d transformNormalInverse(org.joml.Vector3dc global, org.joml.Vector3d dest) Transforms a global normal to a local normal. If the scale is non-uniform, the result will not be of the same magnitude.- Parameters:
global- the global normal to transformdest- will hold the result- Returns:
- dest
-
transformPosition
@Contract(value="_->param1", mutates="param1") default org.joml.Vector3d transformPosition(org.joml.Vector3d local) Transforms and mutates a local position to a global position.- Parameters:
local- the local position to transform- Returns:
- local with the result
-
transformPositionInverse
@Contract(value="_->param1", mutates="param1") default org.joml.Vector3d transformPositionInverse(org.joml.Vector3d global) Transforms and mutates a global position to a local position.- Parameters:
global- the global position to transform- Returns:
- global with the result
-
transformNormal
@Contract(value="_->param1", mutates="param1") default org.joml.Vector3d transformNormal(org.joml.Vector3d local) Transforms and mutates a local normal to a global normal. If the scale is non-uniform, the result will not be of the same magnitude.- Parameters:
local- the local normal to transform- Returns:
- local with the result
-
transformNormalInverse
@Contract(value="_->param1", mutates="param1") default org.joml.Vector3d transformNormalInverse(org.joml.Vector3d global) Transforms and mutates a global normal to a local normal. If the scale is non-uniform, the result will not be of the same magnitude.- Parameters:
global- the global normal to transform- Returns:
- global with the result
-
transformNormal
@Contract(value="_->new", pure=true) default net.minecraft.world.phys.Vec3 transformNormal(net.minecraft.world.phys.Vec3 local) Transforms a local normal to a global normal. If the scale is non-uniform, the result will not be of the same magnitude.- Parameters:
local- the local normal to transform- Returns:
- local with the result
-
transformNormalInverse
@Contract(value="_->new", pure=true) default net.minecraft.world.phys.Vec3 transformNormalInverse(net.minecraft.world.phys.Vec3 global) Transform a global normal to a local normal. If the scale is non-uniform, the result will not be of the same magnitude.- Parameters:
global- the global normal to transform- Returns:
- global with the result
-
lerp
@Contract(value="_,_,_->param3", mutates="param3") default Pose3d lerp(Pose3dc pose, double frac, Pose3d dest) Lerps this pose towards the given pose by the given amount.- Parameters:
pose- the pose to lerp towardsfrac- the amount to lerp by, 0.0 to 1.0dest- The destination pose to write into- Returns:
- The dest pose
-
bakeIntoMatrix
@Contract(value="_->param1", mutates="param1") default org.joml.Matrix4d bakeIntoMatrix(org.joml.Matrix4d dest) Bakes this pose into a matrix transform.- Parameters:
dest- will hold the result- Returns:
- dest
-
withinTolerance
@Contract(pure=true) default boolean withinTolerance(Pose3d pose3d, double distanceTolerance, double angularTolerance) - Parameters:
pose3d- the pose to compare todistanceTolerance- the distance tolerance [m]angularTolerance- the angular tolerance [rad]- Returns:
- if this pose is within the distance tolerance and angular tolerance of another pose
-