30 lines
793 B
C++
30 lines
793 B
C++
#pragma once
|
|
|
|
#include <osgGA/OrbitManipulator>
|
|
|
|
/**
|
|
* OrbitManipulator
|
|
* ----------------
|
|
* Thin subclass of osgGA::OrbitManipulator that tweaks defaults for
|
|
* inspecting character models:
|
|
* - LMB drag → orbit
|
|
* - MMB drag → pan
|
|
* - Scroll → dolly
|
|
* - F key → frame the whole scene
|
|
* - R key → reset to default view
|
|
*
|
|
* The manipulator targets the scene centre, with a configurable
|
|
* initial eye offset.
|
|
*/
|
|
class OrbitManipulator : public osgGA::OrbitManipulator {
|
|
public:
|
|
OrbitManipulator();
|
|
|
|
/// Set a comfortable starting position for viewing a humanoid model.
|
|
void setDefaultHumanoidView();
|
|
|
|
protected:
|
|
bool handleKeyDown(const osgGA::GUIEventAdapter& ea,
|
|
osgGA::GUIActionAdapter& aa) override;
|
|
};
|