Record Class Transform
java.lang.Object
java.lang.Record
dev.engine.core.scene.component.Transform
- All Implemented Interfaces:
Component
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Transformat(float x, float y, float z) static Transformfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Orients to look at a target from current position.moved(float dx, float dy, float dz) Translates by offset (adds to current position).position()Returns the value of thepositionrecord component.Rotates incrementally around an axis.rotatedX(float radians) rotatedY(float radians) rotatedZ(float radians) rotation()Returns the value of therotationrecord component.scale()Returns the value of thescalerecord component.scaledBy(float factor) Multiplies current scale.toMatrix()Computes the 4x4 local transform matrix.final StringtoString()Returns a string representation of this record class.withPosition(float x, float y, float z) withPosition(Vec3 position) withRotation(Quat rotation) withScale(float uniform)
-
Field Details
-
IDENTITY
-
-
Constructor Details
-
Transform
-
-
Method Details
-
at
-
at
-
withPosition
-
withPosition
-
withRotation
-
withScale
-
withScale
-
moved
-
moved
-
rotated
-
rotatedX
-
rotatedY
-
rotatedZ
-
scaledBy
Multiplies current scale. -
lookingAt
-
toMatrix
Computes the 4x4 local transform matrix. -
toString
-
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 withObjects::equals(Object,Object). -
position
Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-
rotation
Returns the value of therotationrecord component.- Returns:
- the value of the
rotationrecord component
-
scale
Returns the value of thescalerecord component.- Returns:
- the value of the
scalerecord component
-