public class Vector4 extends Object implements IVector4, Serializable
Modifier and Type | Field and Description |
---|---|
double |
w
The components of the vector.
|
double |
x
The components of the vector.
|
double |
y
The components of the vector.
|
double |
z
The components of the vector.
|
Constructor and Description |
---|
Vector4()
Creates a zero vector.
|
Vector4(double[] values)
Creates a vector from four components.
|
Vector4(DoubleBuffer buf)
Creates a vector from a double buffer.
|
Vector4(double x,
double y,
double z,
double 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,
double epsilon)
Compares this vector to another with the provided epsilon.
|
boolean |
equals(Object other) |
DoubleBuffer |
get(DoubleBuffer buf)
Populates the supplied buffer with the contents of this vector.
|
int |
hashCode() |
Vector4 |
mult(double v)
Multiplies this vector by a scalar.
|
Vector4 |
mult(double 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(double 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(double[] values)
Sets all of the elements of the vector.
|
Vector4 |
set(DoubleBuffer buf)
Sets all of the elements of the vector.
|
Vector4 |
set(double x,
double y,
double z,
double w)
Sets all of the elements of the vector.
|
Vector4 |
set(IVector4 other)
Copies the elements of another vector.
|
String |
toString() |
double |
w()
Returns the w-component of this vector.
|
double |
x()
Returns the x-component of this vector.
|
double |
y()
Returns the y-component of this vector.
|
double |
z()
Returns the z-component of this vector.
|
public double x
public double y
public double z
public double w
public Vector4(double x, double y, double z, double w)
public Vector4(double[] values)
public Vector4(DoubleBuffer buf)
public Vector4(IVector4 other)
public Vector4()
public Vector4 set(IVector4 other)
public Vector4 set(double[] values)
public Vector4 set(DoubleBuffer buf)
public Vector4 set(double x, double y, double z, double w)
public Vector4 negateLocal()
public Vector4 absLocal()
public Vector4 multLocal(double v)
public Vector4 multLocal(IMatrix4 matrix)
public double x()
IVector4
public double y()
IVector4
public double z()
IVector4
public double w()
IVector4
public DoubleBuffer get(DoubleBuffer buf)
IVector4
public boolean epsilonEquals(IVector4 other, double epsilon)
IVector4
epsilonEquals
in interface IVector4
public Vector4 negate(Vector4 result)
IVector4
public Vector4 abs(Vector4 result)
IVector4
public Vector4 mult(double v)
IVector4
public Vector4 mult(double v, Vector4 result)
IVector4
public Vector4 mult(IMatrix4 matrix)
IVector4
public Vector4 mult(IMatrix4 matrix, Vector4 result)
IVector4
Copyright © 2017. All rights reserved.