/** * Computes the cross product of this and the specified other vector, storing the result * in this vector. * * @return a reference to this vector, for chaining. */ public Vector3 crossLocal (IVector3 other) { return cross(other, this); }
/** * Computes the cross product of this and the specified other vector, storing the result * in this vector. * * @return a reference to this vector, for chaining. */ public Vector3 crossLocal (IVector3 other) { return cross(other, this); }
@Override // from interface IVector3 public Vector3 cross (IVector3 other) { return cross(other, new Vector3()); }
@Override // from interface IVector3 public Vector3 cross (IVector3 other) { return cross(other, new Vector3()); }
/** * Sets this plane based on the three points provided. * * @return a reference to the plane (for chaining). */ public Plane fromPoints (IVector3 p1, IVector3 p2, IVector3 p3) { // compute the normal by taking the cross product of the two vectors formed p2.subtract(p1, _v1); p3.subtract(p1, _v2); _v1.cross(_v2, _normal).normalizeLocal(); // use the first point to determine the constant constant = -_normal.dot(p1); return this; }
/** * Sets this plane based on the three points provided. * * @return a reference to the plane (for chaining). */ public Plane fromPoints (IVector3 p1, IVector3 p2, IVector3 p3) { // compute the normal by taking the cross product of the two vectors formed p2.subtract(p1, _v1); p3.subtract(p1, _v2); _v1.cross(_v2, _normal).normalizeLocal(); // use the first point to determine the constant constant = -_normal.dot(p1); return this; }