Class Vector3d

    • Constructor Detail

      • Vector3d

        public Vector3d​(Vector2d v)
      • Vector3d

        public Vector3d​(Vector2d v,
                        float z)
      • Vector3d

        public Vector3d​(Vector2d v,
                        double z)
      • Vector3d

        public Vector3d​(Vector4d v)
      • Vector3d

        public Vector3d​(VectorNd v)
      • Vector3d

        public Vector3d​(float x,
                        float y,
                        float z)
      • Vector3d

        public Vector3d​(double x,
                        double y,
                        double z)
    • Method Detail

      • x

        public double x()
      • y

        public double y()
      • z

        public double z()
      • floorX

        public int floorX()
      • floorY

        public int floorY()
      • floorZ

        public int floorZ()
      • add

        public Vector3d add​(float x,
                            float y,
                            float z)
      • add

        public Vector3d add​(double x,
                            double y,
                            double z)
      • sub

        public Vector3d sub​(float x,
                            float y,
                            float z)
      • sub

        public Vector3d sub​(double x,
                            double y,
                            double z)
      • mul

        public Vector3d mul​(float a)
      • mul

        public Vector3d mul​(float x,
                            float y,
                            float z)
      • mul

        public Vector3d mul​(double x,
                            double y,
                            double z)
      • div

        public Vector3d div​(float a)
      • div

        public Vector3d div​(float x,
                            float y,
                            float z)
      • div

        public Vector3d div​(double x,
                            double y,
                            double z)
      • dot

        public double dot​(Vector3d v)
      • dot

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

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

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

        public Vector3d project​(double x,
                                double y,
                                double z)
      • cross

        public Vector3d cross​(float x,
                              float y,
                              float z)
      • cross

        public Vector3d cross​(double x,
                              double y,
                              double z)
      • pow

        public Vector3d pow​(float pow)
      • min

        public Vector3d min​(float x,
                            float y,
                            float z)
      • min

        public Vector3d min​(double x,
                            double y,
                            double z)
      • max

        public Vector3d max​(float x,
                            float y,
                            float z)
      • max

        public Vector3d max​(double x,
                            double y,
                            double z)
      • distanceSquared

        public double distanceSquared​(Vector3d v)
      • distanceSquared

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

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

        public double distance​(Vector3d v)
      • distance

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

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

        public double length()
        Specified by:
        length in interface Vectord
      • minAxis

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

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

        public Vector2d toVector2()
      • toVector2

        public Vector2d toVector2​(boolean useZ)
      • toVector4

        public Vector4d toVector4()
      • toVector4

        public Vector4d toVector4​(float w)
      • toVector4

        public Vector4d toVector4​(double w)
      • toVectorN

        public VectorNd toVectorN()
      • toArray

        public double[] toArray()
        Specified by:
        toArray in interface Vectord
      • hashCode

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

        public static Vector3d from​(double n)
      • from

        public static Vector3d from​(double x,
                                    double y,
                                    double z)
      • createRandomDirection

        public static Vector3d 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 Vector3d 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
      • createDirectionDeg

        public static Vector3d 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
      • createDirectionRad

        public static Vector3d 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
      • createDirectionRad

        public static Vector3d 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