Package org.lwjgl.util.vector
Class Vector
java.lang.Object
org.lwjgl.util.vector.Vector
- All Implemented Interfaces:
Serializable,ReadableVector
- Direct Known Subclasses:
Quaternion,Vector2f,Vector3f,Vector4f
Base class for vectors.
- Version:
- $Revision$ $Id$
- Author:
- cix_foo invalid input: '<'cix_foo@users.sourceforge.net>
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal floatlength()abstract floatabstract Vectorload(FloatBuffer buf) Load this vector from a FloatBufferabstract Vectornegate()Negate a vectorfinal VectorNormalise this vectorabstract Vectorscale(float scale) Scale this vectorabstract Vectorstore(FloatBuffer buf) Store this vector in a FloatBuffer
-
Constructor Details
-
Vector
protected Vector()Constructor for Vector.
-
-
Method Details
-
length
public final float length()- Specified by:
lengthin interfaceReadableVector- Returns:
- the length of the vector
-
lengthSquared
public abstract float lengthSquared()- Specified by:
lengthSquaredin interfaceReadableVector- Returns:
- the length squared of the vector
-
load
Load this vector from a FloatBuffer- Parameters:
buf- The buffer to load it from, at the current position- Returns:
- this
-
negate
Negate a vector- Returns:
- this
-
normalise
Normalise this vector- Returns:
- this
-
store
Store this vector in a FloatBuffer- Specified by:
storein interfaceReadableVector- Parameters:
buf- The buffer to store it in, at the current position- Returns:
- this
-
scale
Scale this vector- Parameters:
scale- The scale factor- Returns:
- this
-