Skip to content

Package com.mojang.math

Part 1/1


Axis

  • Full name: com.mojang.math.Axis
  • Package: com.mojang.math
  • Source: commoncom/mojang/math/Axis.java
  • Type: interface
  • Modifiers: public

com.mojang.math.Axis#of(Vector3f)

  • Origin: common
  • Source: com/mojang/math/Axis.java:15
  • Modifiers: static
  • Return: Axis

คืออะไร

ดำเนินการ of ตาม implementation ของ Axis

ทำงานยังไง

เรียกต่อ: rotationAxis(). สร้างออบเจ็กต์: Quaternionf. คืนค่า: f -> new Quaternionf().rotationAxis(f, vector3f).

Parameters

  • Vector3f vector3f

ตัวอย่างใช้งาน

Vector3f vector3f = ...;
Axis result = Axis.of(vector3f);

com.mojang.math.Axis#rotation(float)

  • Origin: common
  • Source: com/mojang/math/Axis.java:19
  • Modifiers: ``
  • Return: Quaternionf

คืออะไร

ดำเนินการ rotation ตาม implementation ของ Axis

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • float f

ตัวอย่างใช้งาน

Axis instance = ...;
Quaternionf result = instance.rotation(0.0F);

com.mojang.math.Axis#rotationDegrees(float)

  • Origin: common
  • Source: com/mojang/math/Axis.java:21
  • Modifiers: default
  • Return: Quaternionf

คืออะไร

ดำเนินการ rotationDegrees ตาม implementation ของ Axis

ทำงานยังไง

เรียกต่อ: rotation(). คืนค่า: this.rotation(f * (float) (Math.PI / 180.0)).

Parameters

  • float f

ตัวอย่างใช้งาน

Axis instance = ...;
Quaternionf result = instance.rotationDegrees(0.0F);

Divisor

  • Full name: com.mojang.math.Divisor
  • Package: com.mojang.math
  • Source: commoncom/mojang/math/Divisor.java
  • Type: class
  • Modifiers: public
  • Implements: IntIterator

com.mojang.math.Divisor#asIterable(int,int)

  • Origin: common
  • Source: com/mojang/math/Divisor.java:47
  • Modifiers: public static
  • Return: Iterable<Integer>

คืออะไร

ดำเนินการ asIterable ตาม implementation ของ Divisor

ทำงานยังไง

สร้างออบเจ็กต์: Divisor. คืนค่า: () -> new Divisor(i, j).

Parameters

  • int i
  • int j

ตัวอย่างใช้งาน

Iterable<Integer> result = Divisor.asIterable(0, 0);

com.mojang.math.Divisor#Divisor(int,int)

  • Origin: common
  • Source: com/mojang/math/Divisor.java:14
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ Divisor ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: denominator, quotient, mod.

Parameters

  • int i
  • int j

ตัวอย่างใช้งาน

Divisor instance = new Divisor(0, 0);

com.mojang.math.Divisor#hasNext()

  • Origin: common
  • Source: com/mojang/math/Divisor.java:25
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Next

ทำงานยังไง

คืนค่า: this.returnedParts < this.denominator.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Divisor instance = ...;
boolean result = instance.hasNext();

com.mojang.math.Divisor#nextInt()

  • Origin: common
  • Source: com/mojang/math/Divisor.java:30
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ nextInt ตาม implementation ของ Divisor

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: remainder, returnedParts. เรียกต่อ: hasNext(). สร้างออบเจ็กต์: NoSuchElementException. คืนค่า: i.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Divisor instance = ...;
int result = instance.nextInt();

GivensParameters

  • Full name: com.mojang.math.GivensParameters
  • Package: com.mojang.math
  • Source: commoncom/mojang/math/GivensParameters.java
  • Type: record
  • Modifiers: public

com.mojang.math.GivensParameters#aroundX(Matrix3f)

  • Origin: common
  • Source: com/mojang/math/GivensParameters.java:43
  • Modifiers: public
  • Return: Matrix3f

