I want to write Custom Matrix class that will allow me to do following things:
Matrix m = Matrix().identity();
m.rotateAngle(30);
m.scale(2.0);
m.scale(1.5);
m.rotateAngle(30);
All operations above are clear for me but Now I want such thing to do: I want to write a function like: setRotationAngle or setScale which will set value what's passed no matter what's in current value
// for example:
m.setAngle(45); // clears the currentRotationAngle and then sets rotation to 45
Is there a way to do that? or Game Engines and such stuff just rebuild the matrix if someone wants to set some property?
Is there some tutorial which will help me to understand that problem?