Class Vector3f

    • Constructor Detail

      • Vector3f

        public Vector3f​(Vector2f v)
      • Vector3f

        public Vector3f​(Vector2f v,
                        double z)
      • Vector3f

        public Vector3f​(Vector2f v,
                        float z)
      • Vector3f

        public Vector3f​(Vector4f v)
      • Vector3f

        public Vector3f​(VectorNf v)
      • Vector3f

        public Vector3f​(double x,
                        double y,
                        double z)
      • Vector3f

        public Vector3f​(float x,
                        float y,
                        float z)
    • Method Detail

      • x

        public float x()
      • y

        public float y()
      • z

        public float z()
      • floorX

        public int floorX()
      • floorY

        public int floorY()
      • floorZ

        public int floorZ()
      • add

        public Vector3f add​(double x,
                            double y,
                            double z)
      • add

        public Vector3f add​(float x,
                            float y,
                            float z)
      • sub

        public Vector3f sub​(double x,
                            double y,
                            double z)
      • sub

        public Vector3f sub​(float x,
                            float y,
                            float z)
      • mul

        public Vector3f mul​(double a)
      • mul

        public Vector3f mul​(double x,
                            double y,
                            double z)
      • mul

        public Vector3f mul​(float x,
                            float y,
                            float z)
      • div

        public Vector3f div​(double a)
      • div

        public Vector3f div​(double x,
                            double y,
                            double z)
      • div

        public Vector3f div​(float x,
                            float y,
                            float z)
      • dot

        public float dot​(Vector3f v)
      • dot

        public float dot​(double x,
                         double y,
                         double z)
      • dot

        public float dot​(float x,
                         float y,
                         float z)
      • project

        public Vector3f project​(double x,
                                double y,
                                double z)
      • project

        public Vector3f project​(float x,
                                float y,
                                float z)
      • cross

        public Vector3f cross​(double x,
                              double y,
                              double z)
      • cross

        public Vector3f cross​(float x,
                              float y,
                              float z)
      • pow

        public Vector3f pow​(double pow)
      • min

        public Vector3f min​(double x,
                            double y,
                            double z)
      • min

        public Vector3f min​(float x,
                            float y,
                            float z)
      • max

        public Vector3f max​(double x,
                            double y,
                            double z)
      • max

        public Vector3f max​(float x,
                            float y,
                            float z)
      • distanceSquared

        public float distanceSquared​(Vector3f v)
      • distanceSquared

        public float distanceSquared​(double x,
                                     double y,
                                     double z)
      • distanceSquared

        public float distanceSquared​(float x,
                                     float y,
                                     float z)
      • distance

        public float distance​(Vector3f v)
      • distance

        public float distance​(double x,
                              double y,
                              double z)
      • distance

        public float distance​(float x,
                              float y,
                              float z)
      • length

        public float length()
        Specified by:
        length in interface Vectorf
      • minAxis

        public int minAxis()
        Returns the axis with the minimal value.
        Specified by:
        minAxis in interface Vectorf
        Returns:
        int axis with minimal value
      • maxAxis

        public int maxAxis()
        Returns the axis with the maximum value.
        Specified by:
        maxAxis in interface Vectorf
        Returns:
        int axis with maximum value
      • toVector2

        public Vector2f toVector2()
      • toVector2

        public Vector2f toVector2​(boolean useZ)
      • toVector4

        public Vector4f toVector4()
      • toVector4

        public Vector4f toVector4​(double w)
      • toVector4

        public Vector4f toVector4​(float w)
      • toVectorN

        public VectorNf toVectorN()
      • toArray

        public float[] toArray()
        Specified by:
        toArray in interface Vectorf
      • hashCode

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

        public static Vector3f from​(float n)
      • from

        public static Vector3f from​(float x,
                                    float y,
                                    float z)
      • createRandomDirection

        public static Vector3f createRandomDirection​(Random random)
        Gets the direction vector of a random pitch and yaw using the random specified.
        Parameters:
        random - to use
        Returns:
        the random direction vector
      • createDirectionDeg

        public static Vector3f createDirectionDeg​(double theta,
                                                  double phi)
        Gets the direction vector of a certain theta and phi in degrees. This uses the standard math spherical coordinate system.
        Parameters:
        theta - in degrees
        phi - in degrees
        Returns:
        the direction vector
      • createDirectionDeg

        public static Vector3f createDirectionDeg​(float theta,
                                                  float phi)
        Gets the direction vector of a certain theta and phi in degrees. This uses the standard math spherical coordinate system.
        Parameters:
        theta - in degrees
        phi - in degrees
        Returns:
        the direction vector
      • createDirectionRad

        public static Vector3f createDirectionRad​(double theta,
                                                  double phi)
        Gets the direction vector of a certain theta and phi in radians. This uses the standard math spherical coordinate system.
        Parameters:
        theta - in radians
        phi - in radians
        Returns:
        the direction vector
      • createDirectionRad

        public static Vector3f createDirectionRad​(float theta,
                                                  float phi)
        Gets the direction vector of a certain theta and phi in radians. This uses the standard math spherical coordinate system.
        Parameters:
        theta - in radians
        phi - in radians
        Returns:
        the direction vector