include change the CameraManipulators so they work with double for time instead of float. Also added support for DataType to osg::StateAttribute and StateSet so that they can be set to either STATIC or DYNAMIC, this allows the optimizer to know whether that an attribute can be optimized or not.
38 lines
608 B
C++
38 lines
608 B
C++
#include <osg/GL>
|
|
#include <osg/Matrix>
|
|
#include <osgUtil/CameraManipulator>
|
|
|
|
using namespace osg;
|
|
using namespace osgUtil;
|
|
|
|
CameraManipulator::CameraManipulator(): _camera(NULL)
|
|
{
|
|
_homeToUseNode = true;
|
|
_eyeHome.set(0.0,0.0,0.0);
|
|
_centerHome.set(0.0,0.0,-1.0);
|
|
_upHome.set(0.0,1.0,0.0);
|
|
}
|
|
|
|
|
|
CameraManipulator::~CameraManipulator()
|
|
{
|
|
}
|
|
|
|
|
|
void CameraManipulator::setCamera(Camera *camera)
|
|
{
|
|
_camera=camera;
|
|
}
|
|
|
|
|
|
const Camera *CameraManipulator::getCamera() const
|
|
{
|
|
return _camera.get();
|
|
}
|
|
|
|
|
|
bool CameraManipulator::handle(const GUIEventAdapter&,GUIActionAdapter&)
|
|
{
|
|
return false;
|
|
}
|