Starshatter_Open
Open source Starshatter engine
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Camera.h
Go to the documentation of this file.
1
/* Project nGenEx
2
Destroyer Studios LLC
3
Copyright © 1997-2004. All Rights Reserved.
4
5
SUBSYSTEM: nGenEx.lib
6
FILE: Camera.h
7
AUTHOR: John DiCamillo
8
9
10
OVERVIEW
11
========
12
Camera class - Position and Point of View
13
*/
14
15
#ifndef Camera_h
16
#define Camera_h
17
18
// +--------------------------------------------------------------------+
19
20
#include "
Types.h
"
21
#include "
Geometry.h
"
22
23
// +--------------------------------------------------------------------+
24
25
class
Camera
26
{
27
public
:
28
static
const
char
*
TYPENAME
() {
return
"Camera"
; }
29
30
Camera
(
double
x=0.0,
double
y=0.0,
double
z=0.0);
31
virtual
~Camera
();
32
33
void
Aim
(
double
roll,
double
pitch,
double
yaw) {
orientation
.
Rotate
(roll, pitch, yaw); }
34
void
Roll
(
double
roll) {
orientation
.
Roll
(roll); }
35
void
Pitch
(
double
pitch) {
orientation
.
Pitch
(pitch); }
36
void
Yaw
(
double
yaw) {
orientation
.
Yaw
(yaw); }
37
38
void
MoveTo
(
double
x,
double
y,
double
z);
39
void
MoveTo
(
const
Point
& p);
40
void
MoveBy
(
double
dx,
double
dy,
double
dz);
41
void
MoveBy
(
const
Point
& p);
42
43
void
Clone
(
const
Camera
& cam);
44
void
LookAt
(
const
Point
& target);
45
void
LookAt
(
const
Point
& target,
const
Point
& eye,
const
Point
& up);
46
bool
Padlock
(
const
Point
& target,
double
alimit=-1,
double
e_lo=-1,
double
e_hi=-1);
47
48
Point
Pos
()
const
{
return
pos
; }
49
Point
vrt
()
const
{
return
Point
(
orientation
(0,0),
orientation
(0,1),
orientation
(0,2)); }
50
Point
vup
()
const
{
return
Point
(
orientation
(1,0),
orientation
(1,1),
orientation
(1,2)); }
51
Point
vpn
()
const
{
return
Point
(
orientation
(2,0),
orientation
(2,1),
orientation
(2,2)); }
52
53
const
Matrix
&
Orientation
()
const
{
return
orientation
; }
54
55
protected
:
56
Point
pos
;
57
Matrix
orientation
;
58
};
59
60
#endif Camera_h
61
nGenEx
Camera.h
Generated on Tue Jun 5 2012 20:46:20 for Starshatter_Open by
1.8.1