คืออะไร

ดำเนินการ aroundX ตาม implementation ของ GivensParameters

ทำงานยังไง

เรียกต่อ: cos(), sin(). คืนค่า: matrix3f.

Parameters

  • Matrix3f matrix3f

ตัวอย่างใช้งาน

GivensParameters instance = ...;
Matrix3f matrix3f = ...;
Matrix3f result = instance.aroundX(matrix3f);

com.mojang.math.GivensParameters#aroundX(Quaternionf)

  • Origin: common
  • Source: com/mojang/math/GivensParameters.java:23
  • Modifiers: public
  • Return: Quaternionf

คืออะไร

ดำเนินการ aroundX ตาม implementation ของ GivensParameters

ทำงานยังไง

เรียกต่อ: set(). คืนค่า: quaternionf.set(this.sinHalf, 0.0F, 0.0F, this.cosHalf).

Parameters

  • Quaternionf quaternionf

ตัวอย่างใช้งาน

GivensParameters instance = ...;
Quaternionf quaternionf = ...;
Quaternionf result = instance.aroundX(quaternionf);

com.mojang.math.GivensParameters#aroundY(Matrix3f)

  • Origin: common
  • Source: com/mojang/math/GivensParameters.java:58
  • Modifiers: public
  • Return: Matrix3f

คืออะไร

ดำเนินการ aroundY ตาม implementation ของ GivensParameters

ทำงานยังไง

เรียกต่อ: cos(), sin(). คืนค่า: matrix3f.

Parameters

  • Matrix3f matrix3f

ตัวอย่างใช้งาน

GivensParameters instance = ...;
Matrix3f matrix3f = ...;
Matrix3f result = instance.aroundY(matrix3f);

com.mojang.math.GivensParameters#aroundY(Quaternionf)

  • Origin: common
  • Source: com/mojang/math/GivensParameters.java:27
  • Modifiers: public
  • Return: Quaternionf

คืออะไร

ดำเนินการ aroundY ตาม implementation ของ GivensParameters

ทำงานยังไง

เรียกต่อ: set(). คืนค่า: quaternionf.set(0.0F, this.sinHalf, 0.0F, this.cosHalf).

Parameters

  • Quaternionf quaternionf

ตัวอย่างใช้งาน

GivensParameters instance = ...;
Quaternionf quaternionf = ...;
Quaternionf result = instance.aroundY(quaternionf);

com.mojang.math.GivensParameters#aroundZ(Matrix3f)

  • Origin: common
  • Source: com/mojang/math/GivensParameters.java:73
  • Modifiers: public
  • Return: Matrix3f

คืออะไร

ดำเนินการ aroundZ ตาม implementation ของ GivensParameters

ทำงานยังไง

เรียกต่อ: cos(), sin(). คืนค่า: matrix3f.

Parameters

  • Matrix3f matrix3f

ตัวอย่างใช้งาน

GivensParameters instance = ...;
Matrix3f matrix3f = ...;
Matrix3f result = instance.aroundZ(matrix3f);

com.mojang.math.GivensParameters#aroundZ(Quaternionf)

  • Origin: common
  • Source: com/mojang/math/GivensParameters.java:31
  • Modifiers: public
  • Return: Quaternionf

คืออะไร

ดำเนินการ aroundZ ตาม implementation ของ GivensParameters

ทำงานยังไง

เรียกต่อ: set(). คืนค่า: quaternionf.set(0.0F, 0.0F, this.sinHalf, this.cosHalf).

Parameters

  • Quaternionf quaternionf

ตัวอย่างใช้งาน

GivensParameters instance = ...;
Quaternionf quaternionf = ...;
Quaternionf result = instance.aroundZ(quaternionf);

com.mojang.math.GivensParameters#cos()

  • Origin: common
  • Source: com/mojang/math/GivensParameters.java:35
  • Modifiers: public
  • Return: float

คืออะไร

