Changeset 10330 in orxonox.OLD for branches/camera/src
- Timestamp:
- Jan 24, 2007, 3:02:45 PM (18 years ago)
- Location:
- branches/camera/src/world_entities
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/camera/src/world_entities/blackscreen.cc
r10254 r10330 33 33 * 34 34 */ 35 blackscreen::blackscreen 35 blackscreen::blackscreen() 36 36 { 37 37 this->init(); … … 57 57 * 58 58 */ 59 blackscreen::~blackscreen 59 blackscreen::~blackscreen() 60 60 {} 61 61 … … 70 70 71 71 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); 74 74 this->material->setSpecular(0.0,0.0,0.0); 75 this->material->setAmbient(0, 0, 0);75 // this->material->setAmbient(0, 0, 0); 76 76 77 i= 0.5;77 i=1; 78 78 state=0; 79 79 fadeSpeed=1; … … 118 118 119 119 glColor4f(0, 0, 0, i); 120 /*this->material->select(); 120 this->material->select(); 121 this->material->setTransparency(i); 121 122 glBegin(GL_QUADS); 122 123 glVertex3f(State::getCameraNode()->getAbsCoorX()+3,State::getCameraNode()->getAbsCoorY() -100.0f, … … 128 129 glVertex3f(State::getCameraNode()->getAbsCoorX()+3, State::getCameraNode()->getAbsCoorY()+100.0f, 129 130 State::getCameraNode()->getAbsCoorZ()-100.0f); 130 */131 131 132 glBegin(GL_QUADS); 132 133 /* glBegin(GL_QUADS); 133 134 glVertex3f(0,-100.0f,-100.0f); 134 135 glVertex3f(0,-100.0f,+100.0f); 135 136 glVertex3f(0,+100.0f,+100.0f); 136 137 glVertex3f(0,+100.0f,-100.0f); 137 138 */ 138 139 139 140 … … 149 150 void blackscreen::tick (float time) 150 151 { 151 /*if (state == true)152 if (state == true) 152 153 fadeOut(); 153 154 else 154 fadeIn(); */155 fadeIn(); 155 156 } 156 157 … … 169 170 void blackscreen::toggleFade () 170 171 { 171 state=!state; 172 173 this->state= !this->state; 172 174 } 173 175 -
branches/camera/src/world_entities/blackscreen.h
r10254 r10330 21 21 22 22 public: 23 blackscreen 23 blackscreen(); 24 24 blackscreen(const TiXmlElement* root); 25 virtual ~blackscreen 25 virtual ~blackscreen(); 26 26 27 27 void init(); 28 28 virtual void loadParams(const TiXmlElement* root); 29 29 30 void toggleFade 30 void toggleFade(); 31 31 void changeFadeSpeed(float newSpeed); 32 32 virtual void tick (float time); -
branches/camera/src/world_entities/cameraman.cc
r10272 r10330 21 21 #include "sound_engine.h" 22 22 23 23 24 ObjectListDefinition(cameraman); 24 25 … … 34 35 this->cameras.push_back(currentCam); 35 36 State::setCamera(currentCam, currentCam->getTarget()); 36 // currentCam->setClipRegion(nearClip, farClip);37 this->fadeToBlack=new blackscreen(); 37 38 } 38 39 … … 123 124 124 125 126 void 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); 125 137 126 138 … … 137 149 138 150 139 140 -
branches/camera/src/world_entities/cameraman.h
r10272 r10330 6 6 #include <vector> 7 7 #include "base_object.h" 8 #include "blackscreen.h" 8 9 9 10 class cameraman : public BaseObject { … … 14 15 float nearClip; 15 16 float farClip; 16 17 blackscreen* fadeToBlack; 17 18 18 19 public: … … 31 32 void testCam(); 32 33 void setClipRegion(float nearClip, float farClip); 33 34 void togglFade(); 34 35 35 36 }; -
branches/camera/src/world_entities/test_entity.cc
r10272 r10330 86 86 void TestEntity::t2() 87 87 { 88 CM= State::getCameraman(); 89 88 90 CM->moveCurrCam(0, -300, 0); 89 91 … … 92 94 void TestEntity::t3() 93 95 { 96 CM= State::getCameraman(); 94 97 95 98 CM->setCam(1); … … 98 101 void TestEntity::t4() 99 102 { 103 CM= State::getCameraman(); 100 104 105 CM->togglFade(); 101 106 } 102 107 103 108 void TestEntity::t5() 104 109 { 110 CM= State::getCameraman(); 111 105 112 CM->setCam(0); 106 113 }
Note: See TracChangeset
for help on using the changeset viewer.