Frapper
1.0a
Main Page
Namespaces
Classes
Files
File List
File Members
core
ViewingParameters.h
Go to the documentation of this file.
1
/*
2
-----------------------------------------------------------------------------
3
This source file is part of FRAPPER
4
research.animationsinstitut.de
5
sourceforge.net/projects/frapper
6
7
Copyright (c) 2008-2009 Filmakademie Baden-Wuerttemberg, Institute of Animation
8
9
This program is free software; you can redistribute it and/or modify it under
10
the terms of the GNU Lesser General Public License as published by the Free Software
11
Foundation; version 2.1 of the License.
12
13
This program is distributed in the hope that it will be useful, but WITHOUT
14
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
16
17
You should have received a copy of the GNU Lesser General Public License along with
18
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
19
Place - Suite 330, Boston, MA 02111-1307, USA, or go to
20
http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
21
-----------------------------------------------------------------------------
22
*/
23
32
33
#ifndef VIEWINGPARAMETERS_H
34
#define VIEWINGPARAMETERS_H
35
36
#include "
Node.h
"
37
#include <Ogre.h>
38
#if (OGRE_PLATFORM == OGRE_PLATFORM_WIN32)
39
#include <windows.h>
40
#endif
41
42
namespace
Frapper {
43
47
class
FRAPPER_CORE_EXPORT
ViewingParameters
48
{
49
50
public
:
// constructors and destructors
51
55
ViewingParameters
();
56
60
~
ViewingParameters
();
61
62
public
:
// functions
63
67
void
reset ();
68
75
void
translate (
float
dx,
float
dy );
76
83
void
rotate (
float
dPhi,
float
dTheta );
84
91
void
dolly (
float
delta,
bool
wheel =
false
);
92
97
void
update ();
98
104
void
applyTo (
ViewingParameters
*viewingParameters );
105
112
void
applyTo (
Node
*node );
113
121
void
applyTo (
Ogre::SceneNode
*sceneNode,
bool
lookAtOrigin =
false
,
bool
center =
false
);
122
128
void
applyTo ( Ogre::Camera *camera );
129
136
void
applyFrom (
Node
*node );
137
143
unsigned
int
getCanvasWidth ()
const
;
144
150
unsigned
int
getCanvasHeight ()
const
;
151
158
void
setCanvasSize (
unsigned
int
width,
unsigned
int
height );
159
160
private
:
// data
161
165
Ogre::Real
m_viewRadius
;
166
170
Ogre::Degree
m_viewAnglePhi
;
171
175
Ogre::Degree
m_viewAngleTheta
;
176
180
Ogre::Vector3
m_eye
;
181
185
Ogre::Vector3
m_center
;
186
190
Ogre::Vector3
m_up
;
191
195
Ogre::Radian
m_fieldOfView
;
196
200
Ogre::Real
m_nearClipping
;
201
205
Ogre::Real
m_farClipping
;
206
210
unsigned
int
m_canvasWidth
;
211
215
unsigned
int
m_canvasHeight
;
216
217
};
218
219
}
// end namespace Frapper
220
221
#endif
Generated on Tue Sep 18 2012 11:43:03 for Frapper by
1.8.2