23 #include <tulip/Coord.h>
24 #include <tulip/Matrix.h>
25 #include <tulip/BoundingBox.h>
26 #include <tulip/Observable.h>
58 Coord eyes=Coord(0,0,10), Coord up=Coord(0,-1,0),
59 double zoomFactor=0.5,
double sceneRadius=10);
102 void move(
float speed);
106 void strafeLeftRight(
float speed);
110 void strafeUpDown(
float speed);
114 void rotate(
float angle,
float x,
float y,
float z);
126 Vector<int, 4> getViewport()
const;
140 void setZoomFactor(
double zoomFactor);
155 void setEyes(
const Coord& eyes);
170 void setCenter(
const Coord& center);
185 void setUp(
const Coord& up);
199 Coord screenTo3DWorld(
const Coord &point)
const;
205 Coord worldTo2DScreen(
const Coord &obj)
const;
210 virtual void getXML(std::string &outString);
215 virtual void setWithXML(
const std::string &inString,
unsigned int ¤tPosition);
222 void getModelviewMatrix(Matrix<float, 4> &modelviewMatrix)
const {
223 modelviewMatrix=this->modelviewMatrix;
229 void getProjectionMatrix(Matrix<float, 4> &projectionMatrix)
const {
230 projectionMatrix=this->projectionMatrix;
236 void getTransformMatrix(Matrix<float, 4> &transformMatrix)
const {
237 transformMatrix=this->transformMatrix;
243 void getProjAndMVMatrix(
const Vector<int, 4>& viewport,Matrix<float, 4> &projectionMatrix,Matrix<float, 4> &modelviewMatrix)
const;
248 void getTransformMatrix(
const Vector<int, 4>& viewport,Matrix<float, 4> &transformMatrix)
const;
263 void initProjection(
const Vector<int, 4>& viewport,
bool reset=
true);
268 void initProjection(
bool reset=
true);
273 void initModelView();
278 void setSceneRadius(
double sceneRadius,
const BoundingBox sceneBoundingBox=BoundingBox());
286 Coord center,eyes,up;
289 BoundingBox sceneBoundingBox;
293 Matrix<float, 4> modelviewMatrix;
294 Matrix<float, 4> projectionMatrix;
295 Matrix<float, 4> transformMatrix;
GlScene * getScene() const
Return the camera's scene.
bool is3D() const
Return if the camera is a 3D one.
double getZoomFactor() const
Return the zoom factor.
void loadCameraParametersWith(const Camera &camera)
Load this camera parameters (eye, center, zoom factor) with an other camera parameters.
Coord getUp() const
Return the up vector.
Coord getCenter() const
Return the center.
double getSceneRadius() const
Return the scene radius.
This class represents the 3D bounding box of an object. It is mostly used to determine whether or not...
Tulip OpenGL camera object.
Coord getEyes() const
Return the eyes.
The Observable class is the base of Tulip's observation system.