Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10343 in orxonox.OLD for branches


Ignore:
Timestamp:
Jan 24, 2007, 6:12:07 PM (18 years ago)
Author:
gfilip
Message:

blackscreen orientation

Location:
branches/camera/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/camera/src/story_entities/game_world_data.cc

    r10272 r10343  
    102102    localCamera->setName ("GameWorld-Camera");
    103103  State::setCamera(localCamera, localCamera->getTarget());
    104   cameraman* camMan = new cameraman();
     104  CameraMan* camMan = new CameraMan();
    105105  State::setCameraman(camMan);
    106106  LightManager::getInstance();
     
    334334  LoadParamXML(root, "GameRule", this, GameWorldData, loadGameRule);
    335335
    336   LoadParam(root, "clip-region", State::getCameraman(), cameraman, setClipRegion);
     336  LoadParam(root, "clip-region", State::getCameraman(), CameraMan, setClipRegion);
    337337
    338338
  • branches/camera/src/util/state.cc

    r10272 r10343  
    3333CameraTarget* State::cameraTarget = NULL;
    3434
    35 cameraman* State::CameraMan = NULL;
     35CameraMan* State::cameraManager = NULL;
    3636
    3737PNode* State::cameraNode = NULL;
     
    6868
    6969
    70 void State::setCameraman(cameraman* cm)
     70void State::setCameraman(CameraMan* cm)
    7171
    7272{
    73   State::CameraMan=cm;
     73  State::cameraManager=cm;
    7474}
  • branches/camera/src/util/state.h

    r10272 r10343  
    1818class ObjectManager;
    1919class GameRules;
    20 class cameraman;
     20class CameraMan;
    2121class ScriptManager;
    2222
     
    4848  /// CAMERAMANAGER ///
    4949  /////////////////////
    50   /** @param cameraman the PNode to the CameraManager,*/
    51   static void setCameraman(cameraman*);
    52   static inline cameraman* getCameraman() { return State::CameraMan; };
     50  /** @param CameraMan the PNode to the cameraManagerager,*/
     51  static void setCameraman(CameraMan*);
     52  static inline CameraMan* getCameraman() { return State::cameraManager; };
    5353
    5454
     
    126126  static Camera*                camera;             //!< The current Camera.
    127127  static CameraTarget*          cameraTarget;       //!< The Camera Target.
    128   static cameraman*             CameraMan;
     128  static CameraMan*             cameraManager;
    129129  static PNode*                 cameraNode;         //!< A reference to the camera
    130130  static PNode*                 cameraTargetNode;   //!< A reference to the cameraTarget
  • branches/camera/src/world_entities/blackscreen.cc

    r10342 r10343  
    8989}
    9090
     91
     92
     93
    9194void BlackScreen::draw() const
    9295{
     
    100103
    101104  glBegin(GL_QUADS);
    102   glVertex3f(State::getCameraNode()->getAbsCoorX()+3,State::getCameraNode()->getAbsCoorY() -100.0f,
    103              State::getCameraNode()->getAbsCoorZ()-100.0f);
    104   glVertex3f(State::getCameraNode()->getAbsCoorX()+3, State::getCameraNode()->getAbsCoorY()-100.0f,
    105              State::getCameraNode()->getAbsCoorZ()+100.0f);
    106   glVertex3f(State::getCameraNode()->getAbsCoorX()+3, State::getCameraNode()->getAbsCoorY() +100.0f,
    107              State::getCameraNode()->getAbsCoorZ()+100.0f);
    108   glVertex3f(State::getCameraNode()->getAbsCoorX()+3, State::getCameraNode()->getAbsCoorY()+100.0f,
    109              State::getCameraNode()->getAbsCoorZ()-100.0f);
     105  glVertex3f(0.,-100.0f,-100.0f);
     106  glVertex3f(0., -100.0f,100.0f);
     107  glVertex3f(0., 100.0f,100.0f);
     108  glVertex3f(0., 100.0f,-100.0f);
    110109
    111110  glEnd();
  • branches/camera/src/world_entities/cameraman.cc

    r10342 r10343  
    1818#include "game_world_data.h"
    1919#include "state.h"
    20 #include "iostream.h"
    2120#include "sound_engine.h"
    2221#include <string>
    2322
    24 ObjectListDefinition(cameraman);
     23ObjectListDefinition(CameraMan);
    2524
    2625
    27 cameraman::cameraman()
     26CameraMan::CameraMan()
    2827{
    29   this->registerObject(this, cameraman::_objectList);
     28  this->registerObject(this, CameraMan::_objectList);
    3029
    3130  this->nearClip = 1.0;
     
    3938
    4039
    41 void cameraman::createCam()
     40void CameraMan::createCam()
    4241{
    4342 // Camera* newCamera=new Camera();
     
    4847}
    4948
    50 void cameraman::setCam(int cameraNo)
     49void CameraMan::setCam(int cameraNo)
    5150{
    5251  if (cameraNo<cameras.size())
     
    5554  State::setCamera(currentCam, currentCam->getTarget());
    5655  OrxSound::SoundEngine::getInstance()->setListener(currentCam);
    57 
     56  this->fadeToBlack->setParent(this->currentCam);
     57  this->fadeToBlack->setRelCoor(3., 0., 0.);
    5858  }
    5959
     
    6161
    6262
    63 void cameraman::testCam()
     63void CameraMan::testCam()
    6464{
    6565cameras[1]->lookAt(currentCam->getTarget());
     
    6868
    6969
    70 void cameraman::moveCurrCam(int x, int y, int z)
     70void CameraMan::moveCurrCam(int x, int y, int z)
    7171{
    7272currentCam->target->trans(x,y,z);
     
    7474
    7575
    76 void cameraman::moveCam(int x, int y, int z, int camNo)
     76void CameraMan::moveCam(int x, int y, int z, int camNo)
    7777{
    7878cameras[camNo]->target->trans(x,y,z);
     
    8080
    8181
    82 void cameraman::changeTarget(int camNo, std::string className, std::string objectName)
     82void CameraMan::changeTarget(int camNo, std::string className, std::string objectName)
    8383{
    8484  BaseObject* object = ObjectListBase::getBaseObject(className, objectName);
     
    8888
    8989
    90 void cameraman::changeCurrTarget(std::string className, std::string objectName)
     90void CameraMan::changeCurrTarget(std::string className, std::string objectName)
    9191{
    9292  BaseObject* object = ObjectListBase::getBaseObject(className, objectName);
     
    9595}
    9696
    97 void cameraman::atachCurrTarget(PNode* target)
     97void CameraMan::atachCurrTarget(PNode* target)
    9898{
    9999  currentCam->target->atach(target);
    100100}
    101101
    102 void cameraman::jumpCam(int x, int y, int z, int camNo)
     102void CameraMan::jumpCam(int x, int y, int z, int camNo)
    103103{
    104104  cameras[camNo]->target->jump(x, y, z);
     
    107107
    108108
    109 void cameraman::setClipRegion(float nearCli, float farCli)
     109void CameraMan::setClipRegion(float nearCli, float farCli)
    110110{
    111111  this->nearClip=nearCli;
     
    117117
    118118
    119 void cameraman::jumpCurrCam(int x, int y, int z)
     119void CameraMan::jumpCurrCam(int x, int y, int z)
    120120{
    121121  currentCam->target->jump(x, y, z);
     
    125125
    126126
    127 void cameraman::togglFade()
     127void CameraMan::togglFade()
    128128{
    129129  if( this->fadeToBlack)
  • branches/camera/src/world_entities/cameraman.h

    r10342 r10343  
    88#include "blackscreen.h"
    99
    10 class cameraman : public BaseObject {
    11   ObjectListDeclaration(cameraman);
     10class CameraMan : public BaseObject {
     11  ObjectListDeclaration(CameraMan);
    1212
    1313  private:
     
    1919  public:
    2020    std::vector<Camera*> cameras;
    21     cameraman();
     21    CameraMan();
    2222    void setCam(int CameraNo);
    2323    void createCam();
  • branches/camera/src/world_entities/test_entity.h

    r10238 r10343  
    1414  private:
    1515
    16   cameraman* CM;
     16  CameraMan* CM;
    1717
    1818  public:
Note: See TracChangeset for help on using the changeset viewer.