Class PointF3

java.lang.Object
com.badlogic.gdx.math.Vector3
com.github.tommyettinger.gand.points.PointF3
All Implemented Interfaces:
com.badlogic.gdx.math.Vector<com.badlogic.gdx.math.Vector3>, com.badlogic.gdx.utils.Json.Serializable, com.github.tommyettinger.crux.Point3<PointF3>, com.github.tommyettinger.crux.PointN<PointF3>, Serializable

public class PointF3 extends com.badlogic.gdx.math.Vector3 implements com.github.tommyettinger.crux.Point3<PointF3>, com.badlogic.gdx.utils.Json.Serializable
The same as Vector3, just implementing Point3 and Json.Serializable.
See Also:
  • Field Summary

    Fields inherited from class com.badlogic.gdx.math.Vector3

    x, X, y, Y, z, Z, Zero
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    PointF3(float x, float y, float z)
     
    PointF3(com.badlogic.gdx.math.GridPoint3 v)
     
    PointF3(com.badlogic.gdx.math.Vector3 v)
     
    PointF3(com.github.tommyettinger.crux.Point3<? extends com.github.tommyettinger.crux.Point3<?>> v)
     
     
  • Method Summary

    Modifier and Type
    Method
    Description
    add(PointF3 point)
     
    cpy()
     
    float
    dst(PointF3 point)
     
    float
    dst2(PointF3 point)
     
    boolean
    Returns true if this type of point uses float or double for its components, or false otherwise.
    Sets this PointF3 to the value represented by the specified string according to the format of toString().
    int
     
    void
    read(com.badlogic.gdx.utils.Json json, com.badlogic.gdx.utils.JsonValue jsonData)
     
    scl(PointF3 point)
     
    set(float x, float y, float z)
     
    set(PointF3 point)
     
     
    sub(PointF3 point)
     
    Converts this PointF3 to a string in the format (x,y,z).
    void
    write(com.badlogic.gdx.utils.Json json)
     
    float
    x()
     
    x(float next)
     
    float
    y()
     
    y(float next)
     
    float
    z()
     
    z(float next)
     

    Methods inherited from class com.badlogic.gdx.math.Vector3

    add, add, add, clamp, crs, crs, dot, dot, dot, dst, dst, dst, dst2, dst2, dst2, epsilonEquals, epsilonEquals, epsilonEquals, epsilonEquals, equals, hasOppositeDirection, hasSameDirection, idt, interpolate, isCollinear, isCollinear, isCollinearOpposite, isCollinearOpposite, isOnLine, isOnLine, isPerpendicular, isPerpendicular, isUnit, isUnit, isZero, isZero, len, len, len2, len2, lerp, limit, limit2, mul, mul, mul, mul4x3, mulAdd, mulAdd, nor, prj, rot, rotate, rotate, rotateRad, rotateRad, scl, scl, scl, set, set, set, setFromSpherical, setLength, setLength2, setToRandomDirection, slerp, sub, sub, sub, traMul, traMul, unrotate, untransform

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.github.tommyettinger.crux.Point3

    rank

    Methods inherited from interface com.github.tommyettinger.crux.PointN

    isUnit, isUnit, isZero, isZero, len, len2, mutable
  • Constructor Details

    • PointF3

      public PointF3()
    • PointF3

      public PointF3(float x, float y, float z)
    • PointF3

      public PointF3(com.badlogic.gdx.math.Vector3 v)
    • PointF3

      public PointF3(com.badlogic.gdx.math.GridPoint3 v)
    • PointF3

      public PointF3(PointF3 v)
    • PointF3

      public PointF3(com.github.tommyettinger.crux.Point3<? extends com.github.tommyettinger.crux.Point3<?>> v)
  • Method Details

    • floatingPoint

      public boolean floatingPoint()
      Returns true if this type of point uses float or double for its components, or false otherwise. This always returns true.
      Specified by:
      floatingPoint in interface com.github.tommyettinger.crux.PointN<PointF3>
      Returns:
      true
    • cpy

      public PointF3 cpy()
      Specified by:
      cpy in interface com.github.tommyettinger.crux.PointN<PointF3>
      Specified by:
      cpy in interface com.badlogic.gdx.math.Vector<com.badlogic.gdx.math.Vector3>
      Overrides:
      cpy in class com.badlogic.gdx.math.Vector3
    • set

      public PointF3 set(PointF3 point)
      Specified by:
      set in interface com.github.tommyettinger.crux.PointN<PointF3>
    • sub

      public PointF3 sub(PointF3 point)
      Specified by:
      sub in interface com.github.tommyettinger.crux.PointN<PointF3>
    • add

      public PointF3 add(PointF3 point)
      Specified by:
      add in interface com.github.tommyettinger.crux.PointN<PointF3>
    • scl

      public PointF3 scl(PointF3 point)
      Specified by:
      scl in interface com.github.tommyettinger.crux.PointN<PointF3>
    • dst

      public float dst(PointF3 point)
      Specified by:
      dst in interface com.github.tommyettinger.crux.PointN<PointF3>
    • dst2

      public float dst2(PointF3 point)
      Specified by:
      dst2 in interface com.github.tommyettinger.crux.PointN<PointF3>
    • setZero

      public PointF3 setZero()
      Specified by:
      setZero in interface com.github.tommyettinger.crux.PointN<PointF3>
      Specified by:
      setZero in interface com.badlogic.gdx.math.Vector<com.badlogic.gdx.math.Vector3>
      Overrides:
      setZero in class com.badlogic.gdx.math.Vector3
    • x

      public float x()
      Specified by:
      x in interface com.github.tommyettinger.crux.Point3<PointF3>
    • x

      public PointF3 x(float next)
      Specified by:
      x in interface com.github.tommyettinger.crux.Point3<PointF3>
    • y

      public float y()
      Specified by:
      y in interface com.github.tommyettinger.crux.Point3<PointF3>
    • y

      public PointF3 y(float next)
      Specified by:
      y in interface com.github.tommyettinger.crux.Point3<PointF3>
    • z

      public float z()
      Specified by:
      z in interface com.github.tommyettinger.crux.Point3<PointF3>
    • z

      public PointF3 z(float next)
      Specified by:
      z in interface com.github.tommyettinger.crux.Point3<PointF3>
    • set

      public PointF3 set(float x, float y, float z)
      Specified by:
      set in interface com.github.tommyettinger.crux.Point3<PointF3>
      Overrides:
      set in class com.badlogic.gdx.math.Vector3
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class com.badlogic.gdx.math.Vector3
    • write

      public void write(com.badlogic.gdx.utils.Json json)
      Specified by:
      write in interface com.badlogic.gdx.utils.Json.Serializable
    • read

      public void read(com.badlogic.gdx.utils.Json json, com.badlogic.gdx.utils.JsonValue jsonData)
      Specified by:
      read in interface com.badlogic.gdx.utils.Json.Serializable
    • toString

      public String toString()
      Converts this PointF3 to a string in the format (x,y,z).
      Overrides:
      toString in class com.badlogic.gdx.math.Vector3
      Returns:
      a string representation of this object.
    • fromString

      public PointF3 fromString(String v)
      Sets this PointF3 to the value represented by the specified string according to the format of toString().
      Overrides:
      fromString in class com.badlogic.gdx.math.Vector3
      Parameters:
      v - the string.
      Returns:
      this vector for chaining