当前位置: 首页>>代码示例>>C++>>正文


C++ LLViewerRegion::getSimulatorFeatures方法代码示例

本文整理汇总了C++中LLViewerRegion::getSimulatorFeatures方法的典型用法代码示例。如果您正苦于以下问题:C++ LLViewerRegion::getSimulatorFeatures方法的具体用法?C++ LLViewerRegion::getSimulatorFeatures怎么用?C++ LLViewerRegion::getSimulatorFeatures使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LLViewerRegion的用法示例。


在下文中一共展示了LLViewerRegion::getSimulatorFeatures方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: parseSimulatorFeatures

void LLMuteList::parseSimulatorFeatures()
{
	LLViewerRegion* regionp = gAgent.getRegion();
	if (!regionp) return;

	LLSD info;
	regionp->getSimulatorFeatures(info);

	mGodLastNames.clear();
	mGodFullNames.clear();

	if (info.has("god_names"))
	{
		if (info["god_names"].has("last_names"))
		{
			LLSD godNames = info["god_names"]["last_names"];

			for (LLSD::array_iterator godNames_it = godNames.beginArray(); godNames_it != godNames.endArray(); ++godNames_it)
				mGodLastNames.insert((*godNames_it).asString());
		}

		if (info["god_names"].has("full_names"))
		{
			LLSD godNames = info["god_names"]["full_names"];

			for (LLSD::array_iterator godNames_it = godNames.beginArray(); godNames_it != godNames.endArray(); ++godNames_it)
				mGodFullNames.insert((*godNames_it).asString());
		}
	}
	else // Just use Linden
	{
		mGodLastNames.insert("Linden");
	}
}
开发者ID:ArxNet,项目名称:SingularityViewer,代码行数:34,代码来源:llmutelist.cpp

示例2: refresh

void LLPanelVolume::refresh()
{
	getState();
	if (mObject.notNull() && mObject->isDead())
	{
		mObject = NULL;
	}

	if (mRootObject.notNull() && mRootObject->isDead())
	{
		mRootObject = NULL;
	}

	BOOL visible = LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_DEFERRED) > 0 ? TRUE : FALSE;

	getChildView("label texture")->setVisible( visible);
	getChildView("Light FOV")->setVisible( visible);
	getChildView("Light Focus")->setVisible( visible);
	getChildView("Light Ambiance")->setVisible( visible);
	getChildView("light texture control")->setVisible( visible);
	
#if MESH_ENABLED
	bool enable_mesh = false;

	LLSD sim_features;
	LLViewerRegion *region = gAgent.getRegion();
	if(region)
	{
		LLSD sim_features;
		region->getSimulatorFeatures(sim_features);		 
		enable_mesh = sim_features.has("PhysicsShapeTypes");
	}
	getChildView("label physicsshapetype")->setVisible(enable_mesh);
	getChildView("Physics Shape Type Combo Ctrl")->setVisible(enable_mesh);
	getChildView("Physics Gravity")->setVisible(enable_mesh);
	getChildView("Physics Friction")->setVisible(enable_mesh);
	getChildView("Physics Density")->setVisible(enable_mesh);
	getChildView("Physics Restitution")->setVisible(enable_mesh);
	
    /* TODO: add/remove individual physics shape types as per the PhysicsShapeTypes simulator features */
#endif //MESH_ENABLED
}
开发者ID:Logear,项目名称:PartyHatViewer,代码行数:42,代码来源:llpanelvolume.cpp


注:本文中的LLViewerRegion::getSimulatorFeatures方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。