public class Vec4 extends java.lang.Object implements IData<Vec4>
| Constructor and Description |
|---|
Vec4()
Constructor of the (0, 0, 0, 0) Point
|
Vec4(float x,
float y,
float z,
float w)
Constructor of the (x, y, z, w) Point
|
Vec4(Vec3 vector,
float w)
Constructor of the (x, y, z) Point
|
| Modifier and Type | Method and Description |
|---|---|
Vec4 |
add(float x,
float y,
float z,
float w) |
Vec4 |
add(Vec4 vec1,
Vec4 vec2) |
Vec4 |
addScale(Vec4 vec1,
Vec4 vec2,
float scale) |
Vec4 |
addScale(Vec4 vec1,
Vec4 vec2,
Vec4 scale) |
Vec4 |
clone() |
float |
distance(Vec4 vector) |
float |
distanceSqr(Vec4 vector) |
Vec4 |
divide(Vec4 src,
float f) |
Vec4 |
divide(Vec4 vec1,
Vec4 vec2) |
float |
dot(Vec4 vec) |
boolean |
equals(java.lang.Object obj) |
void |
get(float[] dst) |
float |
getW() |
float |
getX() |
float |
getY() |
float |
getZ() |
int |
hashCode() |
Vec4 |
interpolate(Vec4 current,
Vec4 next,
float t)
Interpolate
current and next and store result in this. |
void |
interpolateNoCheck(Vec4 next,
float t,
float[] dest,
int destIndex) |
Vec4 |
interpolateNoCheck(Vec4 current,
Vec4 next,
float t) |
Vec4 |
invert(Vec4 vec) |
boolean |
isUnitVector() |
boolean |
isZeroVector() |
float |
magnitude() |
Vec4 |
magnitude(float length) |
float |
magnitudeSqr() |
Vec4 |
max(Vec4 vec1,
Vec4 vec2) |
Vec4 |
min(Vec4 vec1,
Vec4 vec2) |
Vec4 |
multiply(Vec4 vec,
float f) |
Vec4 |
multiply(Vec4 vec1,
Vec4 vec2) |
float |
normalize()
Normalize this
Vec4 |
float |
normalize(Vec4 src) |
Vec4 |
set(float[] src) |
Vec4 |
set(float x,
float y,
float z,
float w) |
Vec4 |
set(Vec3 src,
float srcW)
Copy
src in this vector. |
Vec4 |
set(Vec4 src)
Copy
src in this vector. |
Vec4 |
setUnit() |
Vec4 |
setW(float w) |
Vec4 |
setX(float x) |
Vec4 |
setY(float y) |
Vec4 |
setZ(float z) |
Vec4 |
setZero() |
Vec4 |
subtract(Vec4 vec1,
Vec4 vec2) |
java.lang.String |
toString() |
public Vec4()
public Vec4(float x,
float y,
float z,
float w)
public Vec4(Vec3 vector, float w)
public final Vec4 clone()
public final boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic final java.lang.String toString()
toString in class java.lang.Objectpublic final int hashCode()
hashCode in class java.lang.Objectpublic final boolean isZeroVector()
public final Vec4 setZero()
public final boolean isUnitVector()
public final Vec4 setUnit()
public final void get(float[] dst)
public final Vec4 set(float x, float y, float z, float w)
public final float getX()
public final Vec4 setX(float x)
public final float getY()
public final Vec4 setY(float y)
public final float getZ()
public final Vec4 setZ(float z)
public final float getW()
public final Vec4 setW(float w)
public Vec4 add(float x, float y, float z, float w)
public final Vec4 add(Vec4 vec1, Vec4 vec2)
vec1 - vec2 - public final Vec4 addScale(Vec4 vec1, Vec4 vec2, Vec4 scale)
vec1 - vec2 - scale - public final Vec4 addScale(Vec4 vec1, Vec4 vec2, float scale)
vec1 - vec2 - scale - public final Vec4 subtract(Vec4 vec1, Vec4 vec2)
vec1 - vec2 - public final Vec4 multiply(Vec4 vec1, Vec4 vec2)
vec1 - vec2 - public final Vec4 multiply(Vec4 vec, float f)
vec - f - public final Vec4 divide(Vec4 vec1, Vec4 vec2)
vec1 - vec2 - public final float magnitude()
Vec4public final float magnitudeSqr()
Vec4public final Vec4 magnitude(float length)
length - new magnitude (length) for this Vec4public final float normalize()
Vec4public final float distance(Vec4 vector)
vector - a vectorpublic final float distanceSqr(Vec4 vector)
public final float dot(Vec4 vec)
vec - a vectorpublic final Vec4 interpolate(Vec4 current, Vec4 next, float t)
IInterpolablecurrent and next and store result in this.interpolate in interface IInterpolable<Vec4>interpolate in interface IData<Vec4>next - t - range is [0, 1]current - current valuepublic final void interpolateNoCheck(Vec4 next, float t, float[] dest, int destIndex)
public final Vec4 set(Vec4 src)
src in this vector.set in interface IValueCopy<Vec4>src - source vectorpublic final Vec4 set(float[] src)
Bonzai Engine 1.3.4 11/12/2015 - A Java OpenGL engine and tools for Windows/Mac/Linux/Android
Copyright © 2007-2015 Jérôme Jouvie bonzaiengine.com contact@bonzaiengine.com