本文整理汇总了C++中LLColor3::getValue方法的典型用法代码示例。如果您正苦于以下问题:C++ LLColor3::getValue方法的具体用法?C++ LLColor3::getValue怎么用?C++ LLColor3::getValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLColor3
的用法示例。
在下文中一共展示了LLColor3::getValue方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loadFromFileLegacy
//.........这里部分代码省略.........
else if (!strcmp("FALSE", boolstring))
{
initial = FALSE;
valid = TRUE;
}
if (valid)
{
control->set(initial);
}
else
{
llinfos << filename << "Item " << item << ": Invalid BOOL control " << name << ", " << boolstring << llendl;
}
validitems++;
}
break;
case TYPE_STRING:
{
LLString string;
file >> string;
control->set(string);
validitems++;
}
break;
case TYPE_VEC3:
{
F32 x, y, z;
file >> x >> y >> z;
LLVector3 vector(x, y, z);
control->set(vector.getValue());
validitems++;
}
break;
case TYPE_VEC3D:
{
F64 x, y, z;
file >> x >> y >> z;
LLVector3d vector(x, y, z);
control->set(vector.getValue());
validitems++;
}
break;
case TYPE_RECT:
{
S32 left, bottom, width, height;
file >> left >> bottom >> width >> height;
LLRect rect;
rect.setOriginAndSize(left, bottom, width, height);
control->set(rect.getValue());
validitems++;
}
break;
case TYPE_COL4U:
{
S32 red, green, blue, alpha;
LLColor4U color;
file >> red >> green >> blue >> alpha;
color.setVec(red, green, blue, alpha);
control->set(color.getValue());
validitems++;
}
break;
case TYPE_COL4:
{
LLColor4 color;
file >> color.mV[VRED] >> color.mV[VGREEN]
>> color.mV[VBLUE] >> color.mV[VALPHA];
control->set(color.getValue());
validitems++;
}
break;
case TYPE_COL3:
{
LLColor3 color;
file >> color.mV[VRED] >> color.mV[VGREEN]
>> color.mV[VBLUE];
control->set(color.getValue());
validitems++;
}
break;
}
}
file.close();
return validitems;
}
示例2: declareControl
BOOL LLControlGroup::declareColor3(const LLString& name, const LLColor3 &initial_val, const LLString& comment, BOOL persist )
{
return declareControl(name, TYPE_COL3, initial_val.getValue(), comment, persist);
}
示例3:
template <> eControlType get_control_type<LLColor3>(const LLColor3& in, LLSD& out)
{
out = in.getValue();
return TYPE_COL3;
}
示例4: declareControl
BOOL LLControlGroup::declareColor3(const std::string& name, const LLColor3 &initial_val, const std::string& comment, BOOL persist )
{
return declareControl(name, TYPE_COL3, initial_val.getValue(), comment, SANITY_TYPE_NONE, LLSD(), std::string(""), persist);
}