Package org.sunflow.math

## Class Vector3

- java.lang.Object
- - org.sunflow.math.Vector3

-     public final class Vector3
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `float` | `x` |
    `float` | `y` |
    `float` | `z` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Vector3()` |
    `Vector3​(float x, float y, float z)` |
    `Vector3​(Vector3 v)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static Vector3` | `add​(Vector3 v1, Vector3 v2, Vector3 dest)` |
    `static Vector3` | `cross​(Vector3 v1, Vector3 v2, Vector3 dest)` |
    `static Vector3` | `decode​(short n)` |
    `static Vector3` | `decode​(short n, Vector3 dest)` |
    `Vector3` | `div​(float d)` |
    `Vector3` | `div​(float d, Vector3 dest)` |
    `float` | `dot​(float vx, float vy, float vz)` |
    `static float` | `dot​(Vector3 v1, Vector3 v2)` |
    `short` | `encode()` |
    `float` | `get​(int i)` |
    `float` | `length()` |
    `float` | `lengthSquared()` |
    `Vector3` | `mul​(float s)` |
    `Vector3` | `mul​(float s, Vector3 dest)` |
    `Vector3` | `negate()` |
    `Vector3` | `negate​(Vector3 dest)` |
    `Vector3` | `normalize()` |
    `Vector3` | `normalize​(Vector3 dest)` |
    `float` | `normalizeLength()` |
    `Vector3` | `set​(float x, float y, float z)` |
    `Vector3` | `set​(Vector3 v)` |
    `static Vector3` | `sub​(Vector3 v1, Vector3 v2, Vector3 dest)` |
    `java.lang.String` | `toString()` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### x

          public float x

    - #### y

          public float y

    - #### z

          public float z

  - ### Constructor Detail

    - #### Vector3

          public Vector3()

    - #### Vector3

          public Vector3​(float x,
                         float y,
                         float z)

    - #### Vector3

          public Vector3​(Vector3 v)

  - ### Method Detail

    - #### decode

          public static final Vector3 decode​(short n,
                                             Vector3 dest)

    - #### decode

          public static final Vector3 decode​(short n)

    - #### encode

          public final short encode()

    - #### get

          public float get​(int i)

    - #### length

          public final float length()

    - #### lengthSquared

          public final float lengthSquared()

    - #### negate

          public final Vector3 negate()

    - #### negate

          public final Vector3 negate​(Vector3 dest)

    - #### mul

          public final Vector3 mul​(float s)

    - #### mul

          public final Vector3 mul​(float s,
                                   Vector3 dest)

    - #### div

          public final Vector3 div​(float d)

    - #### div

          public final Vector3 div​(float d,
                                   Vector3 dest)

    - #### normalizeLength

          public final float normalizeLength()

    - #### normalize

          public final Vector3 normalize()

    - #### normalize

          public final Vector3 normalize​(Vector3 dest)

    - #### set

          public final Vector3 set​(float x,
                                   float y,
                                   float z)

    - #### set

          public final Vector3 set​(Vector3 v)

    - #### dot

          public final float dot​(float vx,
                                 float vy,
                                 float vz)

    - #### dot

          public static final float dot​(Vector3 v1,
                                        Vector3 v2)

    - #### cross

          public static final Vector3 cross​(Vector3 v1,
                                            Vector3 v2,
                                            Vector3 dest)

    - #### add

          public static final Vector3 add​(Vector3 v1,
                                          Vector3 v2,
                                          Vector3 dest)

    - #### sub

          public static final Vector3 sub​(Vector3 v1,
                                          Vector3 v2,
                                          Vector3 dest)

    - #### toString

          public final java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`