Home | History | Annotate | Download | only in math

Lines Matching refs:Vector3f

44  * <code>Vector3f</code> defines a Vector for a three float value tuple.

45 * <code>Vector3f</code> can represent any three dimensional value, such as a
52 public final class Vector3f implements Savable, Cloneable, java.io.Serializable {
56 private static final Logger logger = Logger.getLogger(Vector3f.class.getName());
58 public final static Vector3f ZERO = new Vector3f(0, 0, 0);
59 public final static Vector3f NAN = new Vector3f(Float.NaN, Float.NaN, Float.NaN);
60 public final static Vector3f UNIT_X = new Vector3f(1, 0, 0);
61 public final static Vector3f UNIT_Y = new Vector3f(0, 1, 0);
62 public final static Vector3f UNIT_Z = new Vector3f(0, 0, 1);
63 public final static Vector3f UNIT_XYZ = new Vector3f(1, 1, 1);
64 public final static Vector3f POSITIVE_INFINITY = new Vector3f(
68 public final static Vector3f NEGATIVE_INFINITY = new Vector3f(
90 * Constructor instantiates a new <code>Vector3f</code> with default
94 public Vector3f() {
99 * Constructor instantiates a new <code>Vector3f</code> with provides
109 public Vector3f(float x, float y, float z) {
116 * Constructor instantiates a new <code>Vector3f</code> that is a copy
118 * @param copy The Vector3f to copy
120 public Vector3f(Vector3f copy) {
136 public Vector3f set(float x, float y, float z) {
151 public Vector3f set(Vector3f vect) {
168 public Vector3f add(Vector3f vec) {
173 return new Vector3f(x + vec.x, y + vec.y, z + vec.z);
187 public Vector3f add(Vector3f vec, Vector3f result) {
203 public Vector3f addLocal(Vector3f vec) {
227 public Vector3f add(float addX, float addY, float addZ) {
228 return new Vector3f(x + addX, y + addY, z + addZ);
244 public Vector3f addLocal(float addX, float addY, float addZ) {
254 * given Vector3f.
261 public Vector3f scaleAdd(float scalar, Vector3f add) {
280 public Vector3f scaleAdd(float scalar, Vector3f mult, Vector3f add) {
296 public float dot(Vector3f vec) {
312 public Vector3f cross(Vector3f v) {
326 public Vector3f cross(Vector3f v,Vector3f result) {
344 public Vector3f cross(float otherX, float otherY, float otherZ, Vector3f result) {
345 if (result == null) result = new Vector3f();
361 public Vector3f crossLocal(Vector3f v) {
377 public Vector3f crossLocal(float otherX, float otherY, float otherZ) {
386 public Vector3f project(Vector3f other){
389 return new Vector3f(other).normalizeLocal().multLocal(n/d);
430 public float distanceSquared(Vector3f v) {
444 public float distance(Vector3f v) {
457 public Vector3f mult(float scalar) {
458 return new Vector3f(x * scalar, y * scalar, z * scalar);
470 public Vector3f mult(float scalar, Vector3f product) {
472 product = new Vector3f();
489 public Vector3f multLocal(float scalar) {
505 public Vector3f multLocal(Vector3f vec) {
526 public Vector3f multLocal(float x, float y, float z) {
542 public Vector3f mult(Vector3f vec) {
560 public Vector3f mult(Vector3f vec, Vector3f store) {
565 if (store == null) store = new Vector3f();
578 public Vector3f divide(float scalar) {
580 return new Vector3f(x * scalar, y * scalar, z * scalar);
592 public Vector3f divideLocal(float scalar) {
609 public Vector3f divide(Vector3f scalar) {
610 return new Vector3f(x / scalar.x, y / scalar.y, z / scalar.z);
622 public Vector3f divideLocal(Vector3f scalar) {
636 public Vector3f negate() {
637 return new Vector3f(-x, -y, -z);
646 public Vector3f negateLocal() {
663 public Vector3f subtract(Vector3f vec) {
664 return new Vector3f(x - vec.x, y - vec.y, z - vec.z);
676 public Vector3f subtractLocal(Vector3f vec) {
697 public Vector3f subtract(Vector3f vec, Vector3f result) {
699 result = new Vector3f();
720 public Vector3f subtract(float subtractX, float subtractY, float subtractZ) {
721 return new Vector3f(x - subtractX, y - subtractY, z - subtractZ);
737 public Vector3f subtractLocal(float subtractX, float subtractY, float subtractZ) {
749 public Vector3f normalize() {
759 return new Vector3f(x * length, y * length, z * length);
770 public Vector3f normalizeLocal() {
790 public void maxLocal(Vector3f other){
802 public void minLocal(Vector3f other){
811 public Vector3f zero() {
823 public float angleBetween(Vector3f otherVector) {
836 public Vector3f interpolate(Vector3f finalVec, float changeAmnt) {
851 public Vector3f interpolate(Vector3f beginVec,Vector3f finalVec, float changeAmnt) {
864 public static boolean isValidVector(Vector3f vector) {
875 public static void generateOrthonormalBasis(Vector3f u, Vector3f v, Vector3f w) {
880 public static void generateComplementBasis(Vector3f u, Vector3f v,
881 Vector3f w) {
906 public Vector3f clone() {
908 return (Vector3f) super.clone();
915 * Saves this Vector3f into the given float[] object.
918 * The float[] to take this Vector3f. If null, a new float[3] is
941 if (!(o instanceof Vector3f)) { return false; }
945 Vector3f comp = (Vector3f) o;
970 * org.jme.math.Vector3f [X=XX.XXXX, Y=YY.YYYY, Z=ZZ.ZZZZ]
996 public Vector3f setX(float x) {
1005 public Vector3f setY(float y) {
1014 public Vector3f setZ(float z) {