Package codechicken.lib.util
Class VectorUtils
java.lang.Object
codechicken.lib.util.VectorUtils
Created by covers1624 on 4/10/2016.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.core.DirectioncalcNormalSide(Vector3 normal) Calculates the EnumFacing for a given normal.static Vector3calculateNormal(Vector3... vertices) Calculates a normal for the given vertices.static intCalculates the int direction a normal is facing.
-
Constructor Details
-
VectorUtils
public VectorUtils()
-
-
Method Details
-
calculateNormal
Calculates a normal for the given vertices.- Parameters:
vertices- The vertices to calculate a normal for, Expected to be a length of 3.- Returns:
- The normal.
-
findSide
Calculates the int direction a normal is facing.- Parameters:
normal- The normal to calculate from.- Returns:
- The direction the normal is facing.
-
calcNormalSide
Calculates the EnumFacing for a given normal.- Parameters:
normal- The normal to calculate from.- Returns:
- The direction the normal is facing.
-