Top Description Constructors Methods
org.lwjgl.util.vector

public abstract Class Vector

extends Object
implements Serializable, ReadableVector
Class Inheritance
All Implemented Interfaces
org.lwjgl.util.vector.ReadableVector, java.io.Serializable
Known Direct Subclasses
org.lwjgl.util.vector.Vector2f, org.lwjgl.util.vector.Vector3f, org.lwjgl.util.vector.Vector4f, org.lwjgl.util.vector.Quaternion
Imports
java.io.Serializable, java.nio.FloatBuffer

Base class for vectors.
Author
cix_foo
Version
$Revision$ $Id$

Constructor Summary

AccessConstructor and Description
protected
Vector()

Constructor for Vector.

Method Summary

Modifier and TypeMethod and Description
public final float

Returns:

the length of the vector
length
()

Implements org.lwjgl.util.vector.ReadableVector.length.

public abstract float

Returns:

the length squared of the vector
lengthSquared
()

Redeclares org.lwjgl.util.vector.ReadableVector.lengthSquared.

public abstract Vector

Returns:

this
load
(FloatBuffer
The buffer to load it from, at the current position
buf
)

Load this vector from a FloatBuffer

public abstract Vector

Returns:

this
negate
()

Negate a vector

public final Vector

Returns:

this
normalise
()

Normalise this vector

public abstract Vector

Returns:

this
scale
(float
The scale factor
scale
)

Scale this vector

public abstract Vector

Returns:

this
store
(FloatBuffer
The buffer to store it in, at the current position
buf
)

Redeclares org.lwjgl.util.vector.ReadableVector.store.

Store this vector in a FloatBuffer
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Vectorback to summary
protected Vector()

Constructor for Vector.

Method Detail

lengthback to summary
public final float length()

Implements org.lwjgl.util.vector.ReadableVector.length.

Returns:float

the length of the vector

lengthSquaredback to summary
public abstract float lengthSquared()

Redeclares org.lwjgl.util.vector.ReadableVector.lengthSquared.

Returns:float

the length squared of the vector

loadback to summary
public abstract Vector load(FloatBuffer buf)

Load this vector from a FloatBuffer

Parameters
buf:FloatBuffer

The buffer to load it from, at the current position

Returns:Vector

this

negateback to summary
public abstract Vector negate()

Negate a vector

Returns:Vector

this

normaliseback to summary
public final Vector normalise()

Normalise this vector

Returns:Vector

this

scaleback to summary
public abstract Vector scale(float scale)

Scale this vector

Parameters
scale:float

The scale factor

Returns:Vector

this

storeback to summary
public abstract Vector store(FloatBuffer buf)

Redeclares org.lwjgl.util.vector.ReadableVector.store.

Store this vector in a FloatBuffer

Parameters
buf:FloatBuffer

The buffer to store it in, at the current position

Returns:Vector

this