MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/PhysX / EulerToMat33

Function EulerToMat33

physx/samples/samplebase/SampleCamera.cpp:62–75  ·  view source on GitHub ↗

PT: TODO: copied from SampleApplication. Refactor.

Source from the content-addressed store, hash-verified

60
61// PT: TODO: copied from SampleApplication. Refactor.
62static PxMat33 EulerToMat33(const PxVec3 &e)
63{
64 float c1 = cosf(e.z);
65 float s1 = sinf(e.z);
66 float c2 = cosf(e.y);
67 float s2 = sinf(e.y);
68 float c3 = cosf(e.x);
69 float s3 = sinf(e.x);
70 PxMat33 m(PxVec3(c1*c2, -s1*c2, s2),
71 PxVec3((s1*c3)+(c1*s2*s3), (c1*c3)-(s1*s2*s3),-c2*s3),
72 PxVec3((s1*s3)-(c1*s2*c3), (c1*s3)+(s1*s2*c3), c2*c3));
73
74 return m;
75}
76
77void Camera::updateInternals()
78{

Callers 1

updateInternalsMethod · 0.70

Calls 1

PxVec3Class · 0.50

Tested by

no test coverage detected