本文整理汇总了C++中LLPanelVolume::refresh方法的典型用法代码示例。如果您正苦于以下问题:C++ LLPanelVolume::refresh方法的具体用法?C++ LLPanelVolume::refresh怎么用?C++ LLPanelVolume::refresh使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLPanelVolume
的用法示例。
在下文中一共展示了LLPanelVolume::refresh方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onCommitFlexible
// static
void LLPanelVolume::onCommitFlexible( LLUICtrl* ctrl, void* userdata )
{
LLPanelVolume* self = (LLPanelVolume*) userdata;
LLViewerObject* objectp = self->mObject;
if (!objectp || (objectp->getPCode() != LL_PCODE_VOLUME))
{
return;
}
LLFlexibleObjectData *attributes = (LLFlexibleObjectData *)objectp->getParameterEntry(LLNetworkData::PARAMS_FLEXIBLE);
if (attributes)
{
LLFlexibleObjectData new_attributes;
new_attributes = *attributes;
new_attributes.setSimulateLOD(self->getChild<LLUICtrl>("FlexNumSections")->getValue().asInteger());//(S32)self->mSpinSections->get());
new_attributes.setGravity((F32)self->getChild<LLUICtrl>("FlexGravity")->getValue().asReal());
new_attributes.setTension((F32)self->getChild<LLUICtrl>("FlexTension")->getValue().asReal());
new_attributes.setAirFriction((F32)self->getChild<LLUICtrl>("FlexFriction")->getValue().asReal());
new_attributes.setWindSensitivity((F32)self->getChild<LLUICtrl>("FlexWind")->getValue().asReal());
F32 fx = (F32)self->getChild<LLUICtrl>("FlexForceX")->getValue().asReal();
F32 fy = (F32)self->getChild<LLUICtrl>("FlexForceY")->getValue().asReal();
F32 fz = (F32)self->getChild<LLUICtrl>("FlexForceZ")->getValue().asReal();
LLVector3 force(fx,fy,fz);
new_attributes.setUserForce(force);
objectp->setParameterEntry(LLNetworkData::PARAMS_FLEXIBLE, new_attributes, true);
}
// Values may fail validation
self->refresh();
}