ดำเนินการ cos ตาม implementation ของ GivensParameters

ทำงานยังไง

คืนค่า: this.cosHalf * this.cosHalf - this.sinHalf * this.sinHalf.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

GivensParameters instance = ...;
float result = instance.cos();

com.mojang.math.GivensParameters#fromPositiveAngle(float)

  • Origin: common
  • Source: com/mojang/math/GivensParameters.java:13
  • Modifiers: public static
  • Return: GivensParameters

คืออะไร

ดำเนินการ fromPositiveAngle ตาม implementation ของ GivensParameters

ทำงานยังไง

เรียกต่อ: sin(), cosFromSin(). สร้างออบเจ็กต์: GivensParameters. คืนค่า: new GivensParameters(g, h).

Parameters

  • float f

ตัวอย่างใช้งาน

GivensParameters result = GivensParameters.fromPositiveAngle(0.0F);

com.mojang.math.GivensParameters#fromUnnormalized(float,float)

  • Origin: common
  • Source: com/mojang/math/GivensParameters.java:8
  • Modifiers: public static
  • Return: GivensParameters

คืออะไร

ดำเนินการ fromUnnormalized ตาม implementation ของ GivensParameters

ทำงานยังไง

เรียกต่อ: invsqrt(). สร้างออบเจ็กต์: GivensParameters. คืนค่า: new GivensParameters(h * f, h * g).

Parameters

  • float f
  • float g

ตัวอย่างใช้งาน

GivensParameters result = GivensParameters.fromUnnormalized(0.0F, 0.0F);

com.mojang.math.GivensParameters#inverse()

  • Origin: common
  • Source: com/mojang/math/GivensParameters.java:19
  • Modifiers: public
  • Return: GivensParameters

คืออะไร

ดำเนินการ inverse ตาม implementation ของ GivensParameters

ทำงานยังไง

สร้างออบเจ็กต์: GivensParameters. คืนค่า: new GivensParameters(-this.sinHalf, this.cosHalf).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

GivensParameters instance = ...;
GivensParameters result = instance.inverse();

com.mojang.math.GivensParameters#sin()

  • Origin: common
  • Source: com/mojang/math/GivensParameters.java:39
  • Modifiers: public
  • Return: float

คืออะไร

ดำเนินการ sin ตาม implementation ของ GivensParameters

ทำงานยังไง

คืนค่า: 2.0F * this.sinHalf * this.cosHalf.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

GivensParameters instance = ...;
float result = instance.sin();

MatrixUtil

  • Full name: com.mojang.math.MatrixUtil
  • Package: com.mojang.math
  • Source: commoncom/mojang/math/MatrixUtil.java
  • Type: class
  • Modifiers: public

com.mojang.math.MatrixUtil#eigenvalueJacobi(Matrix3f,int)

  • Origin: common
  • Source: com/mojang/math/MatrixUtil.java:90
  • Modifiers: public static
  • Return: Quaternionf

คืออะไร

ดำเนินการ eigenvalueJacobi ตาม implementation ของ MatrixUtil

ทำงานยังไง

มีการวนลูป. เรียกต่อ: stepJacobi(), normalize(). สร้างออบเจ็กต์: Quaternionf, Matrix3f. คืนค่า: quaternionf.

Parameters

  • Matrix3f matrix3f
  • int i

ตัวอย่างใช้งาน

Matrix3f matrix3f = ...;
Quaternionf result = MatrixUtil.eigenvalueJacobi(matrix3f, 0);

com.mojang.math.MatrixUtil#isIdentity(Matrix4f)

  • Origin: common
  • Source: com/mojang/math/MatrixUtil.java:154
  • Modifiers: public static
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Identity

ทำงานยังไง

เรียกต่อ: properties(). คืนค่า: (matrix4f.properties() & 4) != 0.

Parameters

  • Matrix4f matrix4f

ตัวอย่างใช้งาน

Matrix4f matrix4f = ...;
boolean result = MatrixUtil.isIdentity(matrix4f);

