类 TransformUtils
java.lang.Object
committee.nova.mods.avaritia.api.client.util.TransformUtils
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.
-
字段概要
字段修饰符和类型字段说明static final PerspectiveModelStatestatic final PerspectiveModelStatestatic final PerspectiveModelStatestatic final PerspectiveModelStatestatic final PerspectiveModelStatestatic final PerspectiveModelStatestatic final PerspectiveModelState -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static voidapplyLeftyFlip(com.mojang.blaze3d.vertex.PoseStack pStack) Applies standard lefty flip to aPoseStack.static com.mojang.math.Transformationcreate(float tx, float ty, float tz, float rx, float ry, float rz, float s) Creates a new TRSRTransformation.static com.mojang.math.TransformationCreates a new TRSRTransformation.static com.mojang.math.Transformationcreate(net.minecraft.client.renderer.block.model.ItemTransform transform) static com.mojang.math.Transformationcreate(org.joml.Vector3f transform, org.joml.Vector3f rotation, org.joml.Vector3f scale) Creates a new TRSRTransformation.static com.mojang.math.TransformationflipLeft(com.mojang.math.Transformation transform) Flips the transform for the left hand.static PerspectiveModelStatestateFromItemTransforms(net.minecraft.client.renderer.block.model.ItemTransforms itemTransforms) Decompose a vanillaItemTransformsinto aPerspectiveModelState.static net.minecraft.client.resources.model.ModelStatestateFromItemTransforms(net.minecraft.client.renderer.block.model.ItemTransforms itemTransforms, Map<net.minecraft.world.item.ItemDisplayContext, com.mojang.math.Transformation> additions)
-
字段详细资料
-
IDENTITY
-
DEFAULT_BLOCK
-
DEFAULT_ITEM
-
DEFAULT_TOOL
-
DEFAULT_BOW
-
DEFAULT_HANDHELD_ROD
-
DEFAULT_TRIDENT
-
-
构造器详细资料
-
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 vanillaItemTransformsinto aPerspectiveModelState.- 参数:
itemTransforms- theItemTransformsto decompose.- 返回:
- The
PerspectiveModelState
-
applyLeftyFlip
public static void applyLeftyFlip(com.mojang.blaze3d.vertex.PoseStack pStack) Applies standard lefty flip to aPoseStack.- 参数:
pStack- ThePoseStackto apply to.
-