public class Vector4 extends Object implements IVector4, Serializable
Modifier and Type | Field and Description |
---|---|
float |
w
The components of the vector.
|
float |
x
The components of the vector.
|
float |
y
The components of the vector.
|
float |
z
The components of the vector.
|
Constructor and Description |
---|
Vector4()
Creates a zero vector.
|
Vector4(float[] values)
Creates a vector from four components.
|
Vector4(FloatBuffer buf)
Creates a vector from a float buffer.
|
Vector4(float x,
float y,
float z,
float w)
Creates a vector from four components.
|
Vector4(IVector4 other)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
Vector4 |
abs()
Absolute-values this vector.
|
Vector4 |
abs(Vector4 result)
Absolute-values this vector, storing the result in the supplied object.
|
Vector4 |
absLocal()
Absolute-values this vector in-place.
|
boolean |
epsilonEquals(IVector4 other,
float epsilon)
Compares this vector to another with the provided epsilon.
|
boolean |
equals(Object other) |
FloatBuffer |
get(FloatBuffer buf)
Populates the supplied buffer with the contents of this vector.
|
int |
hashCode() |
Vector4 |
mult(float v)
Multiplies this vector by a scalar.
|
Vector4 |
mult(float v,
Vector4 result)
Multiplies this vector by a scalar and places the result in the supplied object.
|
Vector4 |
mult(IMatrix4 matrix)
Multiplies this vector by a matrix (V * M).
|
Vector4 |
mult(IMatrix4 matrix,
Vector4 result)
Multiplies this vector by a matrix (V * M) and stores the result in the object provided.
|
Vector4 |
multLocal(float v)
Multiplies this vector by a scalar and stores the result back in this vector.
|
Vector4 |
multLocal(IMatrix4 matrix)
Multiplies this vector by a matrix (V * M) and stores the result back in this vector.
|
Vector4 |
negate()
Negates this vector.
|
Vector4 |
negate(Vector4 result)
Negates this vector, storing the result in the supplied object.
|
Vector4 |
negateLocal()
Negates this vector in-place.
|
Vector4 |
set(float[] values)
Sets all of the elements of the vector.
|
Vector4 |
set(FloatBuffer buf)
Sets all of the elements of the vector.
|
Vector4 |
set(float x,
float y,
float z,
float w)
Sets all of the elements of the vector.
|
Vector4 |
set(IVector4 other)
Copies the elements of another vector.
|
String |
toString() |
float |
w()
Returns the w-component of this vector.
|
float |
x()
Returns the x-component of this vector.
|
float |
y()
Returns the y-component of this vector.
|
float |
z()
Returns the z-component of this vector.
|
public float x
public float y
public float z
public float w
public Vector4(float x, float y, float z, float w)
public Vector4(float[] values)
public Vector4(FloatBuffer buf)
public Vector4(IVector4 other)
public Vector4()
public Vector4 set(IVector4 other)
public Vector4 set(float[] values)
public Vector4 set(FloatBuffer buf)
public Vector4 set(float x, float y, float z, float w)
public Vector4 negateLocal()
public Vector4 absLocal()
public Vector4 multLocal(float v)
public Vector4 multLocal(IMatrix4 matrix)
public float x()
IVector4
public float y()
IVector4
public float z()
IVector4
public float w()
IVector4
public FloatBuffer get(FloatBuffer buf)
IVector4
public boolean epsilonEquals(IVector4 other, float epsilon)
IVector4
epsilonEquals
in interface IVector4
public Vector4 negate(Vector4 result)
IVector4
public Vector4 abs(Vector4 result)
IVector4
public Vector4 mult(float v)
IVector4
public Vector4 mult(float v, Vector4 result)
IVector4
public Vector4 mult(IMatrix4 matrix)
IVector4
public Vector4 mult(IMatrix4 matrix, Vector4 result)
IVector4
Copyright © 2017. All rights reserved.