History

Added eulerToOrthonormals function for Brad in Util.cpp, sample execution at start of main.

Philip Rosedale committed 13 years ago

Commit d2009361 parent 64eed6d3 files · +47 −1Browse files

Showing the changes to interface/src/main.cpp (1 of 3 files). Show all

Unified · Split

interface/src/main.cpp+14−1
@@ -1510,7 +1510,20 @@ void audioMixerUpdate(in_addr_t newMixerAddress, in_port_t newMixerPort) { · 1509 unmodified lines
15101510 int main(int argc, const char * argv[])
15111511 {
15121512 // Quick test of the Orientation class on startup!
1513− testOrientationClass();
1513+ //testOrientationClass(); // PER - commented out to test orthonormal code
1514+
1515+ //
1516+ // For Brad: Demo of function to test conversion of euler angles to orthonormals
1517+ // (Note that the euler angles order is Pitch, Yaw, Roll, and in radians)
1518+ //
1519+ glm::vec3 angles(0, PI/4, 0);
1520+ glm::vec3 fwd, left, up;
1521+
1522+ eulerToOrthonormals(&angles, &fwd, &left, &up);
1523+
1524+ printf("fwd: %4.2f, %4.2f, %4.2f\n", fwd.x, fwd.y, fwd.z);
1525+ printf("left: %4.2f, %4.2f, %4.2f\n", left.x, left.y, left.z);
1526+ printf("up: %4.2f, %4.2f, %4.2f\n", up.x, up.y, up.z);
15141527
15151528 AgentList::createInstance(AGENT_TYPE_INTERFACE);
15161529