|
|
@ -367,6 +367,11 @@ namespace CSVRender
|
|
|
|
{
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
osg::Vec3d OrbitCameraController::getCenter() const
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return mCenter;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
double OrbitCameraController::getOrbitSpeed() const
|
|
|
|
double OrbitCameraController::getOrbitSpeed() const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return mOrbitSpeed;
|
|
|
|
return mOrbitSpeed;
|
|
|
@ -382,6 +387,19 @@ namespace CSVRender
|
|
|
|
return mPickingMask;
|
|
|
|
return mPickingMask;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void OrbitCameraController::setCenter(const osg::Vec3d& value)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
osg::Vec3d eye, center, up;
|
|
|
|
|
|
|
|
getCamera()->getViewMatrixAsLookAt(eye, center, up);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mCenter = value;
|
|
|
|
|
|
|
|
mDistance = (eye - mCenter).length();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getCamera()->setViewMatrixAsLookAt(eye, mCenter, up);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mInitialized = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void OrbitCameraController::setOrbitSpeed(double value)
|
|
|
|
void OrbitCameraController::setOrbitSpeed(double value)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
mOrbitSpeed = value;
|
|
|
|
mOrbitSpeed = value;
|
|
|
|