Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/camera/src/world_entities/cameraman.cc @ 10204

Last change on this file since 10204 was 10204, checked in by gfilip, 17 years ago

next update

File size: 992 bytes
Line 
1#include "shell_command.h"
2#include "cameraman.h"
3
4#include "state.h"
5
6
7
8
9cameraman::cameraman()
10{
11  currentCam=State::getCamera();
12  cameras[0]=currentCam;
13  camAmount=1;
14
15}
16
17
18void cameraman::createCam()
19{
20if (camAmount<6)
21{
22  Camera* newCamera=new Camera();
23  cameras[camAmount]=newCamera;
24}
25}
26
27void cameraman::setCam(int cameraNo)
28{
29  if (cameraNo<camAmount)
30  {
31  currentCam=cameras[cameraNo];
32  State::setCamera(currentCam, currentCam->getTarget());
33  }
34
35}
36
37
38
39void cameraman::moveCurrCam(int x, int y, int z)
40{
41currentCam->target->trans(x,y,z);
42}
43
44
45void cameraman::moveCam(int x, int y, int z, int camNo)
46{
47cameras[camNo]->target->trans(x,y,z);
48}
49
50
51void cameraman::changeTarget(int camNo, PNode* target)
52{
53  cameras[camNo]->setTargetNode(target);
54}
55
56
57void cameraman::changeCurrTarget(PNode* target)
58{
59  currentCam->setTargetNode(target);
60}
61
62void cameraman::jumpCam(int x, int y, int z, int camNo)
63{
64 // cameras[camNo]
65}
66
67
68void jumpCurrCam(int x, int y, int z)
69{
70}
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
Note: See TracBrowser for help on using the repository browser.