com.mojang.math.MatrixUtil#isOrthonormal(Matrix4f)

  • Origin: common
  • Source: com/mojang/math/MatrixUtil.java:162
  • Modifiers: public static
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Orthonormal

ทำงานยังไง

เรียกต่อ: properties(). คืนค่า: (matrix4f.properties() & 16) != 0.

Parameters

  • Matrix4f matrix4f

ตัวอย่างใช้งาน

Matrix4f matrix4f = ...;
boolean result = MatrixUtil.isOrthonormal(matrix4f);

com.mojang.math.MatrixUtil#isPureTranslation(Matrix4f)

  • Origin: common
  • Source: com/mojang/math/MatrixUtil.java:158
  • Modifiers: public static
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Pure Translation

ทำงานยังไง

เรียกต่อ: properties(). คืนค่า: (matrix4f.properties() & 8) != 0.

Parameters

  • Matrix4f matrix4f

ตัวอย่างใช้งาน

Matrix4f matrix4f = ...;
boolean result = MatrixUtil.isPureTranslation(matrix4f);

com.mojang.math.MatrixUtil#mulComponentWise(Matrix4f,float)

  • Origin: common
  • Source: com/mojang/math/MatrixUtil.java:17
  • Modifiers: public static
  • Return: Matrix4f

คืออะไร

ดำเนินการ mulComponentWise ตาม implementation ของ MatrixUtil

ทำงานยังไง

เรียกต่อ: set(), m00(), m01(), m02(), m03(), m10(), m11(), m12().

Parameters

  • Matrix4f matrix4f
  • float f

ตัวอย่างใช้งาน

Matrix4f matrix4f = ...;
Matrix4f result = MatrixUtil.mulComponentWise(matrix4f, 0.0F);

com.mojang.math.MatrixUtil#svdDecompose(Matrix3f)

  • Origin: common
  • Source: com/mojang/math/MatrixUtil.java:103
  • Modifiers: public static
  • Return: Triple<Quaternionf, Vector3f, Quaternionf>

คืออะไร

ดำเนินการ svdDecompose ตาม implementation ของ MatrixUtil

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: transpose(), mul(), eigenvalueJacobi(), rotate(), qrGivensQuat(), aroundZ(), inverse(), aroundY(). สร้างออบเจ็กต์: Matrix3f, Quaternionf, Vector3f. คืนค่า: Triple.of(quaternionf2, vector3f, quaternionf.conjugate()).

Parameters

  • Matrix3f matrix3f

ตัวอย่างใช้งาน

Matrix3f matrix3f = ...;
Triple<Quaternionf, Vector3f, Quaternionf> result = MatrixUtil.svdDecompose(matrix3f);

OctahedralGroup

  • Full name: com.mojang.math.OctahedralGroup
  • Package: com.mojang.math
  • Source: commoncom/mojang/math/OctahedralGroup.java
  • Type: enum
  • Modifiers: public
  • Implements: StringRepresentable

com.mojang.math.OctahedralGroup#compose(OctahedralGroup)

  • Origin: common
  • Source: com/mojang/math/OctahedralGroup.java:117
  • Modifiers: public
  • Return: OctahedralGroup

คืออะไร

ดำเนินการ compose ตาม implementation ของ OctahedralGroup

ทำงานยังไง

เรียกต่อ: ordinal(). คืนค่า: cayleyTable[this.ordinal()][octahedralGroup.ordinal()].

Parameters

  • OctahedralGroup octahedralGroup

ตัวอย่างใช้งาน

OctahedralGroup instance = ...;
OctahedralGroup octahedralGroup = ...;
OctahedralGroup result = instance.compose(octahedralGroup);

com.mojang.math.OctahedralGroup#getSerializedName()

  • Origin: common
  • Source: com/mojang/math/OctahedralGroup.java:134
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Serialized Name

ทำงานยังไง

คืนค่า: this.name.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

OctahedralGroup instance = ...;
String result = instance.getSerializedName();

