Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Jan 24, 2007, 3:02:45 PM (18 years ago)
Author:
gfilip
Message:

all working

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

Legend:

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

    r10254 r10330  
    3333 *
    3434 */
    35 blackscreen::blackscreen ()
     35blackscreen::blackscreen()
    3636{
    3737  this->init();
     
    5757 *
    5858 */
    59 blackscreen::~blackscreen ()
     59blackscreen::~blackscreen()
    6060{}
    6161
     
    7070
    7171  this->material = new Material();
    72   this->material->setIllum(3);
    73   this->material->setDiffuse(0,0,0);
     72 // this->material->setIllum(3);
     73 // this->material->setDiffuse(0,0,0);
    7474  this->material->setSpecular(0.0,0.0,0.0);
    75   this->material->setAmbient(0, 0, 0);
     75 // this->material->setAmbient(0, 0, 0);
    7676
    77   i=0.5;
     77  i=1;
    7878  state=0;
    7979  fadeSpeed=1;
     
    118118
    119119glColor4f(0, 0, 0, i);
    120 /*this->material->select();
     120this->material->select();
     121this->material->setTransparency(i);
    121122  glBegin(GL_QUADS);
    122123  glVertex3f(State::getCameraNode()->getAbsCoorX()+3,State::getCameraNode()->getAbsCoorY() -100.0f,
     
    128129  glVertex3f(State::getCameraNode()->getAbsCoorX()+3, State::getCameraNode()->getAbsCoorY()+100.0f,
    129130             State::getCameraNode()->getAbsCoorZ()-100.0f);
    130 */
    131131
    132  glBegin(GL_QUADS);
     132
     133/* glBegin(GL_QUADS);
    133134glVertex3f(0,-100.0f,-100.0f);
    134135glVertex3f(0,-100.0f,+100.0f);
    135136glVertex3f(0,+100.0f,+100.0f);
    136137glVertex3f(0,+100.0f,-100.0f);
    137 
     138*/
    138139
    139140
     
    149150void blackscreen::tick (float time)
    150151{
    151 /*if (state == true)
     152if (state == true)
    152153  fadeOut();
    153154else
    154   fadeIn();*/
     155  fadeIn();
    155156}
    156157
     
    169170void  blackscreen::toggleFade ()
    170171{
    171   state=!state;
     172
     173    this->state= !this->state;
    172174}
    173175
  • branches/camera/src/world_entities/blackscreen.h

    r10254 r10330  
    2121
    2222  public:
    23     blackscreen ();
     23    blackscreen();
    2424    blackscreen(const TiXmlElement* root);
    25     virtual ~blackscreen ();
     25    virtual ~blackscreen();
    2626
    2727    void init();
    2828    virtual void loadParams(const TiXmlElement* root);
    2929
    30     void toggleFade ();
     30    void toggleFade();
    3131    void changeFadeSpeed(float newSpeed);
    3232    virtual void tick (float time);
  • branches/camera/src/world_entities/cameraman.cc

    r10272 r10330  
    2121#include "sound_engine.h"
    2222
     23
    2324ObjectListDefinition(cameraman);
    2425
     
    3435  this->cameras.push_back(currentCam);
    3536  State::setCamera(currentCam, currentCam->getTarget());
    36 //   currentCam->setClipRegion(nearClip, farClip);
     37  this->fadeToBlack=new blackscreen();
    3738}
    3839
     
    123124
    124125
     126void cameraman::togglFade()
     127{
     128  if( this->fadeToBlack)
     129    fadeToBlack->toggleFade();
     130}
     131
     132
     133
     134//how to get a class fkt pointer
     135
     136//BaseObject* object = ObjectListBase::getBaseObject(className, objectName);
    125137
    126138
     
    137149
    138150
    139 
    140 
  • branches/camera/src/world_entities/cameraman.h

    r10272 r10330  
    66#include <vector>
    77#include "base_object.h"
     8#include "blackscreen.h"
    89
    910class cameraman : public BaseObject {
     
    1415    float nearClip;
    1516    float farClip;
    16 
     17    blackscreen* fadeToBlack;
    1718
    1819  public:
     
    3132    void testCam();
    3233    void setClipRegion(float nearClip, float farClip);
    33 
     34    void togglFade();
    3435
    3536};
  • branches/camera/src/world_entities/test_entity.cc

    r10272 r10330  
    8686void TestEntity::t2()
    8787{
     88  CM= State::getCameraman();
     89
    8890  CM->moveCurrCam(0, -300, 0);
    8991
     
    9294void TestEntity::t3()
    9395{
     96  CM= State::getCameraman();
    9497
    9598  CM->setCam(1);
     
    98101void TestEntity::t4()
    99102{
     103  CM= State::getCameraman();
    100104
     105CM->togglFade();
    101106}
    102107
    103108void TestEntity::t5()
    104109{
     110  CM= State::getCameraman();
     111
    105112  CM->setCam(0);
    106113}
Note: See TracChangeset for help on using the changeset viewer.