本文整理汇总了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);
}
示例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);
}
}
示例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);
}
示例4: GetRotate
//----------------------------------------------------------------------------
void Transform::GetRotate(float &x, float &y, float &z)
{
Matrix3f mat = GetRotate();
mat.ExtractEulerXYZ(x, y, z);
}