source: trunk/vizservers/nanovis/Camera.h @ 828

Last change on this file since 828 was 580, checked in by vrinside, 17 years ago
File size: 1.6 KB
Line 
1/*
2 * ----------------------------------------------------------------------
3 * Camera.h : Camera class
4 *
5 * ======================================================================
6 *  AUTHOR:  Wei Qiao <qiaow@purdue.edu>
7 *           Purdue Rendering and Perceptualization Lab (PURPL)
8 *
9 *  Copyright (c) 2004-2006  Purdue Research Foundation
10 *
11 *  See the file "license.terms" for information on usage and
12 *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
13 * ======================================================================
14 */
15
16#ifndef _CAMERA_H_
17#define _CAMERA_H_
18
19
20#include <GL/glu.h>
21#include "Vector3.h"
22
23class Camera{
24
25public:
26        Vector3 location;       //Location of the camera in the scene
27        Vector3 target;         //Location the camera is looking at.
28                                //location and target: two points define the line-of-sight     
29        Vector3 angle;          //rotation angles of camera along x, y, z
30        int width;      //screen size
31        int height;     //screen size
32    int startX;
33    int startY;
34
35        ~Camera();
36        Camera(int startx, int starty, int w, int h,
37                double loc_x, double loc_y, double loc_z,
38                double target_x, double target_y, double target_z,
39                int angle_x, int angle_y, int angle_z);
40        void move(double loc_x, double loc_y, double loc_z);    //move location of camera
41        void aim(double target_x, double target_y, double target_z); //change target point
42        void rotate(double angle_x, double angle_y, double angle_z); //change target point
43        void activate();//make the camera setting active, this has to be called before drawing things.
44        void set_screen_size(int startx, int starty, int w, int h);
45};
46
47#endif
Note: See TracBrowser for help on using the repository browser.