本文整理汇总了C++中Profile::SetFloatValues方法的典型用法代码示例。如果您正苦于以下问题:C++ Profile::SetFloatValues方法的具体用法?C++ Profile::SetFloatValues怎么用?C++ Profile::SetFloatValues使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Profile
的用法示例。
在下文中一共展示了Profile::SetFloatValues方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetDefaultProfile
// Returns a profile with all system default values
Profile* ProfileManager::GetDefaultProfile(HmdTypeEnum device)
{
// In the absence of any data, set some reasonable profile defaults.
// However, this is not future proof and developers should still
// provide reasonable default values for queried fields.
// Biometric data
Profile* profile = CreateProfile();
profile->SetValue(OVR_KEY_USER, "default");
profile->SetValue(OVR_KEY_NAME, "Default");
profile->SetValue(OVR_KEY_GENDER, OVR_DEFAULT_GENDER);
profile->SetFloatValue(OVR_KEY_PLAYER_HEIGHT, OVR_DEFAULT_PLAYER_HEIGHT);
profile->SetFloatValue(OVR_KEY_EYE_HEIGHT, OVR_DEFAULT_EYE_HEIGHT);
profile->SetFloatValue(OVR_KEY_IPD, OVR_DEFAULT_IPD);
float half_ipd[2] = { OVR_DEFAULT_IPD / 2, OVR_DEFAULT_IPD / 2 };
profile->SetFloatValues(OVR_KEY_EYE_TO_NOSE_DISTANCE, half_ipd, 2);
float dist[2] = {OVR_DEFAULT_NECK_TO_EYE_HORIZONTAL, OVR_DEFAULT_NECK_TO_EYE_VERTICAL};
profile->SetFloatValues(OVR_KEY_NECK_TO_EYE_DISTANCE, dist, 2);
// Device specific data
if (device != HmdType_None)
{
if (device == HmdType_CrystalCoveProto || device == HmdType_DK2)
{
profile->SetValue("EyeCup", "A");
profile->SetIntValue(OVR_KEY_EYE_RELIEF_DIAL, OVR_DEFAULT_EYE_RELIEF_DIAL);
// TODO: These defaults are a little bogus and designed for continuity with 0.3
// eye-relief values. We need better measurement-based numbers in future releases
float max_eye_plate[2] = { 0.01965f + 0.017f, 0.01965f + 0.017f };
profile->SetFloatValues(OVR_KEY_MAX_EYE_TO_PLATE_DISTANCE, max_eye_plate, 2);
}
else
{ // DK1 and DKHD variants
profile->SetValue("EyeCup", "A");
profile->SetIntValue(OVR_KEY_EYE_RELIEF_DIAL, OVR_DEFAULT_EYE_RELIEF_DIAL);
// TODO: These defaults are a little bogus and designed for continuity with 0.3
// DK1 distortion. We need better measurement-based numbers in future releases
float max_eye_plate[2] = { 0.02357f + 0.017f, 0.02357f + 0.017f };
profile->SetFloatValues(OVR_KEY_MAX_EYE_TO_PLATE_DISTANCE, max_eye_plate, 2);
}
}
return profile;
}