- Timestamp:
- Jan 24, 2007, 5:04:03 PM (18 years ago)
- Location:
- branches/camera/src/world_entities
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/camera/src/world_entities/blackscreen.cc
r10330 r10338 71 71 this->material = new Material(); 72 72 // 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); 76 78 77 79 i=1; … … 117 119 // 118 120 119 glColor4f(0, 0, 0, i); 121 //glColor4f(0, 0, 0, i); 122 123 this->material->setTransparency(i); 120 124 this->material->select(); 121 this->material->setTransparency(i); 125 122 126 glBegin(GL_QUADS); 123 127 glVertex3f(State::getCameraNode()->getAbsCoorX()+3,State::getCameraNode()->getAbsCoorY() -100.0f, … … 179 183 } 180 184 185 bool blackscreen::isBlack() 186 { 187 if (i==1) 188 return 1; 189 else 190 return 0; 191 } 192 193 bool 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 30 30 void toggleFade(); 31 31 void changeFadeSpeed(float newSpeed); 32 bool isBlack(); 33 bool isTrans(); 32 34 virtual void tick (float time); 33 35 -
branches/camera/src/world_entities/camera.cc
r10238 r10338 19 19 #include "glincl.h" 20 20 #include "vector.h" 21 #include "shell_command.h"22 21 #include "targets.h" 23 22 … … 296 295 ObjectListDefinition(CameraTarget); 297 296 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 306 297 307 298 CameraTarget::CameraTarget() … … 395 386 396 387 397 void CameraTarget::test() 398 { 399 atach(target); 400 } 401 402 403 void CameraTarget::test2() 404 { 405 trans(-200, 0, 0); 406 } 407 408 388 bool 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 110 110 Vector* rotate(Vector* newPos, float speed); 111 111 void jump(float x, float y, float z); 112 void test();113 112 void translateNow(Vector* vec); 114 113 PNode* createStick(); 115 114 void trans(float x, float y, float z); 116 void test2();115 bool isDone(); 117 116 }; 118 117 -
branches/camera/src/world_entities/cameraman.cc
r10330 r10338 20 20 #include "iostream.h" 21 21 #include "sound_engine.h" 22 22 #include <string> 23 23 24 24 ObjectListDefinition(cameraman); … … 80 80 81 81 82 void cameraman::changeTarget(int camNo, PNode* target)82 void cameraman::changeTarget(int camNo, std::string className, std::string objectName) 83 83 { 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)); 85 87 } 86 88 87 89 88 void cameraman::changeCurrTarget( PNode* target)90 void cameraman::changeCurrTarget(std::string className, std::string objectName) 89 91 { 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)); 91 95 } 92 96 … … 121 125 122 126 123 124 125 126 127 void cameraman::togglFade() 127 128 { -
branches/camera/src/world_entities/cameraman.h
r10330 r10338 24 24 void moveCam(int x, int y, int z, int camNo); 25 25 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); 28 28 void atachCurrTarget(PNode* target); 29 29 void jumpCam(int x, int y, int z, int camNo); -
branches/camera/src/world_entities/test_entity.cc
r10330 r10338 87 87 { 88 88 CM= State::getCameraman(); 89 90 CM-> moveCurrCam(0, -300, 0);91 89 CM->createCam(); 90 CM->setCam(1); 91 CM->moveCurrCam(0, 0, 100); 92 92 } 93 93 … … 95 95 { 96 96 CM= State::getCameraman(); 97 98 CM->setCam(1); 97 CM->moveCurrCam(-300, 0, 0); 99 98 } 100 99
Note: See TracChangeset
for help on using the changeset viewer.