scg3  0.6
PerspectiveCamera.h
Go to the documentation of this file.
1 
9 /*
10  * Copyright 2014-2019 Volker Ahlers
11  *
12  * Licensed under the Apache License, Version 2.0 (the "License");
13  * you may not use this file except in compliance with the License.
14  * You may obtain a copy of the License at
15  *
16  * http://www.apache.org/licenses/LICENSE-2.0
17  *
18  * Unless required by applicable law or agreed to in writing, software
19  * distributed under the License is distributed on an "AS IS" BASIS,
20  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21  * See the License for the specific language governing permissions and
22  * limitations under the License.
23  */
24 
25 #ifndef PERSPECTIVECAMERA_H_
26 #define PERSPECTIVECAMERA_H_
27 
28 #include "scg_glew.h"
29 #include "Camera.h"
30 
31 namespace scg {
32 
33 
44 class PerspectiveCamera: public Camera {
45 
46 public:
47 
52 
56  virtual ~PerspectiveCamera();
57 
61  static PerspectiveCameraSP create();
62 
71  void init(GLfloat fovyDeg, GLfloat near, GLfloat far);
72 
77  virtual void updateProjection();
78 
79 protected:
80 
81  GLfloat fovyRad_;
82  GLfloat near_;
83  GLfloat far_;
84 
85 };
86 
87 
88 } /* namespace scg */
89 
90 #endif /* PERSPECTIVECAMERA_H_ */
void init(GLfloat fovyDeg, GLfloat near, GLfloat far)
Base class for all cameras (composite node, abstract).
Definition: Camera.h:51
virtual ~PerspectiveCamera()
static PerspectiveCameraSP create()
virtual void updateProjection()
A camera with perspective projection (composite node).
Local header file for GLEW library.
Base class for all cameras (leaf node, abstract).
Definition: Animation.h:28