com.mojang.math.OctahedralGroup#inverse()

  • Origin: common
  • Source: com/mojang/math/OctahedralGroup.java:121
  • Modifiers: public
  • Return: OctahedralGroup

คืออะไร

ดำเนินการ inverse ตาม implementation ของ OctahedralGroup

ทำงานยังไง

เรียกต่อ: ordinal(). คืนค่า: inverseTable[this.ordinal()].

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

OctahedralGroup instance = ...;
OctahedralGroup result = instance.inverse();

com.mojang.math.OctahedralGroup#inverts(Direction.Axis)

  • Origin: common
  • Source: com/mojang/math/OctahedralGroup.java:157
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ inverts ตาม implementation ของ OctahedralGroup

ทำงานยังไง

แยกกรณีด้วย switch. มีจุด return อย่างน้อย 3 จุด.

Parameters

  • Direction.Axis axis

ตัวอย่างใช้งาน

OctahedralGroup instance = ...;
Direction.Axis axis = ...;
boolean result = instance.inverts(axis);

com.mojang.math.OctahedralGroup#rotate(Direction)

  • Origin: common
  • Source: com/mojang/math/OctahedralGroup.java:139
  • Modifiers: public
  • Return: Direction

คืออะไร

หมุน rotate

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: rotatedDirections. เรียกต่อ: newEnumMap(), values(), getAxis(), getAxisDirection(), permutation(), ordinal(), inverts(), opposite(). คืนค่า: this.rotatedDirections.get(direction).

Parameters

  • Direction direction

ตัวอย่างใช้งาน

OctahedralGroup instance = ...;
Direction direction = ...;
Direction result = instance.rotate(direction);

com.mojang.math.OctahedralGroup#rotate(FrontAndTop)

  • Origin: common
  • Source: com/mojang/math/OctahedralGroup.java:169
  • Modifiers: public
  • Return: FrontAndTop

คืออะไร

หมุน rotate

ทำงานยังไง

เรียกต่อ: fromFrontAndTop(), front(), top(). คืนค่า: FrontAndTop.fromFrontAndTop(this.rotate(frontAndTop.front()), this.rotate(frontAndTop.top())).

Parameters

  • FrontAndTop frontAndTop

ตัวอย่างใช้งาน

OctahedralGroup instance = ...;
FrontAndTop frontAndTop = ...;
FrontAndTop result = instance.rotate(frontAndTop);

com.mojang.math.OctahedralGroup#toString()

  • Origin: common
  • Source: com/mojang/math/OctahedralGroup.java:129
  • Modifiers: public
  • Return: String

คืออะไร

ดำเนินการ toString ตาม implementation ของ OctahedralGroup

ทำงานยังไง

คืนค่า: this.name.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

OctahedralGroup instance = ...;
String result = instance.toString();

com.mojang.math.OctahedralGroup#transformation()

  • Origin: common
  • Source: com/mojang/math/OctahedralGroup.java:125
  • Modifiers: public
  • Return: Matrix3f

คืออะไร

ดำเนินการ transformation ตาม implementation ของ OctahedralGroup

ทำงานยังไง

สร้างออบเจ็กต์: Matrix3f. คืนค่า: new Matrix3f(this.transformation).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

OctahedralGroup instance = ...;
Matrix3f result = instance.transformation();

SymmetricGroup3

  • Full name: com.mojang.math.SymmetricGroup3
  • Package: com.mojang.math
  • Source: commoncom/mojang/math/SymmetricGroup3.java
  • Type: enum
  • Modifiers: public

com.mojang.math.SymmetricGroup3#compose(SymmetricGroup3)

  • Origin: common
  • Source: com/mojang/math/SymmetricGroup3.java:41
  • Modifiers: public
  • Return: SymmetricGroup3

คืออะไร

ดำเนินการ compose ตาม implementation ของ SymmetricGroup3

ทำงานยังไง

