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


C++ LLVector3::getValue方法代码示例

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


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

示例1: getControl

void LLControlGroup::setVector3(const LLString& name, const LLVector3 &val)
{
	LLControlBase* control = getControl(name);
	
	if (control && control->isType(TYPE_VEC3))
	{
		control->set(val.getValue());
	}
	else
	{
		CONTROL_ERRS << "Invalid control " << name << llendl;
	}
}
开发者ID:Boy,项目名称:netbook,代码行数:13,代码来源:llcontrol.cpp

示例2: getControl

void LLControlGroup::setVector3(const std::string& name, const LLVector3 &val)
{
	LLControlVariable* control = getControl(name);
	
	if (control && control->isType(TYPE_VEC3))
	{
		control->set(val.getValue());
		if(mChangeCallback)
			mChangeCallback(name,llformat("<%f,%f,%f>",val.mV[VX],val.mV[VY],val.mV[VZ]));
	}
	else
	{
		CONTROL_ERRS << "Invalid control " << name << llendl;
	}
}
开发者ID:N3X15,项目名称:Luna-Viewer,代码行数:15,代码来源:llcontrol.cpp

示例3: getMyDataSerialized

LLSD lggBeamMapFloater::getMyDataSerialized()
{
	LLSD out;
	LLRect r  = getChild<LLPanel>("beamshape_draw")->getRect();
	for(int i =0; i<(int)dots.size();i++)
	{
		LLSD point;
		lggPoint t = dots[i];
		LLVector3 vec = LLVector3((F32)0.0,(F32)t.x,(F32)t.y);
		vec -= LLVector3((F32)0.0,(F32)r.getCenterX(),r.getCenterY());
		
		point["offset"]= vec.getValue();
		point["color"] = t.c.getValue();

		out[i]=point;
	}
	return out;
}
开发者ID:Xara,项目名称:Immortality,代码行数:18,代码来源:lggbeammapfloater.cpp

示例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;
	}
}
开发者ID:Nora28,项目名称:imprudence,代码行数:74,代码来源:llfloatersettingsdebug.cpp

示例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;
}
开发者ID:Boy,项目名称:netbook,代码行数:101,代码来源:llcontrol.cpp

示例6: declareControl

BOOL LLControlGroup::declareVec3(const LLString& name, const LLVector3 &initial_val, const LLString& comment, BOOL persist)
{
	return declareControl(name, TYPE_VEC3, initial_val.getValue(), comment, persist);
}
开发者ID:Boy,项目名称:netbook,代码行数:4,代码来源:llcontrol.cpp

示例7:

template <> eControlType get_control_type<LLVector3>(const LLVector3& in, LLSD& out) 
{ 
	out = in.getValue(); 
	return TYPE_VEC3; 
}
开发者ID:Krazy-Bish-Margie,项目名称:Sausages,代码行数:5,代码来源:llviewercontrol.cpp

示例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;
    }
}
开发者ID:nebadon2025,项目名称:replex,代码行数:71,代码来源:llfloatersettingsdebug.cpp

示例9: declareControl

BOOL LLControlGroup::declareVec3(const std::string& name, const LLVector3 &initial_val, const std::string& comment, BOOL persist)
{
	return declareControl(name, TYPE_VEC3, initial_val.getValue(), comment, SANITY_TYPE_NONE, LLSD(), std::string(""), persist);
}
开发者ID:wish-ds,项目名称:firestorm-ds,代码行数:4,代码来源:llcontrol.cpp


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