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

    Constructors
    Constructor
    Description
    VRBodyPartDataImpl(net.minecraft.world.phys.Vec3 pos, net.minecraft.world.phys.Vec3 dir, org.joml.Quaternionfc rot)
    Creates an instance of a VRBodyPartDataImpl record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.world.phys.Vec3
    dir()
    Returns the value of the dir record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    net.minecraft.world.phys.Vec3
    Gets the forward direction this body part is facing.
    net.minecraft.world.phys.Vec3
    Gets the world space position for this body part.
    org.joml.Quaternionfc
    Gets the quaternion representing the rotation of this body part.
    final int
    Returns a hash code value for this object.
    net.minecraft.world.phys.Vec3
    pos()
    Returns the value of the pos record component.
    org.joml.Quaternionfc
    rot()
    Returns the value of the rot record component.
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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 a VRBodyPartDataImpl record class.
      Parameters:
      pos - the value for the pos record component
      dir - the value for the dir record component
      rot - the value for the rot record component
  • Method Details

    • getPos

      public net.minecraft.world.phys.Vec3 getPos()
      Description copied from interface: VRBodyPartData
      Gets the world space position for this body part.
      Specified by:
      getPos in interface VRBodyPartData
      Returns:
      The position of this body part in Minecraft world coordinates.
    • getDir

      public net.minecraft.world.phys.Vec3 getDir()
      Description copied from interface: VRBodyPartData
      Gets the forward direction this body part is facing.
      Specified by:
      getDir in interface VRBodyPartData
      Returns:
      The forward direction of this body part.
    • getRotation

      public org.joml.Quaternionfc getRotation()
      Description copied from interface: VRBodyPartData
      Gets the quaternion representing the rotation of this body part.
      Specified by:
      getRotation in interface VRBodyPartData
      Returns:
      The quaternion representing the rotation of this body part.
    • toString

      public String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • pos

      public net.minecraft.world.phys.Vec3 pos()
      Returns the value of the pos record component.
      Returns:
      the value of the pos record component
    • dir

      public net.minecraft.world.phys.Vec3 dir()
      Returns the value of the dir record component.
      Returns:
      the value of the dir record component
    • rot

      public org.joml.Quaternionfc rot()
      Returns the value of the rot record component.
      Returns:
      the value of the rot record component