本文整理汇总了C++中LLColor4::setVec方法的典型用法代码示例。如果您正苦于以下问题:C++ LLColor4::setVec方法的具体用法?C++ LLColor4::setVec怎么用?C++ LLColor4::setVec使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLColor4
的用法示例。
在下文中一共展示了LLColor4::setVec方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getAttributeColor
//static
BOOL LLUICtrlFactory::getAttributeColor(LLXMLNodePtr node, const std::string& name, LLColor4& color)
{
std::string colorstring;
BOOL res = node->getAttributeString(name.c_str(), colorstring);
if (res && LLUI::sColorsGroup)
{
if (LLUI::sColorsGroup->controlExists(colorstring))
{
color.setVec(LLUI::sColorsGroup->getColor(colorstring));
}
else
{
res = FALSE;
}
}
if (!res)
{
res = LLColor4::parseColor(colorstring, &color);
}
if (!res)
{
res = node->getAttributeColor(name.c_str(), color);
}
return res;
}
示例2: init_colors
void init_colors()
{
gTrackColor = LLColor4::red;
gDisabledTrackColor.setVec( 0.5f, 0.f, 0.f, 1.f );
gLandmarkMapColor = LLColor4::red;
gLocationMapColor.setVec( 0.f, 0.72f, 1.f, 1.f);
gTelehubMapColor.setVec( 0.9f, 0.9f, 0.f, 1.f); // dk yellow
gEventColor.setVec( 1.f, 0.5f, 1.f, 1.f );
gPopularColor.setVec( 1.f, 0.0f, 0.f, 1.f );
gPickColor.setVec( 1.f, 0.0f, 0.f, 1.f );
gHomeColor.setVec( 0.f, 0.5f, 1.f, 1.f );
}
示例3: init_colors
void init_colors()
{
gTrackColor = LLColor4::red;
gDisabledTrackColor.setVec( 0.5f, 0.f, 0.f, 1.f );
gSelfMapColor = LLColor4::white;
gAvatarMapColor = LLColor4::green;
gFriendMapColor = LLColor4::yellow;
// fleshy color
//gAvatarMapColor.setVec( 255.f/255.f, 223.f/255.f, 170.f/255.f, 1.f);
gLandmarkMapColor = LLColor4::red;
gLocationMapColor.setVec( 0.f, 0.72f, 1.f, 1.f);
gTelehubMapColor.setVec( 0.9f, 0.9f, 0.f, 1.f); // dk yellow
gFrustumMapColor.setVec( 1.f, 1.f, 1.f, 0.08f);
gRotatingFrustumMapColor.setVec(1.f, 1.f, 1.f, 0.2f);
gEventColor.setVec( 1.f, 0.5f, 1.f, 1.f );
gPopularColor.setVec( 1.f, 0.0f, 0.f, 1.f );
gPickColor.setVec( 1.f, 0.0f, 0.f, 1.f );
gHomeColor.setVec( 0.f, 0.5f, 1.f, 1.f );
}
示例4: triggerLocal
void LLHUDEffectSpiral::triggerLocal()
{
mKillTime = mTimer.getElapsedTimeF32() + mDuration;
BOOL show_beam = gSavedSettings.getBOOL("ShowSelectionBeam");
LLColor4 color;
color.setVec(mColor);
if (!mPartSourcep)
{
if (!mTargetObject.isNull() && !mSourceObject.isNull())
{
if (show_beam)
{
LLPointer<LLViewerPartSourceBeam> psb = new LLViewerPartSourceBeam;
psb->setColor(color);
psb->setSourceObject(mSourceObject);
psb->setTargetObject(mTargetObject);
psb->setOwnerUUID(gAgent.getID());
LLViewerPartSim::getInstance()->addPartSource(psb);
mPartSourcep = psb;
}
}
else
{
if (!mSourceObject.isNull() && !mPositionGlobal.isExactlyZero())
{
if (show_beam)
{
LLPointer<LLViewerPartSourceBeam> psb = new LLViewerPartSourceBeam;
psb->setSourceObject(mSourceObject);
psb->setTargetObject(NULL);
psb->setColor(color);
psb->mLKGTargetPosGlobal = mPositionGlobal;
psb->setOwnerUUID(gAgent.getID());
LLViewerPartSim::getInstance()->addPartSource(psb);
mPartSourcep = psb;
}
}
else
{
LLVector3 pos;
if (mSourceObject)
{
pos = mSourceObject->getPositionAgent();
}
else
{
pos = gAgent.getPosAgentFromGlobal(mPositionGlobal);
}
LLPointer<LLViewerPartSourceSpiral> pss = new LLViewerPartSourceSpiral(pos);
if (!mSourceObject.isNull())
{
pss->setSourceObject(mSourceObject);
}
pss->setColor(color);
pss->setOwnerUUID(gAgent.getID());
LLViewerPartSim::getInstance()->addPartSource(pss);
mPartSourcep = pss;
}
}
}
else
{
LLPointer<LLViewerPartSource>& ps = mPartSourcep;
if (mPartSourcep->getType() == LLViewerPartSource::LL_PART_SOURCE_BEAM)
{
LLViewerPartSourceBeam *psb = (LLViewerPartSourceBeam *)ps.get();
psb->setSourceObject(mSourceObject);
psb->setTargetObject(mTargetObject);
psb->setColor(color);
if (mTargetObject.isNull())
{
psb->mLKGTargetPosGlobal = mPositionGlobal;
}
}
else
{
LLViewerPartSourceSpiral *pss = (LLViewerPartSourceSpiral *)ps.get();
pss->setSourceObject(mSourceObject);
}
}
mbInit = TRUE;
}