Improved handling of core OSG being compile with float Matrices.
This commit is contained in:
parent
19c1863432
commit
d91f2c631d
@ -152,16 +152,18 @@ public:
|
||||
osg::EllipsoidModel* ellipsoid = csn->getEllipsoidModel();
|
||||
if (ellipsoid)
|
||||
{
|
||||
osg::Matrixd matrix;
|
||||
osg::Matrix inheritedMatrix;
|
||||
for(i+=1; i<nodePath.size()-1; ++i)
|
||||
{
|
||||
osg::Transform* transform = nodePath[i]->asTransform();
|
||||
if (transform) transform->computeLocalToWorldMatrix(matrix, nv);
|
||||
if (transform) transform->computeLocalToWorldMatrix(inheritedMatrix, nv);
|
||||
}
|
||||
|
||||
osg::Matrixd matrix(inheritedMatrix);
|
||||
|
||||
//osg::Matrixd matrix;
|
||||
ellipsoid->computeLocalToWorldTransformFromLatLongHeight(_latitude,_longitude,_height,matrix);
|
||||
matrix.preMult(osg::Matrixd::rotate(_rotation));
|
||||
matrix.preMult(osg::Matrix::rotate(_rotation));
|
||||
|
||||
mt->setMatrix(matrix);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user