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 viewportTo3DWorld(
const Coord &point)
const;
206 return viewportTo3DWorld(point);
213 Coord worldTo2DViewport(
const Coord &obj)
const;
220 return worldTo2DViewport(obj);
226 virtual void getXML(std::string &outString);
231 virtual void setWithXML(
const std::string &inString,
unsigned int ¤tPosition);
238 void getModelviewMatrix(Matrix<float, 4> &modelviewMatrix)
const {
239 modelviewMatrix=this->modelviewMatrix;
245 void getProjectionMatrix(Matrix<float, 4> &projectionMatrix)
const {
246 projectionMatrix=this->projectionMatrix;
252 void getTransformMatrix(Matrix<float, 4> &transformMatrix)
const {
253 transformMatrix=this->transformMatrix;
259 void getProjAndMVMatrix(
const Vector<int, 4>& viewport,Matrix<float, 4> &projectionMatrix,Matrix<float, 4> &modelviewMatrix)
const;
264 void getTransformMatrix(
const Vector<int, 4>& viewport,Matrix<float, 4> &transformMatrix)
const;
279 void initProjection(
const Vector<int, 4>& viewport,
bool reset=
true);
284 void initProjection(
bool reset=
true);
289 void initModelView();
302 Coord center,eyes,up;
309 Matrix<float, 4> modelviewMatrix;
310 Matrix<float, 4> projectionMatrix;
311 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.
Coord screenTo3DWorld(const Coord &point) const
Return the 3D world coordinate for the given viewport point.
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.
Coord worldTo2DScreen(const Coord &obj) const
Return the viewport position for the given 3D coordinate.