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


C++ LLColor4函数代码示例

本文整理汇总了C++中LLColor4函数的典型用法代码示例。如果您正苦于以下问题:C++ LLColor4函数的具体用法?C++ LLColor4怎么用?C++ LLColor4使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: LLColor4

LLColor4 LLSky::getFogColor() const
{
	if (mVOSkyp)
	{
		return mVOSkyp->getFogColor();
	}

	return LLColor4(1.f, 1.f, 1.f, 1.f);
}
开发者ID:Xara,项目名称:Opensource-V2-SL-Viewer,代码行数:9,代码来源:llsky.cpp

示例2: LLAlphaObject

LLVOPartGroup::LLVOPartGroup(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
	:	LLAlphaObject(id, pcode, regionp),
		mViewerPartGroupp(NULL)
{
	setNumTEs(1);
	setTETexture(0, LLUUID::null);
	mbCanSelect = FALSE;			// users can't select particle systems
	mDebugColor = LLColor4(ll_frand(), ll_frand(), ll_frand(), 1.f);
}
开发者ID:Boy,项目名称:netbook,代码行数:9,代码来源:llvopartgroup.cpp

示例3: LLColor4

void LLManip::renderXYZ(const LLVector3 &vec) 
{
	const S32 PAD = 10;
	std::string feedback_string;
	LLVector3 camera_pos = LLViewerCamera::getInstance()->getOrigin() + LLViewerCamera::getInstance()->getAtAxis();
	S32 window_center_x = gViewerWindow->getWorldViewRectScaled().getWidth() / 2;
	S32 window_center_y = gViewerWindow->getWorldViewRectScaled().getHeight() / 2;
	S32 vertical_offset = window_center_y - VERTICAL_OFFSET;
	

	gGL.pushMatrix();
	{
		LLUIImagePtr imagep = LLUI::getUIImage("rounded_square.tga");
		gViewerWindow->setup2DRender();
		const LLVector2& display_scale = gViewerWindow->getDisplayScale();
		gGL.scalef(display_scale.mV[VX], display_scale.mV[VY], 1.f);
		gGL.color4f(0.f, 0.f, 0.f, 0.7f);

		imagep->draw(
			window_center_x - 115, 
			window_center_y + vertical_offset - PAD, 
			235,
			PAD * 2 + 10, 
			LLColor4(0.f, 0.f, 0.f, 0.7f) );
	}
	gGL.popMatrix();

	gViewerWindow->setup3DRender();

	{
		LLFontGL* font = LLFontGL::getFontSansSerif();
		LLLocale locale(LLLocale::USER_LOCALE);
		LLGLDepthTest gls_depth(GL_FALSE);
		// render drop shadowed text
		feedback_string = llformat("X: %.3f", vec.mV[VX]);
		hud_render_text(utf8str_to_wstring(feedback_string), camera_pos, *font, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -102.f + 1.f, (F32)vertical_offset - 1.f, LLColor4::black, FALSE);

		feedback_string = llformat("Y: %.3f", vec.mV[VY]);
		hud_render_text(utf8str_to_wstring(feedback_string), camera_pos, *font, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -27.f + 1.f, (F32)vertical_offset - 1.f, LLColor4::black, FALSE);
		
		feedback_string = llformat("Z: %.3f", vec.mV[VZ]);
		hud_render_text(utf8str_to_wstring(feedback_string), camera_pos, *font, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, 48.f + 1.f, (F32)vertical_offset - 1.f, LLColor4::black, FALSE);

		// render text on top
		feedback_string = llformat("X: %.3f", vec.mV[VX]);
		hud_render_text(utf8str_to_wstring(feedback_string), camera_pos, *font, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -102.f, (F32)vertical_offset, LLColor4(1.f, 0.5f, 0.5f, 1.f), FALSE);

		gGL.diffuseColor3f(0.5f, 1.f, 0.5f);
		feedback_string = llformat("Y: %.3f", vec.mV[VY]);
		hud_render_text(utf8str_to_wstring(feedback_string), camera_pos, *font, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -27.f, (F32)vertical_offset, LLColor4(0.5f, 1.f, 0.5f, 1.f), FALSE);
		
		gGL.diffuseColor3f(0.5f, 0.5f, 1.f);
		feedback_string = llformat("Z: %.3f", vec.mV[VZ]);
		hud_render_text(utf8str_to_wstring(feedback_string), camera_pos, *font, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, 48.f, (F32)vertical_offset, LLColor4(0.5f, 0.5f, 1.f, 1.f), FALSE);
	}
}
开发者ID:CmdrCupcake,项目名称:SingularityViewer,代码行数:56,代码来源:llmanip.cpp

示例4: LLView

LLStatGraph::LLStatGraph(const std::string& name, const LLRect& rect)
		:	LLView(name, rect, TRUE)
{
	mStatp = NULL;
	setToolTip(name);
	mNumThresholds = 3;
	mThresholdColors[0] = LLColor4(0.f, 1.f, 0.f, 1.f);
	mThresholdColors[1] = LLColor4(1.f, 1.f, 0.f, 1.f);
	mThresholdColors[2] = LLColor4(1.f, 0.f, 0.f, 1.f);
	mThresholdColors[3] = LLColor4(1.f, 0.f, 0.f, 1.f);
	mThresholds[0] = 50.f;
	mThresholds[1] = 75.f;
	mThresholds[2] = 100.f;
	mMin = 0.f;
	mMax = 125.f;
	mPerSec = TRUE;
	mValue = 0.f;
	mPrecision = 0;
}
开发者ID:Barosonix,项目名称:AstraViewer,代码行数:19,代码来源:llstatgraph.cpp

示例5: LLView

LLStatGraph::LLStatGraph(const LLView::Params& p)
:	LLView(p)
{
	mStatp = NULL;
	setToolTip(p.name());
	mNumThresholds = 3;
	mThresholdColors[0] = LLColor4(0.f, 1.f, 0.f, 1.f);
	mThresholdColors[1] = LLColor4(1.f, 1.f, 0.f, 1.f);
	mThresholdColors[2] = LLColor4(1.f, 0.f, 0.f, 1.f);
	mThresholdColors[3] = LLColor4(1.f, 0.f, 0.f, 1.f);
	mThresholds[0] = 50.f;
	mThresholds[1] = 75.f;
	mThresholds[2] = 100.f;
	mMin = 0.f;
	mMax = 125.f;
	mPerSec = TRUE;
	mValue = 0.f;
	mPrecision = 0;
}
开发者ID:HyangZhao,项目名称:NaCl-main,代码行数:19,代码来源:llstatgraph.cpp

示例6: LLColor4

LLColor4 LLTexGlobalColor::getColor() const
{
	// Sum of color params
	if (mParamGlobalColorList.empty())
		return LLColor4(1.f, 1.f, 1.f, 1.f);

	LLColor4 net_color(0.f, 0.f, 0.f, 0.f);
	LLTexLayer::calculateTexLayerColor(mParamGlobalColorList, net_color);
	return net_color;
}
开发者ID:OS-Development,项目名称:VW.Kirsten,代码行数:10,代码来源:lltexglobalcolor.cpp

示例7: LLColor4

// Update controls based on current settings
void LLPrefsAscentVan::refresh()
{
    //General --------------------------------------------------------------------------------

    //Tags\Colors ----------------------------------------------------------------------------
    //Colors ---------------------------------------------------------------------------------
	LLComboBox* combo = getChild<LLComboBox>("tag_spoofing_combobox");
	if(LLVOAvatar::sClientResolutionList.has("isComplete"))
	{
		//combo->setColor(LLColor4::black);
		combo->clear();
		for(LLSD::map_iterator itr = LLVOAvatar::sClientResolutionList.beginMap(); itr != LLVOAvatar::sClientResolutionList.endMap(); itr++)
		{
			LLSD value = (*itr).second;
			if(value.has("name"))
			{
				std::string name = value.get("name");
				std::string uuid = (*itr).first;
				LLColor4 color = LLColor4(value.get("color"));
				if(value["multiple"].asReal() != 0)
				{
					color *= 1.0/(value["multiple"].asReal()+1.0f);
				}
				LLScrollListItem* item = combo->add(name,uuid);
				//bad practice
				item->getColumn(0)->setColor(color);
			}
		}
		//add Viewer 2.0
		LLScrollListItem* item = combo->add("Viewer 2.0",IMG_DEFAULT_AVATAR);
		//bad practice
		item->getColumn(0)->setColor(LLColor4::black);
	}
	combo->setCurrentByIndex(mSelectedClient);

    childSetEnabled("friends_color_textbox",     mUseStatusColors);
    childSetEnabled("friend_color_swatch",       mUseStatusColors);
    childSetEnabled("estate_owner_color_swatch", mUseStatusColors);
    childSetEnabled("linden_color_swatch",       mUseStatusColors);
    childSetEnabled("muted_color_swatch",        mUseStatusColors);

    childSetEnabled("custom_tag_label_text",   mCustomTagOn);
    childSetEnabled("custom_tag_label_box",    mCustomTagOn);
    childSetValue("custom_tag_label_box", gSavedSettings.getString("AscentCustomTagLabel"));
    childSetEnabled("custom_tag_color_text",   mCustomTagOn);
    childSetEnabled("custom_tag_color_swatch", mCustomTagOn);

    //Body Dynamics --------------------------------------------------------------------------
    childSetEnabled("EmeraldBoobMass",     mBreastPhysicsToggle);
    childSetEnabled("EmeraldBoobHardness", mBreastPhysicsToggle);
    childSetEnabled("EmeraldBoobVelMax",   mBreastPhysicsToggle);
    childSetEnabled("EmeraldBoobFriction", mBreastPhysicsToggle);
    childSetEnabled("EmeraldBoobVelMin",   mBreastPhysicsToggle);
}
开发者ID:catface,项目名称:catfacebase,代码行数:55,代码来源:ascentprefsvan.cpp

示例8: llclamp

void LLDrawPoolAvatar::beginImpostor()
{
	if (!LLPipeline::sReflectionRender)
	{
		LLVOAvatar::sRenderDistance = llclamp(LLVOAvatar::sRenderDistance, 16.f, 256.f);
		LLVOAvatar::sNumVisibleAvatars = 0;
	}

	gPipeline.enableLightsFullbright(LLColor4(1,1,1,1));
	sDiffuseChannel = 0;
}
开发者ID:VirtualReality,项目名称:Viewer,代码行数:11,代码来源:lldrawpoolavatar.cpp

示例9: updateValue

	void ParamValue<LLUIColor>::updateValueFromBlock()
	{
		if (control.isProvided() && !control().empty())
		{
			updateValue(LLUIColorTable::instance().getColor(control));
		}
		else
		{
			updateValue(LLColor4(red, green, blue, alpha));
		}
	}
开发者ID:CaseyraeStarfinder,项目名称:Firestorm-Viewer,代码行数:11,代码来源:llui.cpp

示例10: updateValue

	void ParamValue<LLUIColor>::updateValueFromBlock()
	{
		if (control.isProvided() && !control().empty())
		{
			updateValue(LLUI::sColorsGroup->controlExists(control) ? LLUI::sColorsGroup->getColor(control) : LLUI::sConfigGroup->getColor(control)); // Singu Note: Most of our colors will be in sColorsGroup (skin), but some may be moved to settings for users.
		}
		else
		{
			updateValue(LLColor4(red, green, blue, alpha));
		}
	}
开发者ID:ArxNet,项目名称:SingularityViewer,代码行数:11,代码来源:llui.cpp

示例11: LLColor4

LLColor4 LLSky::calcInScatter(LLColor4& transp, const LLVector3 &point, F32 exag) const
{
	if (mVOSkyp)
	{
		return mVOSkyp->calcInScatter(transp, point, exag);
	}
	else
	{
		return LLColor4(1.f, 1.f, 1.f, 1.f);
	}
}
开发者ID:Boy,项目名称:netbook,代码行数:11,代码来源:llsky.cpp

示例12: llcolor3

	void v4color_object::test<10>()
	{
		F32 r = 0x20, g = 0xFFFF, b = 0xFF;
		LLColor3 llcolor3(r,g,b);
		LLColor4 llcolor4a,llcolor4b;
		llcolor4a = llcolor3;
		ensure("Operator=:Fail to initialize ", ((llcolor3.mV[0] == llcolor4a.mV[VX]) && (llcolor3.mV[1] == llcolor4a.mV[VY]) && (llcolor3.mV[2] == llcolor4a.mV[VZ])));
		LLSD sd = llcolor4a.getValue();
		llcolor4b = LLColor4(sd);
		ensure_equals("Operator= LLSD:Fail ", llcolor4a, llcolor4b);
	}
开发者ID:HizWylder,项目名称:GIS,代码行数:11,代码来源:v4color_test.cpp

示例13: ssettingName

F32 lggBeamMaps::setUpAndGetDuration()
{
    static LLCachedControl<std::string> ssettingName(gSavedSettings, "PhoenixBeamShape");
    std::string settingName(ssettingName);
    if(settingName != lastFileName)
    {
        lastFileName = settingName;
        if(settingName != "===OFF===" && settingName != "")
        {

            std::string path_name(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "beams", ""));
            std::string path_name2(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "beams", ""));
            std::string filename = path_name + settingName + ".xml";
            if(gDirUtilp->fileExists(filename))
            {
            } else
            {
                filename =path_name2 + settingName +".xml";
            }
            LLSD mydata = getPic(filename);
            scale = (F32)mydata["scale"].asReal()/10.0f;
            LLSD myPicture = mydata["data"];
            dots.clear();
            for(int i = 0; i < myPicture.size(); i++)
            {
                LLSD beamData = myPicture[i];
                lggBeamData dot;
                dot.p = LLVector3d(beamData["offset"]);
                dot.p *= (gSavedSettings.getF32("PhoenixBeamShapeScale")*2.0f);
                LLColor4 color = LLColor4(beamData["color"]);

                dot.c = LLColor4U(color);

                dots.push_back(dot);
            }

            F32 maxBPerQS = gSavedSettings.getF32("PhoenixMaxBeamsPerSecond") / 4.0f;
            duration = llceil((F32)(myPicture.size()) / maxBPerQS) * 0.25f;
            llinfos << "reading it all now size is " << myPicture.size() << " and duration is " << duration << llendl;

        } else
        {
            dots.clear();
            scale = 0.0f;//used as a flag too
            duration = 0.25f;
        }

    }
    //llinfos << "sent final dur of " << duration << llendl;

    return duration;

}
开发者ID:VirtualReality,项目名称:Viewer,代码行数:53,代码来源:lggbeammaps.cpp

