Last change
on this file since 3636 was
3636,
checked in by bensch, 20 years ago
|
orxonox/trunk: functions to set gluPerspective-options
|
File size:
1.2 KB
|
Line | |
---|
1 | /*! |
---|
2 | \file camera.h |
---|
3 | \brief Viewpoint controlling class definitions |
---|
4 | */ |
---|
5 | |
---|
6 | #ifndef _CAMERA_H |
---|
7 | #define _CAMERA_H |
---|
8 | |
---|
9 | #include "p_node.h" |
---|
10 | |
---|
11 | class World; |
---|
12 | class CameraTarget; |
---|
13 | |
---|
14 | |
---|
15 | //! Camera |
---|
16 | /** |
---|
17 | This class controls the viewpoint from which the World is rendered. |
---|
18 | */ |
---|
19 | class Camera : public PNode |
---|
20 | { |
---|
21 | private: |
---|
22 | CameraTarget* target; //!< The Target of the Camera (where this Camera Looks at) |
---|
23 | |
---|
24 | float fovy; //!< The field of view Angle (in degrees). |
---|
25 | float aspectRatio; //!< The aspect ratio (width / height). |
---|
26 | float nearClip; //!< The near clipping plane. |
---|
27 | float farClip; //!< The far clipping plane. |
---|
28 | |
---|
29 | public: |
---|
30 | Camera(void); |
---|
31 | virtual ~Camera(void); |
---|
32 | |
---|
33 | void lookAt(PNode* target); |
---|
34 | PNode* getTarget(); |
---|
35 | |
---|
36 | void setAspectRatio(float aspectRatio); |
---|
37 | void setFovy(float fovy); |
---|
38 | void setClipRegion(float nearClip, float farClip); |
---|
39 | |
---|
40 | void apply (void); |
---|
41 | }; |
---|
42 | |
---|
43 | //! A CameraTarget is where the Camera is looking at. |
---|
44 | class CameraTarget : public PNode |
---|
45 | { |
---|
46 | friend class Camera; //! The CameraTarget is a friend of Camera. noone else needs a CameraTarget, so noone else can create it. |
---|
47 | |
---|
48 | private: |
---|
49 | CameraTarget(void); |
---|
50 | |
---|
51 | public: |
---|
52 | virtual ~CameraTarget(void); |
---|
53 | }; |
---|
54 | |
---|
55 | |
---|
56 | #endif /* _CAMERA_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.