类 TransformUtils

java.lang.Object
committee.nova.mods.avaritia.api.client.util.TransformUtils

public class TransformUtils extends Object
Created by covers1624 on 5/16/2016. This is mostly just extracted from the ForgeBlockStateV1 in 1.10. Credits to Fry.

If you have an idea for another transform just make a pull request.

  • 字段详细资料

  • 构造器详细资料

    • TransformUtils

      public TransformUtils()
  • 方法详细资料

    • create

      public static com.mojang.math.Transformation create(float tx, float ty, float tz, float rx, float ry, float rz, float s)
      Creates a new TRSRTransformation.
      参数:
      tx - The x transform.
      ty - The y transform.
      tz - The z transform.
      rx - The x Axis rotation.
      ry - The y Axis rotation.
      rz - The z Axis rotation.
      s - The scale.
      返回:
      The new TRSRTransformation.
    • create

      public static com.mojang.math.Transformation create(Vector3 transform, Vector3 rotation, Vector3 scale)
      Creates a new TRSRTransformation.
      参数:
      transform - The transform.
      rotation - The rotation.
      scale - The scale.
      返回:
      The new TRSRTransformation.
    • create

      public static com.mojang.math.Transformation create(org.joml.Vector3f transform, org.joml.Vector3f rotation, org.joml.Vector3f scale)
      Creates a new TRSRTransformation.
      参数:
      transform - The transform.
      rotation - The rotation.
      scale - The scale.
      返回:
      The new TRSRTransformation.
    • create

      public static com.mojang.math.Transformation create(net.minecraft.client.renderer.block.model.ItemTransform transform)
    • flipLeft

      public static com.mojang.math.Transformation flipLeft(com.mojang.math.Transformation transform)
      Flips the transform for the left hand.
      参数:
      transform - The right-hand transform.
      返回:
      The new left-hand transform.
    • stateFromItemTransforms

      public static net.minecraft.client.resources.model.ModelState stateFromItemTransforms(net.minecraft.client.renderer.block.model.ItemTransforms itemTransforms, Map<net.minecraft.world.item.ItemDisplayContext,com.mojang.math.Transformation> additions)
    • stateFromItemTransforms

      public static PerspectiveModelState stateFromItemTransforms(net.minecraft.client.renderer.block.model.ItemTransforms itemTransforms)
      Decompose a vanilla ItemTransforms into a PerspectiveModelState.
      参数:
      itemTransforms - the ItemTransforms to decompose.
      返回:
      The PerspectiveModelState
    • applyLeftyFlip

      public static void applyLeftyFlip(com.mojang.blaze3d.vertex.PoseStack pStack)
      Applies standard lefty flip to a PoseStack.
      参数:
      pStack - The PoseStack to apply to.