本文整理汇总了C++中LLVector3d::getValue方法的典型用法代码示例。如果您正苦于以下问题:C++ LLVector3d::getValue方法的具体用法?C++ LLVector3d::getValue怎么用?C++ LLVector3d::getValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLVector3d
的用法示例。
在下文中一共展示了LLVector3d::getValue方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getControl
void LLControlGroup::setVector3d(const LLString& name, const LLVector3d &val)
{
LLControlBase* control = getControl(name);
if (control && control->isType(TYPE_VEC3D))
{
control->set(val.getValue());
}
else
{
CONTROL_ERRS << "Invalid control " << name << llendl;
}
}
示例2: getControl
void LLControlGroup::setVector3d(const std::string& name, const LLVector3d &val)
{
LLControlVariable* control = getControl(name);
if (control && control->isType(TYPE_VEC3D))
{
control->set(val.getValue());
if(mChangeCallback)
mChangeCallback(name,llformat("<%f,%f,%f>",val.mdV[VX],val.mdV[VY],val.mdV[VZ]));
}
else
{
CONTROL_ERRS << "Invalid control " << name << llendl;
}
}
示例3: sendClickMessage
// static
// *TODO: move out of the panel
void LLPanelClassifiedInfo::sendClickMessage(
const std::string& type,
bool from_search,
const LLUUID& classified_id,
const LLUUID& parcel_id,
const LLVector3d& global_pos,
const std::string& sim_name)
{
// You're allowed to click on your own ads to reassure yourself
// that the system is working.
LLSD body;
body["type"] = type;
body["from_search"] = from_search;
body["classified_id"] = classified_id;
body["parcel_id"] = parcel_id;
body["dest_pos_global"] = global_pos.getValue();
body["region_name"] = sim_name;
std::string url = gAgent.getRegion()->getCapability("SearchStatTracking");
LL_INFOS() << "Sending click msg via capability (url=" << url << ")" << LL_ENDL;
LL_INFOS() << "body: [" << body << "]" << LL_ENDL;
LLHTTPClient::post(url, body, new LLClassifiedClickMessageResponder());
}
示例4: onCommitSettings
//static
void LLFloaterSettingsDebug::onCommitSettings(LLUICtrl* ctrl, void* user_data)
{
LLFloaterSettingsDebug* floaterp = (LLFloaterSettingsDebug*)user_data;
LLComboBox* settings_combo = floaterp->getChild<LLComboBox>("settings_combo");
LLControlVariable* controlp = (LLControlVariable*)settings_combo->getCurrentUserdata();
LLVector3 vector;
LLVector3d vectord;
LLRect rect;
LLColor4 col4;
LLColor3 col3;
LLColor4U col4U;
LLColor4 color_with_alpha;
switch(controlp->type())
{
case TYPE_U32:
controlp->set(floaterp->childGetValue("val_spinner_1"));
break;
case TYPE_S32:
controlp->set(floaterp->childGetValue("val_spinner_1"));
break;
case TYPE_F32:
controlp->set(LLSD(floaterp->childGetValue("val_spinner_1").asReal()));
break;
case TYPE_BOOLEAN:
controlp->set(floaterp->childGetValue("boolean_combo"));
break;
case TYPE_STRING:
controlp->set(LLSD(floaterp->childGetValue("val_text").asString()));
break;
case TYPE_VEC3:
vector.mV[VX] = (F32)floaterp->childGetValue("val_spinner_1").asReal();
vector.mV[VY] = (F32)floaterp->childGetValue("val_spinner_2").asReal();
vector.mV[VZ] = (F32)floaterp->childGetValue("val_spinner_3").asReal();
controlp->set(vector.getValue());
break;
case TYPE_VEC3D:
vectord.mdV[VX] = floaterp->childGetValue("val_spinner_1").asReal();
vectord.mdV[VY] = floaterp->childGetValue("val_spinner_2").asReal();
vectord.mdV[VZ] = floaterp->childGetValue("val_spinner_3").asReal();
controlp->set(vectord.getValue());
break;
case TYPE_RECT:
rect.mLeft = floaterp->childGetValue("val_spinner_1").asInteger();
rect.mRight = floaterp->childGetValue("val_spinner_2").asInteger();
rect.mBottom = floaterp->childGetValue("val_spinner_3").asInteger();
rect.mTop = floaterp->childGetValue("val_spinner_4").asInteger();
controlp->set(rect.getValue());
break;
case TYPE_COL4:
col3.setValue(floaterp->childGetValue("color_swatch"));
col4 = LLColor4(col3, (F32)floaterp->childGetValue("val_spinner_4").asReal());
controlp->set(col4.getValue());
break;
case TYPE_COL3:
controlp->set(floaterp->childGetValue("color_swatch"));
//col3.mV[VRED] = (F32)floaterp->childGetValue("val_spinner_1").asC();
//col3.mV[VGREEN] = (F32)floaterp->childGetValue("val_spinner_2").asReal();
//col3.mV[VBLUE] = (F32)floaterp->childGetValue("val_spinner_3").asReal();
//controlp->set(col3.getValue());
break;
case TYPE_COL4U:
col3.setValue(floaterp->childGetValue("color_swatch"));
col4U.setVecScaleClamp(col3);
col4U.mV[VALPHA] = floaterp->childGetValue("val_spinner_4").asInteger();
controlp->set(col4U.getValue());
break;
default:
break;
}
}
示例5: loadFromFile
//.........这里部分代码省略.........
{
U32 initial = 0;
child_nodep->getAttributeU32("value", initial);
control->set((LLSD::Integer) initial);
validitems++;
}
break;
case TYPE_BOOLEAN:
{
BOOL initial = FALSE;
child_nodep->getAttributeBOOL("value", initial);
control->set(initial);
validitems++;
}
break;
case TYPE_STRING:
{
LLString string;
child_nodep->getAttributeString("value", string);
if (string == LLString::null)
{
string = "";
}
control->set(string);
validitems++;
}
break;
case TYPE_VEC3:
{
LLVector3 vector;
child_nodep->getAttributeVector3("value", vector);
control->set(vector.getValue());
validitems++;
}
break;
case TYPE_VEC3D:
{
LLVector3d vector;
child_nodep->getAttributeVector3d("value", vector);
control->set(vector.getValue());
validitems++;
}
break;
case TYPE_RECT:
{
//RN: hack to support reading rectangles from a string
LLString rect_string;
child_nodep->getAttributeString("value", rect_string);
std::istringstream istream(rect_string);
S32 left, bottom, width, height;
istream >> left >> bottom >> width >> height;
LLRect rect;
rect.setOriginAndSize(left, bottom, width, height);
control->set(rect.getValue());
validitems++;
}
break;
case TYPE_COL4U:
{
LLColor4U color;
child_nodep->getAttributeColor4U("value", color);
control->set(color.getValue());
validitems++;
}
break;
case TYPE_COL4:
{
LLColor4 color;
child_nodep->getAttributeColor4("value", color);
control->set(color.getValue());
validitems++;
}
break;
case TYPE_COL3:
{
LLVector3 color;
child_nodep->getAttributeVector3("value", color);
control->set(LLColor3(color.mV).getValue());
validitems++;
}
break;
}
child_nodep = rootp->getNextChild();
}
return validitems;
}
示例6: declareControl
BOOL LLControlGroup::declareVec3d(const LLString& name, const LLVector3d &initial_val, const LLString& comment, BOOL persist)
{
return declareControl(name, TYPE_VEC3D, initial_val.getValue(), comment, persist);
}
示例7:
template <> eControlType get_control_type<LLVector3d>(const LLVector3d& in, LLSD& out)
{
out = in.getValue();
return TYPE_VEC3D;
}
示例8: onCommitSettings
void LLFloaterSettingsDebug::onCommitSettings()
{
if (!mCurrentControlVariable)
return;
LLVector3 vector;
LLVector3d vectord;
LLRect rect;
LLColor4 col4;
LLColor3 col3;
LLColor4U col4U;
LLColor4 color_with_alpha;
switch(mCurrentControlVariable->type())
{
case TYPE_U32:
mCurrentControlVariable->set(getChild<LLUICtrl>("val_spinner_1")->getValue());
break;
case TYPE_S32:
mCurrentControlVariable->set(getChild<LLUICtrl>("val_spinner_1")->getValue());
break;
case TYPE_F32:
mCurrentControlVariable->set(LLSD(getChild<LLUICtrl>("val_spinner_1")->getValue().asReal()));
break;
case TYPE_BOOLEAN:
mCurrentControlVariable->set(getChild<LLUICtrl>("boolean_combo")->getValue());
break;
case TYPE_STRING:
mCurrentControlVariable->set(LLSD(getChild<LLUICtrl>("val_text")->getValue().asString()));
break;
case TYPE_VEC3:
vector.mV[VX] = (F32)getChild<LLUICtrl>("val_spinner_1")->getValue().asReal();
vector.mV[VY] = (F32)getChild<LLUICtrl>("val_spinner_2")->getValue().asReal();
vector.mV[VZ] = (F32)getChild<LLUICtrl>("val_spinner_3")->getValue().asReal();
mCurrentControlVariable->set(vector.getValue());
break;
case TYPE_VEC3D:
vectord.mdV[VX] = getChild<LLUICtrl>("val_spinner_1")->getValue().asReal();
vectord.mdV[VY] = getChild<LLUICtrl>("val_spinner_2")->getValue().asReal();
vectord.mdV[VZ] = getChild<LLUICtrl>("val_spinner_3")->getValue().asReal();
mCurrentControlVariable->set(vectord.getValue());
break;
case TYPE_RECT:
rect.mLeft = getChild<LLUICtrl>("val_spinner_1")->getValue().asInteger();
rect.mRight = getChild<LLUICtrl>("val_spinner_2")->getValue().asInteger();
rect.mBottom = getChild<LLUICtrl>("val_spinner_3")->getValue().asInteger();
rect.mTop = getChild<LLUICtrl>("val_spinner_4")->getValue().asInteger();
mCurrentControlVariable->set(rect.getValue());
break;
case TYPE_COL4:
col3.setValue(getChild<LLUICtrl>("val_color_swatch")->getValue());
col4 = LLColor4(col3, (F32)getChild<LLUICtrl>("val_spinner_4")->getValue().asReal());
mCurrentControlVariable->set(col4.getValue());
break;
case TYPE_COL3:
mCurrentControlVariable->set(getChild<LLUICtrl>("val_color_swatch")->getValue());
//col3.mV[VRED] = (F32)getChild<LLUICtrl>("val_spinner_1")->getValue().asC();
//col3.mV[VGREEN] = (F32)getChild<LLUICtrl>("val_spinner_2")->getValue().asReal();
//col3.mV[VBLUE] = (F32)getChild<LLUICtrl>("val_spinner_3")->getValue().asReal();
//mCurrentControlVariable->set(col3.getValue());
break;
case TYPE_COL4U:
col3.setValue(getChild<LLUICtrl>("val_color_swatch")->getValue());
col4U.setVecScaleClamp(col3);
col4U.mV[VALPHA] = getChild<LLUICtrl>("val_spinner_4")->getValue().asInteger();
mCurrentControlVariable->set(col4U.getValue());
break;
default:
break;
}
}
示例9: declareControl
BOOL LLControlGroup::declareVec3d(const std::string& name, const LLVector3d &initial_val, const std::string& comment, BOOL persist)
{
return declareControl(name, TYPE_VEC3D, initial_val.getValue(), comment, SANITY_TYPE_NONE, LLSD(), std::string(""), persist);
}