MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / setAffineTransform

Method setAffineTransform

source/game/StarNetworkedAnimator.cpp:992–999  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

990}
991
992void NetworkedAnimator::TransformationGroup::setAffineTransform(Mat3F const& matrix) {
993 xTranslation.set(matrix[0][2]);
994 yTranslation.set(matrix[1][2]);
995 xScale.set(sqrt(square(matrix[0][0]) + square(matrix[0][1])));
996 yScale.set(sqrt(square(matrix[1][0]) + square(matrix[1][1])));
997 xShear.set(atan2(matrix[0][1], matrix[0][0]));
998 yShear.set(atan2(matrix[1][0], matrix[1][1]));
999}
1000
1001void NetworkedAnimator::setupNetStates() {
1002 clearNetElements();

Calls 2

squareFunction · 0.85
setMethod · 0.45

Tested by

no test coverage detected