/** * Rotates this vector by the given angle in degrees around the given axis. * * @param axis the axis * @param degrees the angle in degrees * @return This vector for chaining */ public Vector3 rotate(final Vector3 axis, float degrees) { tmpMat.setToRotation(axis, degrees); return this.mul(tmpMat); }
/** * Rotates this vector by the given angle around the given axis. * * @param axis * @param angle the angle * @return This vector for chaining */ public Vector3 rotate(final Vector3 axis, float angle) { tmpMat.setToRotation(axis, angle); return this.mul(tmpMat); }
/** * Rotates this vector by the given angle in degrees around the given axis. * * @param degrees the angle in degrees * @param axisX the x-component of the axis * @param axisY the y-component of the axis * @param axisZ the z-component of the axis * @return This vector for chaining */ public Vector3 rotate(float degrees, float axisX, float axisY, float axisZ) { return this.mul(tmpMat.setToRotation(axisX, axisY, axisZ, degrees)); }
/** * Rotates this vector by the given angle around the given axis. * * @param axisX the x-component of the axis * @param axisY the y-component of the axis * @param axisZ the z-component of the axis * @return This vector for chaining */ public Vector3 rotate(float angle, float axisX, float axisY, float axisZ) { return this.mul(tmpMat.setToRotation(axisX, axisY, axisZ, angle)); }