Class Vector

    • Constructor Detail

      • Vector

        protected Vector()
        Constructor for Vector.
    • Method Detail

      • length

        public final float length()
        Specified by:
        length in interface ReadableVector
        Returns:
        the length of the vector
      • lengthSquared

        public abstract float lengthSquared()
        Specified by:
        lengthSquared in interface ReadableVector
        Returns:
        the length squared of the vector
      • load

        public abstract Vector load​(FloatBuffer buf)
        Load this vector from a FloatBuffer
        Parameters:
        buf - The buffer to load it from, at the current position
        Returns:
        this
      • negate

        public abstract Vector negate()
        Negate a vector
        Returns:
        this
      • normalise

        public final Vector normalise()
        Normalise this vector
        Returns:
        this
      • store

        public abstract Vector store​(FloatBuffer buf)
        Store this vector in a FloatBuffer
        Specified by:
        store in interface ReadableVector
        Parameters:
        buf - The buffer to store it in, at the current position
        Returns:
        this
      • scale

        public abstract Vector scale​(float scale)
        Scale this vector
        Parameters:
        scale - The scale factor
        Returns:
        this