/** * Create a new {@link AxisAngle4f} with the given values. * * @param angle the angle in radians * @param v the rotation axis as a {@link Vector3f} */ public AxisAngle4f(float angle, Vector3fc v) { this(angle, v.x(), v.y(), v.z()); }
/** * Create a new {@link Vector4d} with the x, y, and z components from the * given <code>v</code> and the w component from the given <code>w</code>. * * @param v * the {@link Vector3fc} * @param w * the w component */ public Vector4d(Vector3fc v, double w) { this(v.x(), v.y(), v.z(), w); }
public Vector3d div(Vector3fc v, Vector3d dest) { dest.x = x / v.x(); dest.y = y / v.y(); dest.z = z / v.z(); return dest; }
public Vector3f fma(float a, Vector3fc b, Vector3f dest) { dest.x = x + a * b.x(); dest.y = y + a * b.y(); dest.z = z + a * b.z(); return dest; }
/** * Create a new {@link Vector3d} whose values will be copied from the given vector. * * @param v * provides the initial values for the new vector */ public Vector3d(Vector3fc v) { this(v.x(), v.y(), v.z()); }
public Vector3d mul(Vector3fc v, Vector3d dest) { dest.x = x * v.x(); dest.y = y * v.y(); dest.z = z * v.z(); return dest; }
public Vector3f add(Vector3fc v, Vector3f dest) { dest.x = x + v.x(); dest.y = y + v.y(); dest.z = z + v.z(); return dest; }
public Vector3f lerp(Vector3fc other, float t, Vector3f dest) { dest.x = x + (other.x() - x) * t; dest.y = y + (other.y() - y) * t; dest.z = z + (other.z() - z) * t; return dest; }
/** * Set the minimum corner coordinates. * * @param min * the minimum coordinates * @return this */ public AABBf setMin(Vector3fc min) { return this.setMin(min.x(), min.y(), min.z()); }
/** * Set <code>this</code> to the union of <code>this</code> and the given point <code>p</code>. * * @param p * the point * @return this */ public AABBf union(Vector3fc p) { return union(p.x(), p.y(), p.z(), this); }
/** * Set this {@link AxisAngle4f} to the given values. * * @param angle * the angle in radians * @param v * the rotation axis as a {@link Vector3f} * @return this */ public AxisAngle4f set(float angle, Vector3fc v) { return set(angle, v.x(), v.y(), v.z()); }
/** * Divide this Vector3f component-wise by another Vector3fc. * * @param v * the vector to divide by * @return a vector holding the result */ public Vector3f div(Vector3fc v) { return div(v.x(), v.y(), v.z(), thisOrNew()); }
public Vector3d fma(Vector3dc a, Vector3fc b, Vector3d dest) { dest.x = x + a.x() * b.x(); dest.y = y + a.y() * b.y(); dest.z = z + a.z() * b.z(); return dest; }
public Matrix4x3f reflect(Quaternionfc orientation, Vector3fc point, Matrix4x3f dest) { double num1 = orientation.x() + orientation.x(); double num2 = orientation.y() + orientation.y(); double num3 = orientation.z() + orientation.z(); float normalX = (float) (orientation.x() * num3 + orientation.w() * num2); float normalY = (float) (orientation.y() * num3 - orientation.w() * num1); float normalZ = (float) (1.0 - (orientation.x() * num1 + orientation.y() * num2)); return reflect(normalX, normalY, normalZ, point.x(), point.y(), point.z(), dest); }
public Matrix4f reflect(Quaternionfc orientation, Vector3fc point, Matrix4f dest) { double num1 = orientation.x() + orientation.x(); double num2 = orientation.y() + orientation.y(); double num3 = orientation.z() + orientation.z(); float normalX = (float) (orientation.x() * num3 + orientation.w() * num2); float normalY = (float) (orientation.y() * num3 - orientation.w() * num1); float normalZ = (float) (1.0 - (orientation.x() * num1 + orientation.y() * num2)); return reflect(normalX, normalY, normalZ, point.x(), point.y(), point.z(), dest); }