MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / HTextureCreate2DRotMat

Function HTextureCreate2DRotMat

editor/HTexture.cpp:562–572  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

560}
561
562void HTextureCreate2DRotMat(float *rotmat, angle ang) {
563 float sinang, cosang;
564
565 sinang = FixSin(ang);
566 cosang = FixCos(ang);
567
568 rotmat[0] = cosang;
569 rotmat[1] = sinang;
570 rotmat[2] = -sinang;
571 rotmat[3] = cosang;
572}
573
574void HTextureRotUVTerrainPoint(g3UVL *uvrot, float *rotmat, g3UVL *uv, g3UVL *uvcenter) {
575 uvrot->u = ((uv->u - uvcenter->u) * rotmat[0]) + ((uv->v - uvcenter->v) * rotmat[1]) + uvcenter->u;

Callers 1

HTextureRotateFunction · 0.85

Calls 2

FixSinFunction · 0.50
FixCosFunction · 0.50

Tested by

no test coverage detected