PeriDyno 1.0.0
Loading...
Searching...
No Matches
TrackballCamera.h
Go to the documentation of this file.
1
16
17#pragma once
18#include "Camera.h"
19
20namespace dyno
21{
22 class TrackballCamera : public Camera {
23
24 public:
27
28 void reset();
29
30 void registerPoint(float x, float y) override;
31
32 void rotateToPoint(float x, float y) override;
33 void translateToPoint(float x, float y) override;
34 void zoom(float amount) override;
35
36 //TODO: implement
37 void setEyePos(const Vec3f& p) override { mCameraPos = p; };
38
39 //TODO: implement
40 void setTargetPos(const Vec3f& p) override { mCameraTarget = p; };
41
42 //TODO: implement
43 Vec3f getEyePos() const override { return mCameraPos; };
44
45 //TODO: implement
46 Vec3f getTargetPos() const override { return mCameraTarget;};
47
48 glm::mat4 getViewMat() override;
49 glm::mat4 getProjMat() override;
50
51 public:
52 float mRegX;
53 float mRegY;
54
58 };
59
60}
61
glm::mat4 getViewMat() override
void zoom(float amount) override
Vec3f getTargetPos() const override
void translateToPoint(float x, float y) override
void setTargetPos(const Vec3f &p) override
void setEyePos(const Vec3f &p) override
Vec3f getEyePos() const override
void registerPoint(float x, float y) override
void rotateToPoint(float x, float y) override
glm::mat4 getProjMat() override
This is an implementation of AdditiveCCD based on peridyno.
Definition Array.h:25
Vector< float, 3 > Vec3f
Definition Vector3D.h:93