camera.h 1.36 KB
Newer Older
Pierre Kraemer's avatar
Pierre Kraemer committed
1 2 3
#ifndef _CAMERA_H_
#define _CAMERA_H_

4
#include "visualization/view.h"
Pierre Kraemer's avatar
Pierre Kraemer committed
5 6 7

//forward declaration

8 9
class Camera : public qglviewer::Camera
{
Pierre Kraemer's avatar
Pierre Kraemer committed
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
public:
	Camera(View* v);
	Camera(View* v, Camera c);
	~Camera();

	bool isShared(){return (l_views.size()>1);}

	QString getName(){return m_name;}
	void setName(QString name){m_name= name;}

	void draw();
	void enableDraw(bool b=true){m_draw=b;}
	bool isDrawn(){return m_draw;}
	void enableDrawFarPlan(bool b=true){m_drawFarPlane=b;}
	bool isFarPlaneDrawn(){return m_drawFarPlane;}
	void setDrawScale(double s){m_drawScale=s;}
	double getDrawScale(){return m_drawScale;}

	bool isPathDrawn(){return m_drawUserPath;}
	void enablePathDraw(bool b=true){m_drawUserPath=b;}
	bool isPathAxisDrawn(){return m_drawUserPathAxis;}
	void enablePathAxisDrawn(bool b=true){m_drawUserPathAxis=b;}
	void setPathDrawScale(double s){m_drawUserPathScale= s;}
	double getPathDrawScale(){return m_drawUserPathScale;}

	void takenFrom(View* v);
	void sharedWith(View* v);

	void fitParamWith(View* v);

	void resetSnapCount(){m_snapCount=0;}
	void saveSnapshot(QString snapPathName);

	void updateGL();

	void viewShowButton(bool b);

protected:
	QList<View*> l_views;

	QString m_name;

	bool m_draw;
	bool m_drawFarPlane;
	double m_drawScale;

	bool m_drawUserPath;
	bool m_drawUserPathAxis;
	double m_drawUserPathScale;

	View* m_lastWorkingView;

	int m_snapCount;
};

#endif