mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 14:44:36 +00:00
Baseline working openvr code
This commit is contained in:
parent
e239d106f5
commit
ba91478fad
23 changed files with 1463 additions and 457 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#include "T3D/gameBase/extended/extendedMove.h"
|
||||
#include "core/stream/bitStream.h"
|
||||
#include "math/mathIO.h"
|
||||
#include "math/mAngAxis.h"
|
||||
#include "core/module.h"
|
||||
#include "console/consoleTypes.h"
|
||||
#include "core/strings/stringFunctions.h"
|
||||
|
|
@ -268,7 +269,7 @@ void ExtendedMove::clamp()
|
|||
crotX[i] = CLAMPROT(rotX[i]);
|
||||
crotY[i] = CLAMPROT(rotY[i]);
|
||||
crotZ[i] = CLAMPROT(rotZ[i]);
|
||||
crotW[i] = CLAMPROT(rotW[i]);
|
||||
crotW[i] = CLAMPROT(rotW[i] / M_2PI_F);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -293,7 +294,7 @@ void ExtendedMove::unclamp()
|
|||
rotX[i] = UNCLAMPROT(crotX[i]);
|
||||
rotY[i] = UNCLAMPROT(crotY[i]);
|
||||
rotZ[i] = UNCLAMPROT(crotZ[i]);
|
||||
rotW[i] = UNCLAMPROT(crotW[i]);
|
||||
rotW[i] = UNCLAMPROT(crotW[i]) * M_2PI_F;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -75,11 +75,11 @@ bool ExtendedMoveList::getNextExtMove( ExtendedMove &curMove )
|
|||
else
|
||||
{
|
||||
//Rotation is passed in as an Angle Axis in degrees. We need to convert this into a Quat.
|
||||
QuatF q(Point3F(ExtendedMoveManager::mRotAX[i], ExtendedMoveManager::mRotAY[i], ExtendedMoveManager::mRotAZ[i]), mDegToRad(ExtendedMoveManager::mRotAA[i]));
|
||||
curMove.rotX[i] = q.x;
|
||||
curMove.rotY[i] = q.y;
|
||||
curMove.rotZ[i] = q.z;
|
||||
curMove.rotW[i] = q.w;
|
||||
AngAxisF q(Point3F(ExtendedMoveManager::mRotAX[i], ExtendedMoveManager::mRotAY[i], ExtendedMoveManager::mRotAZ[i]), mDegToRad(ExtendedMoveManager::mRotAA[i]));
|
||||
curMove.rotX[i] = q.axis.x;
|
||||
curMove.rotY[i] = q.axis.y;
|
||||
curMove.rotZ[i] = q.axis.z;
|
||||
curMove.rotW[i] = q.angle;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue