Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10206 in orxonox.OLD for branches/camera/src


Ignore:
Timestamp:
Jan 10, 2007, 1:51:44 PM (18 years ago)
Author:
gfilip
Message:

update

Location:
branches/camera/src/world_entities
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/camera/src/world_entities/Makefile.am

    r10195 r10206  
    1111                camera.cc \
    1212                cameraman.cc \
     13                blackscreen.cc \
    1314                playable.cc \
    1415                player.cc \
     
    4243                camera.h \
    4344                cameraman.h \
     45                blackscreen.h \
    4446                extendable.h \
    4547                playable.h \
  • branches/camera/src/world_entities/camera.cc

    r10204 r10206  
    376376}
    377377
    378 void CameraTarget::jump(Vector newPos)
    379 {
    380 target->setAbsCoor(newPos);
     378void CameraTarget::jump(float x, float y, float z)
     379{
     380target->setAbsCoor(x,y,z);
    381381}
    382382
  • branches/camera/src/world_entities/camera.h

    r10204 r10206  
    105105  void changeSpeed(float speed);
    106106  Vector* rotate(Vector* newPos, float speed);
    107   void jump(Vector newPos);
     107  void jump(float x, float y, float z);
    108108  void test();
    109109  void translateNow(Vector* vec);
  • branches/camera/src/world_entities/cameraman.cc

    r10205 r10206  
     1/*
     2   orxonox - the future of 3D-vertical-scrollers
     3
     4   Copyright (C) 2004 orx
     5
     6   This program is free software; you can redistribute it and/or modify
     7   it under the terms of the GNU General Public License as published by
     8   the Free Software Foundation; either version 2, or (at your option)
     9   any later version.
     10
     11### File Specific:
     12   main-programmer: Filip Gospodinov
     13   co-programmer:
     14*/
     15
    116#include "shell_command.h"
    217#include "cameraman.h"
     
    1025{
    1126  currentCam=State::getCamera();
    12   cameras[0]=currentCam;
    13   camAmount=1;
     27  this->cameras.push_back(currentCam);
    1428
    1529}
     
    1832void cameraman::createCam()
    1933{
    20 if (camAmount<6)
    21 {
    2234  Camera* newCamera=new Camera();
    23   cameras[camAmount]=newCamera;
    24 }
     35  this->cameras.push_back(newCamera);
     36  //cameraList.size();
     37  //cameraList[4]
    2538}
    2639
    2740void cameraman::setCam(int cameraNo)
    2841{
    29   if (cameraNo<camAmount)
     42  if (cameraNo<cameras.size())
    3043  {
    3144  currentCam=cameras[cameraNo];
     
    6275void cameraman::jumpCam(int x, int y, int z, int camNo)
    6376{
    64  // cameras[camNo]
     77  cameras[camNo]->target->jump(x, y, z);
    6578}
    6679
    6780
    68 void jumpCurrCam(int x, int y, int z)
     81void cameraman::jumpCurrCam(int x, int y, int z)
    6982{
     83  currentCam->target->jump(x, y, z);
    7084}
    7185
  • branches/camera/src/world_entities/cameraman.h

    r10205 r10206  
    44#include "p_node.h"
    55#include "camera.h"
     6#include <vector>
    67
    78class cameraman {
     
    910  private:
    1011    Camera* currentCam;
    11     int camNo;
    12     int camAmount;
    13     Camera* cameras[6];
     12   // int camNo;
     13    std::vector<Camera*> cameras;
    1414
    1515
Note: See TracChangeset for help on using the changeset viewer.