Record Class Float3
java.lang.Object
java.lang.Record
kr.toxicity.model.api.data.Float3
- Record Components:
x- xy- yz- z
A three float value (origin, rotation)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull Float3Converts zxy euler to xyz euler (Minecraft)@NotNull Float3div(float value) Divides floats.booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.@NotNull Float3invertXZ()Inverts XZ@NotNull Float3Subtracts other floats.@NotNull Float3Adds other floats.@NotNull Float3rotate(@NotNull org.joml.Quaternionf quaternionf) Rotates this float@NotNull Float3times(float value) Multiplies floats.@NotNull Float3Converts item model scale to block scale@NotNull com.google.gson.JsonArraytoJson()Converts floats to JSON array.@NotNull org.joml.Quaternionf@NotNull org.joml.Quaternionf@NotNull StringtoString()Returns a string representation of this record class.@NotNull org.joml.Vector3ftoVector()Converts floats to vector.floatx()Returns the value of thexrecord component.floaty()Returns the value of theyrecord component.floatz()Returns the value of thezrecord component.
-
Field Details
-
CENTER
Center -
ZERO
Zero -
MESH_TRIANGLE_FROM
-
MESH_TRIANGLE_TO
-
PARSER
Parser
-
-
Constructor Details
-
Float3
public Float3(float value) Creates floats- Parameters:
value- scala
-
Float3
-
-
Method Details
-
plus
-
convertToMinecraftDegree
Converts zxy euler to xyz euler (Minecraft)- Returns:
- new float
-
rotate
Rotates this float- Parameters:
quaternionf- rotation- Returns:
- new float
-
minus
-
toBlockScale
Converts item model scale to block scale- Returns:
- block
-
times
Multiplies floats.- Parameters:
value- multiplier- Returns:
- new floats
-
div
Divides floats.- Parameters:
value- multiplier- Returns:
- new floats
-
invertXZ
-
toJson
@NotNull public @NotNull com.google.gson.JsonArray toJson()Converts floats to JSON array.- Returns:
- json array
-
toQuaternionZYX
@NotNull public @NotNull org.joml.Quaternionf toQuaternionZYX() -
toQuaternionXYZ
@NotNull public @NotNull org.joml.Quaternionf toQuaternionXYZ() -
toVector
@NotNull public @NotNull org.joml.Vector3f toVector()Converts floats to vector.- Returns:
- vector
-
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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
toString
-
x
-
y
-
z
-