Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10338 in orxonox.OLD for branches


Ignore:
Timestamp:
Jan 24, 2007, 5:04:03 PM (18 years ago)
Author:
gfilip
Message:

so many updates

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

Legend:

Unmodified
Added
Removed
  • branches/camera/src/world_entities/blackscreen.cc

    r10330 r10338  
    7171  this->material = new Material();
    7272 // this->material->setIllum(3);
    73  // this->material->setDiffuse(0,0,0);
    74   this->material->setSpecular(0.0,0.0,0.0);
    75  // this->material->setAmbient(0, 0, 0);
     73 // this->material->setTransparency(0.6);
     74  //this->material->setDiffuse(0,0,0);
     75  //this->material->setBlendFuncS("GL_SORCE_APLHA", "GL_ZERO");
     76 // this->material->setSpecular(0.0,0.0,0.0);
     77 // this->material->setAmbient(1, 1, 1);
    7678
    7779  i=1;
     
    117119//
    118120
    119 glColor4f(0, 0, 0, i);
     121//glColor4f(0, 0, 0, i);
     122
     123this->material->setTransparency(i);
    120124this->material->select();
    121 this->material->setTransparency(i);
     125
    122126  glBegin(GL_QUADS);
    123127  glVertex3f(State::getCameraNode()->getAbsCoorX()+3,State::getCameraNode()->getAbsCoorY() -100.0f,
     
    179183}
    180184
     185bool blackscreen::isBlack()
     186{
     187if (i==1)
     188  return 1;
     189else
     190  return 0;
     191}
     192
     193bool blackscreen::isTrans()
     194{
     195  if (i==0)
     196    return 1;
     197  else
     198    return 0;
     199}
  • branches/camera/src/world_entities/blackscreen.h

    r10330 r10338  
    3030    void toggleFade();
    3131    void changeFadeSpeed(float newSpeed);
     32    bool isBlack();
     33    bool isTrans();
    3234    virtual void tick (float time);
    3335
  • branches/camera/src/world_entities/camera.cc

    r10238 r10338  
    1919#include "glincl.h"
    2020#include "vector.h"
    21 #include "shell_command.h"
    2221#include "targets.h"
    2322
     
    296295ObjectListDefinition(CameraTarget);
    297296
    298 SHELL_COMMAND(det, CameraTarget, detach);
    299 SHELL_COMMAND(tes, CameraTarget, test);
    300 SHELL_COMMAND(tr, CameraTarget,trans);
    301 SHELL_COMMAND(t2, CameraTarget,test2);
    302 
    303 
    304 
    305 
    306297
    307298CameraTarget::CameraTarget()
     
    395386
    396387
    397 void CameraTarget::test()
    398 {
    399   atach(target);
    400 }
    401 
    402 
    403 void CameraTarget::test2()
    404 {
    405   trans(-200, 0, 0);
    406 }
    407 
    408 
     388bool CameraTarget::isDone()
     389{
     390  if (fabs(translateTo.len()  - (target->getAbsCoor()).len()) >= 11 )
     391    return 0;
     392  else
     393    return 1;
     394}
  • branches/camera/src/world_entities/camera.h

    r10238 r10338  
    110110  Vector* rotate(Vector* newPos, float speed);
    111111  void jump(float x, float y, float z);
    112   void test();
    113112  void translateNow(Vector* vec);
    114113  PNode* createStick();
    115114  void trans(float x, float y, float z);
    116   void test2();
     115  bool isDone();
    117116};
    118117
  • branches/camera/src/world_entities/cameraman.cc

    r10330 r10338  
    2020#include "iostream.h"
    2121#include "sound_engine.h"
    22 
     22#include <string>
    2323
    2424ObjectListDefinition(cameraman);
     
    8080
    8181
    82 void cameraman::changeTarget(int camNo, PNode* target)
     82void cameraman::changeTarget(int camNo, std::string className, std::string objectName)
    8383{
    84   cameras[camNo]->lookAt(target);
     84  BaseObject* object = ObjectListBase::getBaseObject(className, objectName);
     85  if( object != NULL && object->isA(PNode::staticClassID()))
     86    cameras[camNo]->lookAt(dynamic_cast<PNode*>(object));
    8587}
    8688
    8789
    88 void cameraman::changeCurrTarget(PNode* target)
     90void cameraman::changeCurrTarget(std::string className, std::string objectName)
    8991{
    90   currentCam->lookAt(target);
     92  BaseObject* object = ObjectListBase::getBaseObject(className, objectName);
     93  if( object != NULL && object->isA(PNode::staticClassID()))
     94    currentCam->lookAt(dynamic_cast<PNode*>(object));
    9195}
    9296
     
    121125
    122126
    123 
    124 
    125 
    126127void cameraman::togglFade()
    127128{
  • branches/camera/src/world_entities/cameraman.h

    r10330 r10338  
    2424    void moveCam(int x, int y, int z,  int camNo);
    2525    void moveCurrCam(int x, int y, int z);
    26     void changeTarget(int camNo, PNode* target);
    27     void changeCurrTarget(PNode* target);
     26    void changeTarget(int camNo, std::string className, std::string objectName);
     27    void changeCurrTarget(std::string className, std::string objectName);
    2828    void atachCurrTarget(PNode* target);
    2929    void jumpCam(int x, int y, int z, int camNo);
  • branches/camera/src/world_entities/test_entity.cc

    r10330 r10338  
    8787{
    8888  CM= State::getCameraman();
    89 
    90   CM->moveCurrCam(0, -300, 0);
    91 
     89  CM->createCam();
     90  CM->setCam(1);
     91  CM->moveCurrCam(0, 0, 100);
    9292}
    9393
     
    9595{
    9696  CM= State::getCameraman();
    97 
    98   CM->setCam(1);
     97  CM->moveCurrCam(-300, 0, 0);
    9998}
    10099
Note: See TracChangeset for help on using the changeset viewer.