3ds Max SDK如何设置仅针对枢轴的变换矩阵



我试图为3ds Max创建我的导入插件,我遇到了问题。如何将变换矩阵只赋值给主元。

我试图使用SetNodeTM,但它转换pivot与对象本身

我不知道有任何方法直接操作对象的枢轴变换,但INode确实提供了获取/设置枢轴位置,旋转和缩放的方法。因此,如果你能够将你的枢轴分解成这些组件,你可以这样设置它。

来自SDK:

/*! remarks Sets the position portion of the object offset from
the node. See the Advanced Topics section on
~{ Transformation and Rotation }~ for an overview of the object offset transformation.
param p Specifies the position portion of the object-offset. */
virtual void    SetObjOffsetPos(Point3 p)=0;
/*! remarks Sets the rotation portion of the object-offset from
the node. See the Advanced Topics section on
~{ Transformation and Rotation }~ for an overview of the object offset transformation.
param q The rotation offset. */
virtual void    SetObjOffsetRot(Quat q)=0;
/*! remarks Sets the scale portion of the object-offset matrix.
See the Advanced Topics section on
~{ Transformation and Rotation }~ for an overview of the object offset transformation.
param sv The scale portion of the offset. See Class ScaleValue. */
virtual void    SetObjOffsetScale(ScaleValue sv)=0;

最新更新