Remove all implementation from the interaction handler class. Interface is still the same.

This commit is contained in:
Kalle Bladin
2016-05-20 17:39:32 -04:00
parent faa52404b2
commit c2ef5cca58
2 changed files with 213 additions and 0 deletions

View File

@@ -41,6 +41,8 @@ class SceneGraphNode;
namespace interaction {
#ifdef USE_OLD_INTERACTIONHANDLER
class InteractionHandler : public properties::PropertyOwner {
public:
InteractionHandler();
@@ -136,6 +138,72 @@ private:
std::mutex _keyframeMutex;
};
#endif // FALSE
class InteractionHandler : public properties::PropertyOwner
{
public:
InteractionHandler();
~InteractionHandler();
// Mutators
void setKeyboardController(KeyboardController* controller);
void setMouseController(MouseController* controller);
void setFocusNode(SceneGraphNode* node);
void setCamera(Camera* camera);
void setInteractionSensitivity(float sensitivity);
void setInvertRoll(bool invert);
void setInvertRotation(bool invert);
void resetKeyBindings();
void addController(Controller* controller);
void addKeyframe(const network::datamessagestructures::PositionKeyframe &kf);
void clearKeyframes();
void bindKey(Key key, KeyModifier modifier, std::string lua);
void lockControls();
void unlockControls();
void update(double deltaTime);
// Accessors
const SceneGraphNode* const focusNode() const;
const Camera* const camera() const;
double deltaTime() const;
float interactionSensitivity() const;
bool invertRoll() const;
bool invertRotation() const;
/**
* Returns the Lua library that contains all Lua functions available to affect the
* interaction. The functions contained are
* - openspace::luascriptfunctions::setOrigin
* \return The Lua library that contains all Lua functions available to affect the
* interaction
*/
static scripting::ScriptEngine::LuaLibrary luaLibrary();
// Callback functions
void keyboardCallback(Key key, KeyModifier modifier, KeyAction action);
void mouseButtonCallback(MouseButton button, MouseAction action);
void mousePositionCallback(double x, double y);
void mouseScrollWheelCallback(double pos);
// Interaction functions
void orbitDelta(const glm::quat& rotation);
void orbit(const float &dx, const float &dy, const float &dz, const float &dist);
void rotateDelta(const glm::quat& rotation);
void distanceDelta(const PowerScaledScalar& distance, size_t iterations = 0);
void lookAt(const glm::quat& rotation);
void setRotation(const glm::quat& rotation);
private:
};
} // namespace interaction
} // namespace openspace

View File

@@ -43,6 +43,9 @@ namespace {
namespace openspace {
namespace interaction {
#ifdef USE_OLD_INTERACTIONHANDLER
InteractionHandler::InteractionHandler()
: properties::PropertyOwner()
, _camera(nullptr)
@@ -587,5 +590,147 @@ void InteractionHandler::clearKeyframes(){
_keyframeMutex.unlock();
}
#endif // USE_OLD_INTERACTIONHANDLER
InteractionHandler::InteractionHandler()
{
}
InteractionHandler::~InteractionHandler()
{
}
void InteractionHandler::setKeyboardController(KeyboardController* controller)
{
}
void InteractionHandler::setMouseController(MouseController* controller)
{
}
void InteractionHandler::addController(Controller* controller) {
}
void InteractionHandler::lockControls() {
}
void InteractionHandler::unlockControls() {
}
void InteractionHandler::update(double deltaTime) {
}
void InteractionHandler::setFocusNode(SceneGraphNode* node) {
}
const SceneGraphNode* const InteractionHandler::focusNode() const {
return nullptr;
}
void InteractionHandler::setCamera(Camera* camera) {
}
const Camera* const InteractionHandler::camera() const {
return nullptr;
}
void InteractionHandler::mouseButtonCallback(MouseButton button, MouseAction action) {
}
void InteractionHandler::mousePositionCallback(double x, double y) {
}
void InteractionHandler::mouseScrollWheelCallback(double pos) {
}
void InteractionHandler::orbit(const float &dx, const float &dy, const float &dz, const float &dist) {
}
void InteractionHandler::orbitDelta(const glm::quat& rotation)
{
}
void InteractionHandler::rotateDelta(const glm::quat& rotation)
{
}
void InteractionHandler::distanceDelta(const PowerScaledScalar& distance, size_t iterations)
{
}
void InteractionHandler::lookAt(const glm::quat& rotation)
{
}
void InteractionHandler::keyboardCallback(Key key, KeyModifier modifier, KeyAction action) {
}
void InteractionHandler::resetKeyBindings() {
}
void InteractionHandler::bindKey(Key key, KeyModifier modifier, std::string lua) {
}
scripting::ScriptEngine::LuaLibrary InteractionHandler::luaLibrary() {
return{};
}
void InteractionHandler::setRotation(const glm::quat& rotation)
{
}
double InteractionHandler::deltaTime() const {
return 0;
}
void InteractionHandler::setInteractionSensitivity(float sensitivity) {
}
float InteractionHandler::interactionSensitivity() const {
return 0;
}
void InteractionHandler::setInvertRoll(bool invert) {
}
bool InteractionHandler::invertRoll() const {
return false;
}
void InteractionHandler::setInvertRotation(bool invert) {
}
bool InteractionHandler::invertRotation() const {
return false;
}
void InteractionHandler::addKeyframe(const network::datamessagestructures::PositionKeyframe &kf) {
}
void InteractionHandler::clearKeyframes() {
}
} // namespace interaction
} // namespace openspace