本文整理汇总了C++中LLVOVolume::canBeFlexible方法的典型用法代码示例。如果您正苦于以下问题:C++ LLVOVolume::canBeFlexible方法的具体用法?C++ LLVOVolume::canBeFlexible怎么用?C++ LLVOVolume::canBeFlexible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLVOVolume
的用法示例。
在下文中一共展示了LLVOVolume::canBeFlexible方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getState
//.........这里部分代码省略.........
getChild<LLUICtrl>("Light Focus")->setValue(params.mV[1]);
getChild<LLUICtrl>("Light Ambiance")->setValue(params.mV[2]);
mLightSavedColor = volobjp->getLightColor();
}
else
{
getChild<LLSpinCtrl>("Light Intensity", true)->clear();
getChild<LLSpinCtrl>("Light Radius", true)->clear();
getChild<LLSpinCtrl>("Light Falloff", true)->clear();
getChildView("label color")->setEnabled(false);
LLColorSwatchCtrl* LightColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch");
if(LightColorSwatch)
{
LightColorSwatch->setEnabled( FALSE );
LightColorSwatch->setValid( FALSE );
}
LLTextureCtrl* LightTextureCtrl = getChild<LLTextureCtrl>("light texture control");
if (LightTextureCtrl)
{
LightTextureCtrl->setEnabled(FALSE);
LightTextureCtrl->setValid(FALSE);
}
getChildView("Light Intensity")->setEnabled(false);
getChildView("Light Radius")->setEnabled(false);
getChildView("Light Falloff")->setEnabled(false);
getChildView("Light FOV")->setEnabled(false);
getChildView("Light Focus")->setEnabled(false);
getChildView("Light Ambiance")->setEnabled(false);
}
// Flexible properties
BOOL is_flexible = volobjp && volobjp->isFlexible();
getChild<LLUICtrl>("Flexible1D Checkbox Ctrl")->setValue(is_flexible);
if (is_flexible || (volobjp && volobjp->canBeFlexible()))
{
getChildView("Flexible1D Checkbox Ctrl")->setEnabled(editable && single_volume && volobjp);
}
else
{
getChildView("Flexible1D Checkbox Ctrl")->setEnabled(false);
}
if (is_flexible && editable && single_volume)
{
getChildView("FlexNumSections")->setVisible(true);
getChildView("FlexGravity")->setVisible(true);
getChildView("FlexTension")->setVisible(true);
getChildView("FlexFriction")->setVisible(true);
getChildView("FlexWind")->setVisible(true);
getChildView("FlexForceX")->setVisible(true);
getChildView("FlexForceY")->setVisible(true);
getChildView("FlexForceZ")->setVisible(true);
getChildView("FlexNumSections")->setEnabled(true);
getChildView("FlexGravity")->setEnabled(true);
getChildView("FlexTension")->setEnabled(true);
getChildView("FlexFriction")->setEnabled(true);
getChildView("FlexWind")->setEnabled(true);
getChildView("FlexForceX")->setEnabled(true);
getChildView("FlexForceY")->setEnabled(true);
getChildView("FlexForceZ")->setEnabled(true);
LLFlexibleObjectData *attributes = (LLFlexibleObjectData *)objectp->getParameterEntry(LLNetworkData::PARAMS_FLEXIBLE);
getChild<LLUICtrl>("FlexNumSections")->setValue((F32)attributes->getSimulateLOD());
getChild<LLUICtrl>("FlexGravity")->setValue(attributes->getGravity());
getChild<LLUICtrl>("FlexTension")->setValue(attributes->getTension());
getChild<LLUICtrl>("FlexFriction")->setValue(attributes->getAirFriction());
getChild<LLUICtrl>("FlexWind")->setValue(attributes->getWindSensitivity());
getChild<LLUICtrl>("FlexForceX")->setValue(attributes->getUserForce().mV[VX]);
getChild<LLUICtrl>("FlexForceY")->setValue(attributes->getUserForce().mV[VY]);
getChild<LLUICtrl>("FlexForceZ")->setValue(attributes->getUserForce().mV[VZ]);
}
else
{
getChild<LLSpinCtrl>("FlexNumSections", true)->clear();
getChild<LLSpinCtrl>("FlexGravity", true)->clear();
getChild<LLSpinCtrl>("FlexTension", true)->clear();
getChild<LLSpinCtrl>("FlexFriction", true)->clear();
getChild<LLSpinCtrl>("FlexWind", true)->clear();
getChild<LLSpinCtrl>("FlexForceX", true)->clear();
getChild<LLSpinCtrl>("FlexForceY", true)->clear();
getChild<LLSpinCtrl>("FlexForceZ", true)->clear();
getChildView("FlexNumSections")->setEnabled(false);
getChildView("FlexGravity")->setEnabled(false);
getChildView("FlexTension")->setEnabled(false);
getChildView("FlexFriction")->setEnabled(false);
getChildView("FlexWind")->setEnabled(false);
getChildView("FlexForceX")->setEnabled(false);
getChildView("FlexForceY")->setEnabled(false);
getChildView("FlexForceZ")->setEnabled(false);
}
mObject = objectp;
mRootObject = root_objectp;
}
示例2: getState
//.........这里部分代码省略.........
else
{
getChild<LLSpinCtrl>("Light Intensity", true)->clear();
getChild<LLSpinCtrl>("Light Radius", true)->clear();
getChild<LLSpinCtrl>("Light Falloff", true)->clear();
getChildView("label color")->setEnabled(false);
LLColorSwatchCtrl* LightColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch");
if(LightColorSwatch)
{
LightColorSwatch->setEnabled( FALSE );
LightColorSwatch->setValid( FALSE );
}
childSetEnabled("label texture",false);
LLTextureCtrl* LightTextureCtrl = getChild<LLTextureCtrl>("light texture control");
if (LightTextureCtrl)
{
LightTextureCtrl->setEnabled(FALSE);
LightTextureCtrl->setValid(FALSE);
}
getChildView("Light Intensity")->setEnabled(false);
getChildView("Light Radius")->setEnabled(false);
getChildView("Light Falloff")->setEnabled(false);
getChildView("Light FOV")->setEnabled(false);
getChildView("Light Focus")->setEnabled(false);
getChildView("Light Ambiance")->setEnabled(false);
}
// Flexible properties
BOOL is_flexible = volobjp && volobjp->isFlexible();
getChild<LLUICtrl>("Flexible1D Checkbox Ctrl")->setValue(is_flexible);
if (is_flexible || (volobjp && volobjp->canBeFlexible()))
{
getChildView("Flexible1D Checkbox Ctrl")->setEnabled(editable && single_volume && volobjp && !volobjp->isMesh() && !objectp->isPermanentEnforced());
}
else
{
getChildView("Flexible1D Checkbox Ctrl")->setEnabled(false);
}
if (is_flexible && editable && single_volume)
{
getChildView("FlexNumSections")->setVisible(true);
getChildView("FlexGravity")->setVisible(true);
getChildView("FlexTension")->setVisible(true);
getChildView("FlexFriction")->setVisible(true);
getChildView("FlexWind")->setVisible(true);
getChildView("FlexForceX")->setVisible(true);
getChildView("FlexForceY")->setVisible(true);
getChildView("FlexForceZ")->setVisible(true);
getChildView("FlexNumSections")->setEnabled(true);
getChildView("FlexGravity")->setEnabled(true);
getChildView("FlexTension")->setEnabled(true);
getChildView("FlexFriction")->setEnabled(true);
getChildView("FlexWind")->setEnabled(true);
getChildView("FlexForceX")->setEnabled(true);
getChildView("FlexForceY")->setEnabled(true);
getChildView("FlexForceZ")->setEnabled(true);
LLFlexibleObjectData *attributes = (LLFlexibleObjectData *)objectp->getParameterEntry(LLNetworkData::PARAMS_FLEXIBLE);
getChild<LLUICtrl>("FlexNumSections")->setValue((F32)attributes->getSimulateLOD());
getChild<LLUICtrl>("FlexGravity")->setValue(attributes->getGravity());
getChild<LLUICtrl>("FlexTension")->setValue(attributes->getTension());
示例3: getState
//.........这里部分代码省略.........
}
else
{
getChild<LLSpinCtrl>("Light Intensity", true)->clear();
getChild<LLSpinCtrl>("Light Radius", true)->clear();
getChild<LLSpinCtrl>("Light Falloff", true)->clear();
childSetEnabled("label color",false);
LLColorSwatchCtrl* LightColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch");
if(LightColorSwatch)
{
LightColorSwatch->setEnabled( FALSE );
LightColorSwatch->setValid( FALSE );
}
childSetEnabled("label texture",false);
LLTextureCtrl* LightTextureCtrl = getChild<LLTextureCtrl>("light texture control");
if (LightTextureCtrl)
{
LightTextureCtrl->setEnabled(FALSE);
LightTextureCtrl->setValid(FALSE);
}
childSetEnabled("Light Intensity",false);
childSetEnabled("Light Radius",false);
childSetEnabled("Light Falloff",false);
childSetEnabled("Light FOV",false);
childSetEnabled("Light Focus",false);
childSetEnabled("Light Ambiance",false);
}
// Flexible properties
BOOL is_flexible = volobjp && volobjp->isFlexible();
childSetValue("Flexible1D Checkbox Ctrl",is_flexible);
if (is_flexible || (volobjp && volobjp->canBeFlexible()))
{
childSetEnabled("Flexible1D Checkbox Ctrl", editable && single_volume && volobjp);
}
else
{
childSetEnabled("Flexible1D Checkbox Ctrl", false);
}
if (is_flexible && editable && single_volume)
{
childSetVisible("FlexNumSections",true);
childSetVisible("FlexGravity",true);
childSetVisible("FlexTension",true);
childSetVisible("FlexFriction",true);
childSetVisible("FlexWind",true);
childSetVisible("FlexForceX",true);
childSetVisible("FlexForceY",true);
childSetVisible("FlexForceZ",true);
childSetEnabled("FlexNumSections",true);
childSetEnabled("FlexGravity",true);
childSetEnabled("FlexTension",true);
childSetEnabled("FlexFriction",true);
childSetEnabled("FlexWind",true);
childSetEnabled("FlexForceX",true);
childSetEnabled("FlexForceY",true);
childSetEnabled("FlexForceZ",true);
LLFlexibleObjectData *attributes = (LLFlexibleObjectData *)objectp->getParameterEntry(LLNetworkData::PARAMS_FLEXIBLE);
childSetValue("FlexNumSections",(F32)attributes->getSimulateLOD());
childSetValue("FlexGravity",attributes->getGravity());
childSetValue("FlexTension",attributes->getTension());