source:
orxonox.OLD/branches/camera/src/world_entities/cameraman.cc
@
10199
| Last change on this file since 10199 was 10198, checked in by gfilip, 19 years ago | |
|---|---|
| File size: 464 bytes | |
| Rev | Line | |
|---|---|---|
| [10192] | 1 | #include "shell_command.h" |
| 2 | #include "cameraman.h" | |
| [10197] | 3 | |
| [10195] | 4 | #include "state.h" |
| [10192] | 5 | |
| 6 | ||
| 7 | ||
| 8 | ||
| 9 | cameraman::cameraman() | |
| 10 | { | |
| [10197] | 11 | currentCam=State::getCamera(); |
| [10193] | 12 | cameras[0]=currentCam; |
| 13 | camAmount=1; | |
| [10192] | 14 | |
| 15 | } | |
| 16 | ||
| 17 | ||
| 18 | void cameraman::createCam() | |
| 19 | { | |
| [10195] | 20 | if (camAmount<6) |
| [10193] | 21 | { |
| [10197] | 22 | Camera* newCamera=new Camera(); |
| [10193] | 23 | cameras[camAmount]=newCamera; |
| [10192] | 24 | } |
| [10195] | 25 | } |
| [10192] | 26 | |
| [10193] | 27 | void cameraman::setCam(int cameraNo) |
| [10192] | 28 | { |
| [10193] | 29 | if (cameraNo<camAmount) |
| [10197] | 30 | { |
| [10193] | 31 | currentCam=cameras[cameraNo]; |
| [10198] | 32 | State::setCamera(currentCam, currentCam->getTarget()); |
| [10197] | 33 | } |
| [10195] | 34 | |
| [10192] | 35 | } |
| 36 | ||
| [10195] | 37 |
Note: See TracBrowser
for help on using the repository browser.










