本文整理汇总了C++中SensorFusion::Reset方法的典型用法代码示例。如果您正苦于以下问题:C++ SensorFusion::Reset方法的具体用法?C++ SensorFusion::Reset怎么用?C++ SensorFusion::Reset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SensorFusion
的用法示例。
在下文中一共展示了SensorFusion::Reset方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnKey
void InputTestApp::OnKey(KeyCode key, int chr, bool down, int modifiers)
{
OVR_UNUSED2(chr, modifiers);
switch (key)
{
case Key_Q:
if (!down)
pPlatform->Exit(0);
break;
case Key_F1:
CurrentView = View_Perspective;
SetView(CurrentView);
//UpdateWindowTitle();
break;
case Key_F2:
CurrentView = View_XY_DownZ;
SetView(CurrentView);
break;
case Key_F3:
CurrentView = View_XZ_UpY;
SetView(CurrentView);
break;
case Key_R:
if (down)
{
SFusion.Reset();
SFusion2.Reset();
}
break;
case Key_H:
if (down && pSensor)
{
SensorDevice::CoordinateFrame coord = pSensor->GetCoordinateFrame();
pSensor->SetCoordinateFrame(
(coord == SensorDevice::Coord_Sensor) ?
SensorDevice::Coord_HMD : SensorDevice::Coord_Sensor);
SFusion.Reset();
SFusion2.Reset();
}
break;
case Key_G:
if (down)
{
SFusion.SetGravityEnabled(!SFusion.IsGravityEnabled());
SFusion2.SetGravityEnabled(SFusion.IsGravityEnabled());
}
break;
case Key_A:
if (down)
{
if (!pSensor2)
{
LogText("Angle: %2.3f\n", CalcDownAngleDegrees(SFusion.GetOrientation()));
}
else
{
LogText("Angle: %2.3f Secondary Sensor Angle: %2.3f\n",
CalcDownAngleDegrees(SFusion.GetOrientation()),
CalcDownAngleDegrees(SFusion2.GetOrientation()));
}
}
break;
/*
case Key_End:
if (!down)
{
OriAdjust = OriSensor.Conj();
Sc.ViewPoint.SetOrientation(Quatf());
}
break; */
default:
break;
}
}
示例2: ResetRift
extern "C" RIFTAPI_API bool ResetRift()
{
SFusion.Reset();
return true;
}