Added scaling operation in Matrix4f
This commit is contained in:
@ -48,6 +48,15 @@ public class Matrix4f {
|
||||
return result;
|
||||
}
|
||||
|
||||
public static Matrix4f scale(Vector3f vector){
|
||||
Matrix4f result= identity();
|
||||
result.elements[0 + 0*4] = vector.x;
|
||||
result.elements[1 + 1*4] = vector.y;
|
||||
result.elements[2 + 2*4] = vector.z;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static Matrix4f rotateX(float angle){
|
||||
Matrix4f result = identity();
|
||||
float r = (float) Math.toRadians(angle);
|
||||
|
Reference in New Issue
Block a user