Class Vector3

java.lang.Object
pl.AWTGameEngine.objects.transform.Vector3

public class Vector3 extends Object
  • 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

      public Vector3 clone()
      Overrides:
      clone in class Object
    • clear

      public void clear()
    • getX

      public double getX()
    • getY

      public double getY()
    • getZ

      public double getZ()
    • setX

      public Vector3 setX(double x)
    • setY

      public Vector3 setY(double y)
    • setZ

      public Vector3 setZ(double z)
    • set

      public Vector3 set(double x, double y, double z)
    • add

      public Vector3 add(Vector3 vector3)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toSimpleString

      public String toSimpleString()
    • deserializeFromToString

      public Vector3 deserializeFromToString(String data)
    • deserialize

      public Vector3 deserialize(String values)
    • distanceTo

      public double distanceTo(Vector3 vector3)
    • isEmpty

      public boolean isEmpty()
    • equals

      public boolean equals(Vector3 vector3)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • fromPhysX

      public Vector3 fromPhysX(physx.common.PxVec3 pxVec3)
    • createForwardVector

      public static Vector3 createForwardVector(Vector3 rotation)
    • normalize

      public Vector3 normalize()
    • getNotifyAction

      public Consumer<List<ObjectComponent>> getNotifyAction()
    • setNotifyAction

      public void setNotifyAction(Consumer<List<ObjectComponent>> action)
      Notify action is executed every time a Vector3 is updated. By doing this, you can just simply use set(double, double, double), setX(double) etc., and ensure that you will get notified on Vector3 update. To execute action yourself, use:
       
            myVector3Instance.getNotifyAction().accept(null);
       
       
      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).
      Parameters:
      action - Action to be performed
    • addNotifyExcludeComponent

      public void addNotifyExcludeComponent(ObjectComponent component)