Record Class CameraPose

java.lang.Object
java.lang.Record
net.ixdarklord.coolcatcanvas.api.cutscene.CameraPose
Record Components:
yaw - the turn around the vertical, in Minecraft's degrees (0 looks south, 90 west)
pitch - degrees down from the horizon (negative looks up)
roll - degrees of tilt around the line of sight: a dutch angle
fov - the vertical field of view, in degrees

public record CameraPose(net.minecraft.world.phys.Vec3 position, float yaw, float pitch, float roll, float fov) extends Record
Where a camera is and how it looks: one instant of a Cutscene.
  • Constructor Summary

    Constructors
    Constructor
    Description
    CameraPose(net.minecraft.world.phys.Vec3 position, float yaw, float pitch, float roll, float fov)
    Creates an instance of a CameraPose record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    net.minecraft.world.phys.Vec3
    The unit vector this pose looks along.
    float
    fov()
    Returns the value of the fov record component.
    final int
    Returns a hash code value for this object.
    lerp(CameraPose to, float t)
    Part of the way from this pose to another, turning the short way round.
    lookingAt(net.minecraft.world.phys.Vec3 target, float weight)
    This pose turned to look at a point, by weight: 0 leaves it alone, 1 looks straight at it.
    float
    Returns the value of the pitch record component.
    net.minecraft.world.phys.Vec3
    Returns the value of the position record component.
    float
    Returns the value of the roll record component.
    static net.minecraft.world.phys.Vec3
    rotate(net.minecraft.world.phys.Vec3 point, float yaw)
    A point turned around the vertical by a yaw, the way a player facing that yaw would see their own space.
    final String
    Returns a string representation of this record class.
    transformed(net.minecraft.world.phys.Vec3 origin, float originYaw)
    This pose moved from a cutscene's own space into the world: turned around the vertical, then shifted.
    float
    yaw()
    Returns the value of the yaw record component.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • CameraPose

      public CameraPose(net.minecraft.world.phys.Vec3 position, float yaw, float pitch, float roll, float fov)
      Creates an instance of a CameraPose record class.
      Parameters:
      position - the value for the position record component
      yaw - the value for the yaw record component
      pitch - the value for the pitch record component
      roll - the value for the roll record component
      fov - the value for the fov record component
  • Method Details

    • forward

      public net.minecraft.world.phys.Vec3 forward()
      The unit vector this pose looks along.
    • transformed

      public CameraPose transformed(net.minecraft.world.phys.Vec3 origin, float originYaw)
      This pose moved from a cutscene's own space into the world: turned around the vertical, then shifted.
    • lerp

      public CameraPose lerp(CameraPose to, float t)
      Part of the way from this pose to another, turning the short way round.
    • lookingAt

      public CameraPose lookingAt(net.minecraft.world.phys.Vec3 target, float weight)
      This pose turned to look at a point, by weight: 0 leaves it alone, 1 looks straight at it.
    • rotate

      public static net.minecraft.world.phys.Vec3 rotate(net.minecraft.world.phys.Vec3 point, float yaw)
      A point turned around the vertical by a yaw, the way a player facing that yaw would see their own space.
    • toString

      public final 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • position

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

      public float yaw()
      Returns the value of the yaw record component.
      Returns:
      the value of the yaw record component
    • pitch

      public float pitch()
      Returns the value of the pitch record component.
      Returns:
      the value of the pitch record component
    • roll

      public float roll()
      Returns the value of the roll record component.
      Returns:
      the value of the roll record component
    • fov

      public float fov()
      Returns the value of the fov record component.
      Returns:
      the value of the fov record component