mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-06 07:15:36 +00:00
Fix compilation after master merge
This commit is contained in:
parent
277c179fe9
commit
380d357d02
2 changed files with 12 additions and 3 deletions
|
@ -326,7 +326,16 @@ namespace MWRender
|
|||
{
|
||||
const osg::Quat rotate = rotateController->getRotate();
|
||||
const osg::Vec3f offset = rotateController->getOffset();
|
||||
const osg::Quat worldOrient = rotateController->getWorldOrientation(node) * rotate.inverse();
|
||||
|
||||
osg::NodePathList nodepaths = node->getParentalNodePaths(rotateController->getRelativeTo());
|
||||
osg::Quat worldOrient;
|
||||
if (!nodepaths.empty())
|
||||
{
|
||||
osg::Matrixf worldMat = osg::computeLocalToWorld(nodepaths[0]);
|
||||
worldOrient = worldMat.getRotate();
|
||||
}
|
||||
|
||||
worldOrient = worldOrient * rotate.inverse();
|
||||
const osg::Quat worldOrientInverse = worldOrient.inverse();
|
||||
|
||||
mBlendStartTrans -= worldOrientInverse * offset;
|
||||
|
|
|
@ -20,8 +20,6 @@ namespace MWRender
|
|||
public:
|
||||
RotateController(osg::Node* relativeTo);
|
||||
|
||||
osg::Quat getWorldOrientation(osg::Node* node);
|
||||
|
||||
void setEnabled(bool enabled);
|
||||
void setOffset(const osg::Vec3f& offset);
|
||||
void setRotate(const osg::Quat& rotate);
|
||||
|
@ -30,6 +28,8 @@ namespace MWRender
|
|||
|
||||
const osg::Quat getRotate() const { return mRotate; }
|
||||
|
||||
osg::Node* getRelativeTo() const { return mRelativeTo; }
|
||||
|
||||
void operator()(osg::MatrixTransform* node, osg::NodeVisitor* nv);
|
||||
|
||||
protected:
|
||||
|
|
Loading…
Reference in a new issue