所有已实现的接口:
IVertexOperation, Copyable<Transformation>

public class Rotation extends Transformation
  • 字段详细资料

    • axes

      public static Vector3[] axes
    • quarterRotations

      public static Transformation[] quarterRotations
      Clockwise pi/2 about y looking down
    • sideRotMap

      public static int[] sideRotMap
    • sideRotations

      public static Transformation[] sideRotations
    • rotSideMap

      public static int[] rotSideMap
    • sideRotOffsets

      public static int[] sideRotOffsets
      Rotate pi/2 * this offset for [side] about y axis before rotating to the side for the rotation indicies to line up
    • angle

      public double angle
    • axis

      public Vector3 axis
  • 构造器详细资料

    • Rotation

      public Rotation(double angle, Vector3 axis)
    • Rotation

      public Rotation(double angle, double x, double y, double z)
    • Rotation

      public Rotation(Quat quat)
    • Rotation

      public Rotation(Rotation rot)
  • 方法详细资料

    • rotateSide

      public static int rotateSide(int s, int r)
    • rotationTo

      public static int rotationTo(int s1, int s2)
      Reverse of rotateSide
    • getSidedRotation

      public static int getSidedRotation(net.minecraft.world.entity.player.Player player, int side)
      参数:
      player - The placing player, used for obtaining the look vector
      side - The side of the block being placed on
      返回:
      The rotation for the face == side^1
    • sideOrientation

      public static Transformation sideOrientation(int s, int r)
      返回:
      The rotation quat for side 0 and rotation 0 to side s with rotation r
    • getSideFromLookAngle

      public static int getSideFromLookAngle(net.minecraft.world.entity.LivingEntity entity)
      参数:
      entity - The placing entity, used for obtaining the look vector
      返回:
      The side towards which the entity is most directly looking.
    • apply

      public void apply(Vector3 vec)
      从类复制的说明: ITransformation
      Applies this transformation to vec
      指定者:
      apply 在类中 ITransformation<Vector3,Transformation>
    • applyN

      public void applyN(Vector3 normal)
      从类复制的说明: Transformation
      Applies this transformation to a normal (doesn't translate)
      指定者:
      applyN 在类中 Transformation
      参数:
      normal - The normal to transform
    • apply

      public void apply(Matrix4 mat)
      从类复制的说明: Transformation
      Applies this transformation to a matrix as a multiplication on the right hand side.
      指定者:
      apply 在类中 Transformation
      参数:
      mat - The matrix to combine this transformation with
    • toQuat

      public Quat toQuat()
    • inverse

      public Transformation inverse()
      从类复制的说明: ITransformation
      Attempts to invert the Transformation.

      The transformations inverse may be itself, or the transform may not have an inverse. In that case a IrreversibleTransformationException is thrown.

      指定者:
      inverse 在类中 ITransformation<Vector3,Transformation>
      返回:
      The inverse transform.
    • merge

      public Transformation merge(Transformation next)
      从类复制的说明: ITransformation
      Returns a simplified transformation that performs this, followed by next. If such a transformation does not exist, returns null
      覆盖:
      merge 在类中 ITransformation<Vector3,Transformation>
    • isRedundant

      public boolean isRedundant()
      从类复制的说明: ITransformation
      Returns true if this transformation is redundant, eg. Scale(1, 1, 1), Translation(0, 0, 0) or Rotation(0, a, b, c)
      覆盖:
      isRedundant 在类中 ITransformation<Vector3,Transformation>
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object
    • copy

      public Rotation copy()