Added scale to Matrix4f
This commit is contained in:
parent
81dc347de0
commit
56e8d511bd
|
@ -464,6 +464,27 @@ public class Matrix4f extends Matrix {
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Scales this matrix
|
||||
* @param vec The vector to scale by
|
||||
* @return this
|
||||
*/
|
||||
public Matrix4f scale(Vector3f vec) {
|
||||
m00 *= vec.x;
|
||||
m01 *= vec.x;
|
||||
m02 *= vec.x;
|
||||
m03 *= vec.x;
|
||||
m10 *= vec.y;
|
||||
m11 *= vec.y;
|
||||
m12 *= vec.y;
|
||||
m13 *= vec.y;
|
||||
m20 *= vec.z;
|
||||
m21 *= vec.z;
|
||||
m22 *= vec.z;
|
||||
m23 *= vec.z;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Rotates the matrix around the given axis the specified angle
|
||||
* @param angle the angle, in degrees.
|
||||
|
|
Loading…
Reference in New Issue