เรียกต่อ: ordinal(). คืนค่า: cayleyTable[this.ordinal()][symmetricGroup3.ordinal()].

Parameters

  • SymmetricGroup3 symmetricGroup3

ตัวอย่างใช้งาน

SymmetricGroup3 instance = ...;
SymmetricGroup3 symmetricGroup3 = ...;
SymmetricGroup3 result = instance.compose(symmetricGroup3);

com.mojang.math.SymmetricGroup3#permutation(int)

  • Origin: common
  • Source: com/mojang/math/SymmetricGroup3.java:45
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ permutation ตาม implementation ของ SymmetricGroup3

ทำงานยังไง

คืนค่า: this.permutation[i].

Parameters

  • int i

ตัวอย่างใช้งาน

SymmetricGroup3 instance = ...;
int result = instance.permutation(0);

com.mojang.math.SymmetricGroup3#transformation()

  • Origin: common
  • Source: com/mojang/math/SymmetricGroup3.java:49
  • Modifiers: public
  • Return: Matrix3f

คืออะไร

ดำเนินการ transformation ตาม implementation ของ SymmetricGroup3

ทำงานยังไง

คืนค่า: this.transformation.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SymmetricGroup3 instance = ...;
Matrix3f result = instance.transformation();

Transformation

  • Full name: com.mojang.math.Transformation
  • Package: com.mojang.math
  • Source: commoncom/mojang/math/Transformation.java
  • Type: class
  • Modifiers: public final

com.mojang.math.Transformation#compose(Transformation)

  • Origin: common
  • Source: com/mojang/math/Transformation.java:69
  • Modifiers: public
  • Return: Transformation

คืออะไร

ดำเนินการ compose ตาม implementation ของ Transformation

ทำงานยังไง

เรียกต่อ: getMatrix(), mul(). สร้างออบเจ็กต์: Transformation. คืนค่า: new Transformation(matrix4f).

Parameters

  • Transformation transformation

ตัวอย่างใช้งาน

Transformation instance = ...;
Transformation transformation = ...;
Transformation result = instance.compose(transformation);

com.mojang.math.Transformation#equals(Object)

  • Origin: common
  • Source: com/mojang/math/Transformation.java:144
  • Modifiers: public
  • Return: boolean

คืออะไร

