/// An infrared camera that tracks the position of a head-mounted display.
/// </summary>
publicclassOVRTracker
{
/// <summary>
/// The (symmetric) visible area in front of the sensor.
/// </summary>
publicstructFrustum
{
/// <summary>
/// The sensor's minimum supported distance to the HMD.
/// </summary>
publicfloatnearZ;
/// <summary>
/// The sensor's maximum supported distance to the HMD.
/// </summary>
publicfloatfarZ;
/// <summary>
/// The sensor's horizontal and vertical fields of view in degrees.
/// </summary>
publicVector2fov;
}
/// <summary>
/// If true, a sensor is attached to the system.
/// </summary>
publicboolisPresent
{
get{
if(!OVRManager.isHmdPresent)
returnfalse;
returnOVRPlugin.positionSupported;
}
}
/// <summary>
/// If true, the sensor is actively tracking the HMD's position. Otherwise the HMD may be temporarily occluded, the system may not support position tracking, etc.
/// </summary>
publicboolisPositionTracked
{
get{
returnOVRPlugin.positionTracked;
}
}
/// <summary>
/// If this is true and a sensor is available, the system will use position tracking when isPositionTracked is also true.
/// </summary>
publicboolisEnabled
{
get{
if(!OVRManager.isHmdPresent)
returnfalse;
returnOVRPlugin.position;
}
set{
if(!OVRManager.isHmdPresent)
return;
OVRPlugin.position=value;
}
}
/// <summary>
/// Returns the number of sensors currently connected to the system.