edu.uprm.ece.terrainrenderer
Class Vector
java.lang.Object
edu.uprm.ece.terrainrenderer.Vector
- Direct Known Subclasses:
- Angle, Vertex
public class Vector
- extends java.lang.Object
- Author:
- Ricardo Veguilla (veguilla@ece.uprm.edu)
Field Summary |
protected float[] |
value
|
static int |
W
|
static int |
X
|
static int |
Y
|
static int |
Z
|
Constructor Summary |
Vector()
|
Vector(float[] values)
|
Vector(float x,
float y,
float z)
|
Vector(float x,
float y,
float z,
float w)
|
Method Summary |
static float[] |
add(float[] a,
float[] b)
|
void |
add(Vector v)
|
static Vector |
add(Vector a,
Vector b)
|
static float[] |
crossProduct(float[] a,
float[] b)
|
static Vector |
crossProduct(Vector a,
Vector b)
|
static float |
dotProduct(float[] a,
float[] b)
|
static float |
dotProduct(Vector a,
Vector b)
|
int |
getSize()
|
float[] |
getValue()
|
float |
getX()
|
float |
getY()
|
float |
getZ()
|
void |
increment(int axis,
float delta)
|
void |
incrementX(float delta)
|
void |
incrementY(float delta)
|
void |
incrementZ(float delta)
|
static Vector |
inverse(Vector v)
|
void |
invert()
|
float |
length()
|
void |
multiplyAndAdd(Vector a,
float scale)
|
static Vector |
multiplyAndAdd(Vector a,
float scale,
Vector b)
|
void |
multiplyAndAdd(Vector a,
Vector scale)
|
static Vector |
multiplyAndAdd(Vector a,
Vector scale,
Vector b)
|
void |
normalize()
|
static float[] |
normalize(float[] v)
|
Vector |
normalized()
|
static Vector |
perpendicular(Vector a,
Vector b)
|
void |
scale(float scale)
|
static Vector |
scale(Vector v,
float scale)
|
Vector |
scaled(float scale)
|
void |
setValue(float[] points)
|
void |
setValues(float x,
float y,
float z)
|
void |
setValues(float x,
float y,
float z,
float w)
|
void |
setX(float x)
|
void |
setY(float y)
|
void |
setZ(float z)
|
void |
substract(Vector v)
|
static float[] |
subtract(float[] a,
float[] b)
|
static Vector |
subtract(Vector a,
Vector b)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
X
public static final int X
- See Also:
- Constant Field Values
Y
public static final int Y
- See Also:
- Constant Field Values
Z
public static final int Z
- See Also:
- Constant Field Values
W
public static final int W
- See Also:
- Constant Field Values
value
protected float[] value
Vector
public Vector()
Vector
public Vector(float[] values)
Vector
public Vector(float x,
float y,
float z)
Vector
public Vector(float x,
float y,
float z,
float w)
setValues
public void setValues(float x,
float y,
float z)
setValues
public void setValues(float x,
float y,
float z,
float w)
getValue
public float[] getValue()
setValue
public void setValue(float[] points)
getSize
public int getSize()
subtract
public static Vector subtract(Vector a,
Vector b)
subtract
public static float[] subtract(float[] a,
float[] b)
add
public static Vector add(Vector a,
Vector b)
add
public static float[] add(float[] a,
float[] b)
substract
public void substract(Vector v)
add
public void add(Vector v)
dotProduct
public static float dotProduct(float[] a,
float[] b)
dotProduct
public static float dotProduct(Vector a,
Vector b)
crossProduct
public static Vector crossProduct(Vector a,
Vector b)
crossProduct
public static float[] crossProduct(float[] a,
float[] b)
inverse
public static Vector inverse(Vector v)
invert
public void invert()
scale
public static Vector scale(Vector v,
float scale)
scale
public void scale(float scale)
scaled
public Vector scaled(float scale)
length
public float length()
perpendicular
public static Vector perpendicular(Vector a,
Vector b)
normalize
public void normalize()
normalized
public Vector normalized()
normalize
public static float[] normalize(float[] v)
getX
public float getX()
setX
public void setX(float x)
getY
public float getY()
setY
public void setY(float y)
getZ
public float getZ()
setZ
public void setZ(float z)
incrementX
public void incrementX(float delta)
incrementY
public void incrementY(float delta)
incrementZ
public void incrementZ(float delta)
increment
public void increment(int axis,
float delta)
multiplyAndAdd
public static Vector multiplyAndAdd(Vector a,
float scale,
Vector b)
multiplyAndAdd
public static Vector multiplyAndAdd(Vector a,
Vector scale,
Vector b)
multiplyAndAdd
public void multiplyAndAdd(Vector a,
float scale)
multiplyAndAdd
public void multiplyAndAdd(Vector a,
Vector scale)