espresso3d.engine.lowlevel
Class E3DVector3F
java.lang.Object
espresso3d.engine.lowlevel.E3DVector3F
- public class E3DVector3F
- extends java.lang.Object
- Author:
- espresso3d
3D vector class. Very feature rich.
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
E3DVector3F
public E3DVector3F()
E3DVector3F
public E3DVector3F(E3DVector3F toCopy)
E3DVector3F
public E3DVector3F(double x,
double y,
double z)
equals
public boolean equals(E3DVector3F vec)
equals
public boolean equals(double x,
double y,
double z)
getX
public double getX()
- Returns:
- Returns the x.
setX
public void setX(double x)
- Parameters:
x - The x to set.
getY
public double getY()
- Returns:
- Returns the y.
setY
public void setY(double y)
- Parameters:
y - The y to set.
getZ
public double getZ()
- Returns:
- Returns the z.
setZ
public void setZ(double z)
- Parameters:
z - The z to set.
set
public void set(E3DVector3F newVec)
set
public void set(double x,
double y,
double z)
add
public E3DVector3F add(E3DVector3F translationAmt)
addEqual
public void addEqual(E3DVector3F translationAmt)
subtract
public E3DVector3F subtract(E3DVector3F translationAmt)
subtractEqual
public void subtractEqual(E3DVector3F translationAmt)
scale
public E3DVector3F scale(double scaleAmt)
scaleEqual
public void scaleEqual(double scaleAmt)
multiply
public E3DVector3F multiply(E3DVector3F multiplyAmt)
multiplyEqual
public void multiplyEqual(E3DVector3F multiplyAmt)
rotate
public E3DVector3F rotate(double angle,
E3DVector3F aroundVec)
- Get a new vector that is rotated angle radians around the around vec
- Parameters:
angle - Angle to rotate in radiansaroundVec - Vector that creates the central axis to rotate around
- Returns:
- Returns a new vector that is this vector rotated angle radians around the around vec
rotateEqual
public void rotateEqual(double angle,
E3DVector3F aroundVec)
- Rotate the vector angle radians around the aroundVec
- Parameters:
angle - aroundVec - Vector that creates the central axis to rotate around
dotProduct
public double dotProduct(E3DVector3F otherVec)
getLengthSquared
public double getLengthSquared()
getLength
public double getLength()
angleBetweenDegrees
public double angleBetweenDegrees(E3DVector3F otherVec)
angleBetweenRads
public double angleBetweenRads(E3DVector3F otherVec)
normalise
public E3DVector3F normalise()
normaliseEqual
public void normaliseEqual()
crossProduct
public E3DVector3F crossProduct(E3DVector3F otherVec)
getFloatBuffer
public java.nio.FloatBuffer getFloatBuffer()
toString
public java.lang.String toString()