เปรียบเทียบความเท่ากัน equals

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getClass(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • Object object

ตัวอย่างใช้งาน

Transformation instance = ...;
Object object = ...;
boolean result = instance.equals(object);

com.mojang.math.Transformation#getLeftRotation()

  • Origin: common
  • Source: com/mojang/math/Transformation.java:129
  • Modifiers: public
  • Return: Quaternionf

คืออะไร

อ่านค่า Left Rotation

ทำงานยังไง

เรียกต่อ: ensureDecomposed(). สร้างออบเจ็กต์: Quaternionf. คืนค่า: new Quaternionf(this.leftRotation).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Transformation instance = ...;
Quaternionf result = instance.getLeftRotation();

com.mojang.math.Transformation#getMatrix()

  • Origin: common
  • Source: com/mojang/math/Transformation.java:120
  • Modifiers: public
  • Return: Matrix4f

คืออะไร

อ่านค่า Matrix

ทำงานยังไง

สร้างออบเจ็กต์: Matrix4f. คืนค่า: new Matrix4f(this.matrix).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Transformation instance = ...;
Matrix4f result = instance.getMatrix();

com.mojang.math.Transformation#getRightRotation()

  • Origin: common
  • Source: com/mojang/math/Transformation.java:139
  • Modifiers: public
  • Return: Quaternionf

คืออะไร

อ่านค่า Right Rotation

ทำงานยังไง

เรียกต่อ: ensureDecomposed(). สร้างออบเจ็กต์: Quaternionf. คืนค่า: new Quaternionf(this.rightRotation).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Transformation instance = ...;
Quaternionf result = instance.getRightRotation();

com.mojang.math.Transformation#getScale()

  • Origin: common
  • Source: com/mojang/math/Transformation.java:134
  • Modifiers: public
  • Return: Vector3f

คืออะไร

อ่านค่า Scale

ทำงานยังไง

เรียกต่อ: ensureDecomposed(). สร้างออบเจ็กต์: Vector3f. คืนค่า: new Vector3f(this.scale).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Transformation instance = ...;
Vector3f result = instance.getScale();

com.mojang.math.Transformation#getTranslation()

  • Origin: common
  • Source: com/mojang/math/Transformation.java:124
  • Modifiers: public
  • Return: Vector3f

คืออะไร

อ่านค่า Translation

ทำงานยังไง

เรียกต่อ: ensureDecomposed(). สร้างออบเจ็กต์: Vector3f. คืนค่า: new Vector3f(this.translation).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Transformation instance = ...;
Vector3f result = instance.getTranslation();

com.mojang.math.Transformation#hashCode()

  • Origin: common
  • Source: com/mojang/math/Transformation.java:156
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ hashCode ตาม implementation ของ Transformation

ทำงานยังไง

เรียกต่อ: hash(). คืนค่า: Objects.hash(this.matrix).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Transformation instance = ...;
int result = instance.hashCode();

com.mojang.math.Transformation#identity()

  • Origin: common
  • Source: com/mojang/math/Transformation.java:65
  • Modifiers: public static
  • Return: Transformation

คืออะไร

ดำเนินการ identity ตาม implementation ของ Transformation

ทำงานยังไง

คืนค่า: IDENTITY.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Transformation result = Transformation.identity();

com.mojang.math.Transformation#inverse()

  • Origin: common
  • Source: com/mojang/math/Transformation.java:75
  • Modifiers: public
  • Return: Transformation

คืออะไร

ดำเนินการ inverse ตาม implementation ของ Transformation

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getMatrix(), invert(), isFinite(). สร้างออบเจ็กต์: Transformation. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Transformation instance = ...;
Transformation result = instance.inverse();

com.mojang.math.Transformation#slerp(Transformation,float)

  • Origin: common
  • Source: com/mojang/math/Transformation.java:161
  • Modifiers: public
  • Return: Transformation

คืออะไร

ดำเนินการ slerp ตาม implementation ของ Transformation

ทำงานยังไง

เรียกต่อ: getTranslation(), getLeftRotation(), getScale(), getRightRotation(), lerp(). สร้างออบเจ็กต์: Transformation. คืนค่า: new Transformation(vector3f, quaternionf, vector3f2, quaternionf2).

Parameters

  • Transformation transformation
  • float f

ตัวอย่างใช้งาน

Transformation instance = ...;
Transformation transformation = ...;
Transformation result = instance.slerp(transformation, 0.0F);

com.mojang.math.Transformation#Transformation(Matrix4f)

  • Origin: common
  • Source: com/mojang/math/Transformation.java:48
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ Transformation ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: matrix. สร้างออบเจ็กต์: Matrix4f.

Parameters

  • Matrix4f matrix4f

ตัวอย่างใช้งาน

Matrix4f matrix4f = ...;
Transformation instance = new Transformation(matrix4f);

com.mojang.math.Transformation#Transformation(Vector3f,Quaternionf,Vector3f,Quaternionf)

  • Origin: common
  • Source: com/mojang/math/Transformation.java:56
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ Transformation ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: matrix, translation, leftRotation, scale, rightRotation, decomposed. เรียกต่อ: compose(). สร้างออบเจ็กต์: Vector3f, Quaternionf.

Parameters

  • Vector3f vector3f
  • Quaternionf quaternionf
  • Vector3f vector3f2
  • Quaternionf quaternionf2

ตัวอย่างใช้งาน

Vector3f vector3f = ...;
Quaternionf quaternionf = ...;
Vector3f vector3f2 = ...;
Quaternionf quaternionf2 = ...;
Transformation instance = new Transformation(vector3f, quaternionf, vector3f2, quaternionf2);