示例14: t

void LLDrawPoolGlow::render(S32 pass)
{
	S32 mode = gViewerWindow->getMaskMode();
	LLFastTimer t(FTM_RENDER_GLOW);
	LLGLEnable blend(GL_BLEND);
	LLGLDisable test(GL_ALPHA_TEST);
	gGL.flush();
	/// Get rid of z-fighting with non-glow pass.
	LLGLEnable polyOffset(GL_POLYGON_OFFSET_FILL);
	glPolygonOffset(-1.0f, -1.0f);
	gGL.setSceneBlendType(LLRender::BT_ADD);
	
	U32 shader_level = LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_OBJECT);

	if (shader_level > 0 && fullbright_shader)
	{
		fullbright_shader->bind();
	}
	else
	{
		gPipeline.enableLightsFullbright(LLColor4(1,1,1,1));
	}

	LLGLDepthTest depth(GL_TRUE, GL_FALSE);
	gGL.setColorMask(false, true);
	if (shader_level > 1)
	{
		pushBatches(LLRenderPass::PASS_GLOW, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE);
	}
	else
	{
		renderTexture(LLRenderPass::PASS_GLOW, getVertexDataMask());
	}
	
	if(mode == MASK_MODE_RIGHT)
	{
	gGL.setColorMask(false,true,true,false);
	}
	if(mode == MASK_MODE_LEFT)
	{
	gGL.setColorMask(true,false,false,false);
	}
	if(mode == MASK_MODE_NONE)
	{
	gGL.setColorMask(true, false);
	}
	gGL.setSceneBlendType(LLRender::BT_ALPHA);
	
	if (shader_level > 0 && fullbright_shader)
	{
		fullbright_shader->unbind();
	}
}
开发者ID:Xara,项目名称:kris-clone,代码行数:53,代码来源:lldrawpoolsimple.cpp

示例15: switch

bool LLControlVariable::llsd_compare(const LLSD& a, const LLSD & b)
{
	bool result = false;
	switch (mType)
	{
	case TYPE_U32:
	case TYPE_S32:
		result = a.asInteger() == b.asInteger();
		break;
	case TYPE_BOOLEAN:
		result = a.asBoolean() == b.asBoolean();
		break;
	case TYPE_F32:
		result = a.asReal() == b.asReal();
		break;
	case TYPE_VEC3:
	case TYPE_VEC3D:
		result = LLVector3d(a) == LLVector3d(b);
		break;
	case TYPE_RECT:
		result = LLRect(a) == LLRect(b);
		break;
	case TYPE_COL4:
		result = LLColor4(a) == LLColor4(b);
		break;
	case TYPE_COL3:
		result = LLColor3(a) == LLColor3(b);
		break;
	case TYPE_COL4U:
		result = LLColor4U(a) == LLColor4U(b);
		break;
	case TYPE_STRING:
		result = a.asString() == b.asString();
		break;
	default:
		break;
	}

	return result;
}
开发者ID:CharleyLevenque,项目名称:SingularityViewer,代码行数:40,代码来源:llcontrol.cpp


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