feat (wip): implementing camera zooming and panning functionality
This commit is contained in:
1 parent
cd87f383c9
commit
4d743a42c1
14 files changed
+180
-22
No files matched your search
@@ -0,0 +1,27 @@
|
||||
#ifndef VTKBASE_CAMERAMOVECALLBACK_H
|
||||
#define VTKBASE_CAMERAMOVECALLBACK_H
|
||||
|
||||
|
||||
#include <vtkCallbackCommand.h>
|
||||
#include <vtkCamera.h>
|
||||
#include <vtkRenderWindowInteractor.h>
|
||||
#include <vtkMatrix4x4.h>
|
||||
|
||||
class CameraMoveCallback : public vtkCallbackCommand {
|
||||
|
||||
public:
|
||||
static CameraMoveCallback *New(vtkCamera *cam);
|
||||
CameraMoveCallback();
|
||||
|
||||
void setCam(const vtkSmartPointer<vtkCamera> &cam);
|
||||
|
||||
private:
|
||||
vtkSmartPointer<vtkCamera> cam;
|
||||
|
||||
void Execute(vtkObject *caller, unsigned long evId, void *callData) override;
|
||||
void zoom(const bool in);
|
||||
void pan(const std::string dir);
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||