Record Class VRBodyPartDataImpl
java.lang.Object
java.lang.Record
net.timtaran.interactivemc.util.vr.data.VRBodyPartDataImpl
- All Implemented Interfaces:
VRBodyPartData
public record VRBodyPartDataImpl(net.minecraft.world.phys.Vec3 pos, net.minecraft.world.phys.Vec3 dir, org.joml.Quaternionfc rot)
extends Record
implements VRBodyPartData
-
Constructor Summary
ConstructorsConstructorDescriptionVRBodyPartDataImpl(net.minecraft.world.phys.Vec3 pos, net.minecraft.world.phys.Vec3 dir, org.joml.Quaternionfc rot) Creates an instance of aVRBodyPartDataImplrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.phys.Vec3dir()Returns the value of thedirrecord component.final booleanIndicates whether some other object is "equal to" this one.net.minecraft.world.phys.Vec3getDir()Gets the forward direction this body part is facing.net.minecraft.world.phys.Vec3getPos()Gets the world space position for this body part.org.joml.QuaternionfcGets the quaternion representing the rotation of this body part.final inthashCode()Returns a hash code value for this object.net.minecraft.world.phys.Vec3pos()Returns the value of theposrecord component.org.joml.Quaternionfcrot()Returns the value of therotrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
VRBodyPartDataImpl
public VRBodyPartDataImpl(net.minecraft.world.phys.Vec3 pos, net.minecraft.world.phys.Vec3 dir, org.joml.Quaternionfc rot) Creates an instance of aVRBodyPartDataImplrecord class.- Parameters:
pos- the value for theposrecord componentdir- the value for thedirrecord componentrot- the value for therotrecord component
-
-
Method Details
-
getPos
public net.minecraft.world.phys.Vec3 getPos()Description copied from interface:VRBodyPartDataGets the world space position for this body part.- Specified by:
getPosin interfaceVRBodyPartData- Returns:
- The position of this body part in Minecraft world coordinates.
-
getDir
public net.minecraft.world.phys.Vec3 getDir()Description copied from interface:VRBodyPartDataGets the forward direction this body part is facing.- Specified by:
getDirin interfaceVRBodyPartData- Returns:
- The forward direction of this body part.
-
getRotation
public org.joml.Quaternionfc getRotation()Description copied from interface:VRBodyPartDataGets the quaternion representing the rotation of this body part.- Specified by:
getRotationin interfaceVRBodyPartData- Returns:
- The quaternion representing the rotation of this body part.
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
pos
public net.minecraft.world.phys.Vec3 pos()Returns the value of theposrecord component.- Returns:
- the value of the
posrecord component
-
dir
public net.minecraft.world.phys.Vec3 dir()Returns the value of thedirrecord component.- Returns:
- the value of the
dirrecord component
-
rot
public org.joml.Quaternionfc rot()Returns the value of therotrecord component.- Returns:
- the value of the
rotrecord component
-