Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10352 in orxonox.OLD


Ignore:
Timestamp:
Jan 24, 2007, 7:44:44 PM (17 years ago)
Author:
gfilip
Message:

finito

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

Legend:

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

    r10348 r10352  
    9696  glPushAttrib(GL_ENABLE_BIT);
    9797  glDisable(GL_LIGHTING);
     98  glEnable(GL_BLEND);   // Turn Blending On
     99
     100  glMatrixMode(GL_MODELVIEW);
    98101  glPushMatrix();
    99   glEnable(GL_BLEND);   // Turn Blending On
     102  /* translate */
     103  glTranslatef (this->getAbsCoor ().x,
     104                this->getAbsCoor ().y,
     105                this->getAbsCoor ().z);
     106  Vector tmpRot = this->getAbsDir().getSpacialAxis();
     107  glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
    100108
    101109this->material->setTransparency(i);
  • branches/camera/src/world_entities/camera.cc

    r10348 r10352  
    6464void Camera::lookAt(PNode* target)
    6565{
    66   this->target->setParent(target);
     66  this->target->setParentSoft(target,0.2);
    6767}
    6868
     
    313313void CameraTarget::detach()
    314314{
    315   masta->setParent(target);
    316   masta->getTargetNode()->setParent(target);
     315  masta->setParentSoft(target);
     316  masta->getTargetNode()->setParentSoft(target);
    317317}
    318318
     
    325325void CameraTarget::atach(PNode* object)
    326326{
    327   masta->setParent(object);
    328   masta->getTargetNode()->setParent(object);
     327  masta->setParentSoft(object);
     328  masta->getTargetNode()->setParentSoft(object);
    329329}
    330330
     
    348348  if (fabs(translateTo.len()  - (target->getAbsCoor()).len()) >= 11 )
    349349 {
    350 
     350   printf("translate\n");
    351351   Vector tmpVec= iterate(dt,  &translateTo,  &(masta->getAbsCoor()));
    352     glLoadIdentity();
    353     target->shiftCoor(speed*tmpVec.x, speed*tmpVec.y, speed*tmpVec.z);
    354 
     352   target->shiftCoor(speed*tmpVec.x, speed*tmpVec.y, speed*tmpVec.z);
    355353  }
    356354}
     
    370368{
    371369  Vector tmpVec=Vector(x,y,z);
     370  if( this->getParent())
     371    this->getParent()->setRelCoor(this->getParent()->getRelCoor());
    372372  translateNow(&tmpVec);
    373373}
  • branches/camera/src/world_entities/test_entity.cc

    r10348 r10352  
    8080{
    8181  CM= State::getCameraman();
    82   CM->changeCurrTarget( "BlackScreen", "fadeToBlack");
     82  CM->changeCurrTarget( "WorldEntity", "Ebene");
    8383}
    8484
     
    8888  CM->createCam();
    8989  CM->setCam(1);
    90   CM->moveCurrCam(0, 0, 100);
     90  CM->moveCurrCam(100, 0, 200);
    9191}
    9292
Note: See TracChangeset for help on using the changeset viewer.