本文整理汇总了C++中LLSD::asFloat方法的典型用法代码示例。如果您正苦于以下问题:C++ LLSD::asFloat方法的具体用法?C++ LLSD::asFloat怎么用?C++ LLSD::asFloat使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLSD
的用法示例。
在下文中一共展示了LLSD::asFloat方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onVolumeChange
// Singu Note: The following callbacks are not found upstream
void LLParticipantList::onVolumeChange(const LLSD& param)
{
// Singu Note: Allow modifying own voice volume during a voice session (Which is valued at half of what it should be)
const LLUUID& speaker_id = mAvatarList->getValue().asUUID();
if (gAgentID == speaker_id)
{
gSavedSettings.setF32("AudioLevelMic", param.asFloat()*2);
}
else
{
LLVoiceClient::getInstance()->setUserVolume(speaker_id, param.asFloat());
}
}
示例2: onHoverSliderMoved
void onHoverSliderMoved(const LLSD& val)
{
F32 value = val.asFloat();
LLVector3 offset(0.0, 0.0, llclamp(value,MIN_HOVER_Z,MAX_HOVER_Z));
LL_INFOS("Avatar") << "setting hover from slider moved" << offset[2] << LL_ENDL;
gAgentAvatarp->setHoverOffset(offset, false);
}
示例3: onHoverSliderFinalCommit
// Do send-to-the-server work when slider drag completes, or new
// value entered as text.
void onHoverSliderFinalCommit(const LLSD& val)
{
F32 value = val.asFloat();
gSavedPerAccountSettings.setF32("AvatarHoverOffsetZ", value);
LLVector3 offset(0.0, 0.0, llclamp(value,MIN_HOVER_Z,MAX_HOVER_Z));
LL_INFOS("Avatar") << "setting hover from slider final commit " << offset[2] << LL_ENDL;
gAgentAvatarp->setHoverOffset(offset, true); // will send update this time.
}
示例4: onChangeDayTime
void wlfPanel_AdvSettings::onChangeDayTime(const LLSD& value)
{
// deactivate animator
LLWLParamManager& inst(LLWLParamManager::instance());
inst.mAnimator.deactivate();
F32 val = value.asFloat() + 0.25f;
if (val > 1.0f) --val;
inst.mAnimator.setDayTime((F64)val);
inst.mAnimator.update(inst.mCurParams);
}
示例5: handleStateMachineMaxTimeChanged
bool handleStateMachineMaxTimeChanged(const LLSD& newvalue)
{
F32 StateMachineMaxTime = newvalue.asFloat();
AIEngine::setMaxCount(StateMachineMaxTime);
return true;
}