Package zombie.iso
Class Vector3
java.lang.Object
zombie.iso.Vector3
- All Implemented Interfaces:
java.lang.Cloneable
public class Vector3
extends java.lang.Object
implements java.lang.Cloneable
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description Vector2add(Vector2 other)Vector3addToThis(Vector2 other)Vector3aimAt(Vector2 other)floatangleTo(Vector2 other)Vector3clone()floatdistanceTo(Vector2 other)static floatdot(float x, float y, float tx, float ty)floatdot(Vector2 other)booleanequals(java.lang.Object other)static Vector2fromAwtPoint(java.awt.Point p)static Vector2fromLengthDirection(float length, float direction)floatgetDirection()floatgetLength()voidnormalize()voidrotate(float rad)Vector3set(float x, float y, float z)Vector3set(Vector3 other)Vector3setDirection(float direction)Vector3setLength(float length)Vector3setLengthAndDirection(float direction, float length)java.awt.DimensiontoAwtDimension()java.awt.PointtoAwtPoint()java.lang.StringtoString()Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
x
public float x -
y
public float y -
z
public float z
-
-
Constructor Details
-
Vector3
public Vector3() -
Vector3
-
Vector3
public Vector3(float x, float y, float z)
-
-
Method Details
-
rotate
public void rotate(float rad) -
fromAwtPoint
-
fromLengthDirection
-
add
-
addToThis
-
aimAt
-
angleTo
-
clone
- Overrides:
clonein classjava.lang.Object
-
distanceTo
-
dot
-
dot
public static float dot(float x, float y, float tx, float ty) -
equals
public boolean equals(java.lang.Object other)- Overrides:
equalsin classjava.lang.Object
-
getDirection
public float getDirection() -
getLength
public float getLength() -
normalize
public void normalize() -
set
-
set
-
setDirection
-
setLength
-
setLengthAndDirection
-
toAwtDimension
public java.awt.Dimension toAwtDimension() -
toAwtPoint
public java.awt.Point toAwtPoint() -
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-