Class Vector3
java.lang.Object
pl.AWTGameEngine.objects.transform.Vector3
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddNotifyExcludeComponent(ObjectComponent component) voidclear()clone()static Vector3createForwardVector(Vector3 rotation) deserialize(String values) doubledistanceTo(Vector3 vector3) booleanfromPhysX(physx.common.PxVec3 pxVec3) doublegetX()doublegetY()doublegetZ()inthashCode()booleanisEmpty()voidlock()set(double x, double y, double z) voidsetNotifyAction(Consumer<List<ObjectComponent>> action) Notify action is executed every time a Vector3 is updated.setX(double x) setY(double y) setZ(double z) toString()voidunlock()
-
Constructor Details
-
Vector3
public Vector3() -
Vector3
public Vector3(double x) -
Vector3
public Vector3(double x, double y) -
Vector3
public Vector3(double x, double y, double z)
-
-
Method Details
-
lock
public void lock() -
unlock
public void unlock() -
clone
-
clear
public void clear() -
getX
public double getX() -
getY
public double getY() -
getZ
public double getZ() -
setX
-
setY
-
setZ
-
set
-
add
-
toString
-
toSimpleString
-
deserializeFromToString
-
deserialize
-
distanceTo
-
isEmpty
public boolean isEmpty() -
equals
-
hashCode
-
fromPhysX
-
createForwardVector
-
normalize
-
getNotifyAction
-
setNotifyAction
Notify action is executed every time a Vector3 is updated. By doing this, you can just simply useset(double, double, double),setX(double)etc., and ensure that you will get notified on Vector3 update. To execute action yourself, use:
Or instead of passing null, you can pass the list of ObjectComponent. For example, you can pass the list of excluded components from notify (e.g. to prevent notify of the same component).myVector3Instance.getNotifyAction().accept(null);- Parameters:
action- Action to be performed
-
addNotifyExcludeComponent
-