Hi Wojtek,
Use the the coordinateSystemNode:
osg::CoordinateSystemNode* csn = new osg::CoordinateSystemNode();
csn->setEllipsoidModel(new osg::EllipsoidModel());
osg::Matrixd local_frame = csn->computeLocalCoordinateFrame(position);
//where position is your global position
The resulting
Hi,
How to get local rotation angles when camera is set by setViewMatrixAsLookAt?
I've got two camera modes:
1) Camera is set by global position and local angles
Code:
osg::Matrix worldMatrix;
ellipsoid->computeLocalToWorldTransformFromLatLongHeight(longitude, latitude,
height, worldMatrix);
2 matches
Mail list logo