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 anglefov- the vertical field of view, in degrees
-
Constructor Summary
ConstructorsConstructorDescriptionCameraPose(net.minecraft.world.phys.Vec3 position, float yaw, float pitch, float roll, float fov) Creates an instance of aCameraPoserecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.net.minecraft.world.phys.Vec3forward()The unit vector this pose looks along.floatfov()Returns the value of thefovrecord component.final inthashCode()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, byweight: 0 leaves it alone, 1 looks straight at it.floatpitch()Returns the value of thepitchrecord component.net.minecraft.world.phys.Vec3position()Returns the value of thepositionrecord component.floatroll()Returns the value of therollrecord component.static net.minecraft.world.phys.Vec3rotate(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 StringtoString()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.floatyaw()Returns the value of theyawrecord component.
-
Constructor Details
-
CameraPose
public CameraPose(net.minecraft.world.phys.Vec3 position, float yaw, float pitch, float roll, float fov) Creates an instance of aCameraPoserecord class.
-
-
Method Details
-
forward
public net.minecraft.world.phys.Vec3 forward()The unit vector this pose looks along. -
transformed
This pose moved from a cutscene's own space into the world: turned around the vertical, then shifted. -
lerp
Part of the way from this pose to another, turning the short way round. -
lookingAt
This pose turned to look at a point, byweight: 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
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
position
public net.minecraft.world.phys.Vec3 position()Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-
yaw
-
pitch
-
roll
-
fov
-