I'm trying to implement yaw pitch roll for visualisation camera yaw pitch roll more then 360 degree like in Maya, Blender, Unreal Engine, Unity etc. All this application can show angles in gui more then 360 degree and no have any Gimbal lock problems.
current psevdo code;
Quaternion rotation; //relative (local rotation)
Quaternion parentRotation;
//it is psevdo code where we calculate delta angle that user generate on current frame by mouse
void SetDeltaWorldRotationFromUserInput(Quaternion value)
{
SetWorldRotation(value);
}
void SetWorldRotation(Quaternion value)
{
SetLocalRotation(parentQuaternion.inverted() * value); //get/set local rotation
}
void SetLocalRotation(Quaternion value)
{
rotation = value; //this we save new local rotation but i want to save somehow more then 360 degree
auto eulersForGui = value.toEulers(); //it is current eulers but i want to accumulate and show in gui accumulate rotation. like currentRotation + delta or somehow
auto deltaEulers = (value * rotation.inverted()).toEulers(); //i can get delta eulers but i can't add it to euelers and don't know what i need to do with this value
}