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


C++ Matrix3f::ExtractEulerXYZ方法代码示例

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


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

示例1: SetControlledable

//----------------------------------------------------------------------------
void InterpCurveRotateController::SetControlledable(Controlledable* object)
{
	if (object)
	{
		if (IsAttachUpdateInit())
		{
			Movable* movable = StaticCast<Movable>(mObject);
			if (movable)
			{
				Matrix3f mat = movable->LocalTransform.GetRotate();
				mat.ExtractEulerXYZ(mInitValue[0], mInitValue[1], mInitValue[2]);
			}
		}
	}
	else
	{
		if (IsDetachResetInit())
		{
			Movable* movable = StaticCast<Movable>(mObject);
			if (movable)
			{
				movable->LocalTransform.SetRotate(Matrix3f().MakeEulerXYZ(
					mInitValue[0], mInitValue[1], mInitValue[2]));
			}
		}
	}

	InterpCurveFloat3Controller::SetControlledable(object);
}
开发者ID:JamShan,项目名称:Phoenix3D_2.1,代码行数:30,代码来源:PX2InterpCurveRotateCtrl.cpp

示例2: scale

MovableTransProperty::MovableTransProperty (PropertyPage *parent, 
	const std::string &name, const std::string &tag,
	Transform *trans, Object *obj)
	:
Property(parent, name, tag, Property::PT_TRANSFORM, 0),
	mIsRSMatrix(0),
	mPropertyTranslate(0),
	mPropertyRotation(0),
	mPropertyScale(0),
	mPropertyIsUniformScale(0),
	mTrans(trans),
	mObject(obj)
{
	APoint position;
	APoint rotation;
	APoint scale(1.0f, 1.0f, 1.0f);

	bool isRSMatrix = mTrans->IsRSMatrix();
	if (isRSMatrix)
	{
		position = mTrans->GetTranslate();
		Matrix3f mat = mTrans->GetRotate();
		mat.ExtractEulerXYZ(rotation.X(), rotation.Y(), rotation.Z());
		scale = mTrans->GetScale();
		bool isUniformScale = mTrans->IsUniformScale();

		mProperty = parent->mPage->Append(new wxStringProperty(
			name, tag, wxT("<composed>")) );

		mPropertyTranslate = parent->mPage->AppendIn(mProperty, 
			new wxAPoint3Property("Translate", tag+"Translate",
			position));
		mPropertyRotation = parent->mPage->AppendIn(mProperty, 
			new wxAPoint3Property("Rotate", tag+"Rotate", rotation));
		mPropertyScale = parent->mPage->AppendIn(mProperty, 
			new wxAPoint3Property("Scale", tag+"Scale", scale));

		mPropertyIsUniformScale = parent->mPage->AppendIn(mProperty, 
			new wxBoolProperty("IsUniformScale", tag+"IsUniformScale", isUniformScale));
		mPropertyIsUniformScale->Enable(false);
	}
	else
	{
		mProperty = parent->mPage->Append(new wxStringProperty(
			name, tag, wxT("<composed>")) );

		mIsRSMatrix = parent->mPage->AppendIn(mProperty, 
			new wxBoolProperty("IsRSMatrix", tag+"IsRSMatrix", false));
		mIsRSMatrix->Enable(false);
	}
}
开发者ID:JamShan,项目名称:Phoenix3D_2.1,代码行数:51,代码来源:PX2MovableTransProperty.cpp

示例3: CreateCurveRotateCtrl

//----------------------------------------------------------------------------
void EditMap::CreateCurveRotateCtrl (PX2::Movable *mov)
{
	if (!mov)
		return;

	Float3 initRotate;
	Matrix3f matRotate = mov->LocalTransform.GetRotate();
	matRotate.ExtractEulerXYZ(initRotate[0], initRotate[1], initRotate[2]);
	InterpCurveRotateController *ictCtrl = new0 InterpCurveRotateController(
		initRotate);
	ictCtrl->SetName("InterpCurveRotateController");
	mov->AttachController(ictCtrl);

	Event *ent = 0;
	ent = EditorEventSpace::CreateEventX(EditorEventSpace::AttachControl);
	ent->SetData<Object*>(ictCtrl);
	EventWorld::GetSingleton().BroadcastingLocalEvent(ent);
}
开发者ID:manyxu,项目名称:Phoenix3D_2.0,代码行数:19,代码来源:PX2EditMap.cpp

示例4: GetRotate

//----------------------------------------------------------------------------
void Transform::GetRotate(float &x, float &y, float &z)
{
	Matrix3f mat = GetRotate();
	mat.ExtractEulerXYZ(x, y, z);
}
开发者ID:JamShan,项目名称:Phoenix3D_2.1,代码行数:6,代码来源:PX2Transform.cpp


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