Changeset 10455 in orxonox.OLD for trunk/src/world_entities
- Timestamp:
- Jan 28, 2007, 7:01:41 PM (18 years ago)
- Location:
- trunk/src/world_entities
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/mount_point.cc
r10440 r10455 36 36 MountPoint::MountPoint (const Vector& up, const Vector& forward, const Vector& center, const std::string& name) 37 37 { 38 PRINTF( 5)("Created mount point %s\n", name.c_str());38 PRINTF(0)("Created mount point %s\n", name.c_str()); 39 39 this->registerObject(this, MountPoint::_objectList); 40 40 -
trunk/src/world_entities/scrolling_screen.cc
r10453 r10455 88 88 89 89 LoadParam(root, "setSize", this, ScrollingScreen, setSize); 90 91 LoadParam(root, "texture", this, ScrollingScreen, setTexture); 92 } 93 94 95 96 97 /** 98 * sets the texture 99 * @param texture name of tex 100 */ 101 void ScrollingScreen::setTexture(const std::string& texture) 102 { 103 this->material->setDiffuseMap( texture); 90 104 } 91 105 … … 113 127 114 128 glTexCoord2f(0., 0.); 115 glVertex3f(0., -this->xSize , -this->ySize);129 glVertex3f(0., -this->xSize*0.5, -this->ySize*0.5); 116 130 117 // glTexCoord2f();118 glVertex3f(0., -this->xSize , -this->ySize);131 glTexCoord2f(0., 1.); 132 glVertex3f(0., -this->xSize*0.5, this->ySize*0.5); 119 133 120 // glTexCoord2f();121 glVertex3f(0., -this->xSize, -this->ySize);134 glTexCoord2f(1., 1.); 135 glVertex3f(0., this->xSize*0.5, this->ySize*0.5); 122 136 123 // glTexCoord2f();124 glVertex3f(0., -this->xSize, -this->ySize);137 glTexCoord2f(1., 0.); 138 glVertex3f(0., this->xSize*0.5, -this->ySize*0.5); 125 139 126 140 glEnd(); … … 135 149 void ScrollingScreen::tick (float time) 136 150 { 151 if( State::getCameraNode() != NULL && State::getCameraTargetNode() != NULL) 152 { 153 PNode* cam = State::getCameraNode(); 154 PNode* tar = State::getCameraTargetNode(); 137 155 156 Vector dir = tar->getAbsCoor() - cam->getAbsCoor(); 157 dir.normalize(); 158 159 float offset = 4.; 160 161 this->setAbsCoor( cam->getAbsCoor() + dir * offset); 162 163 164 165 166 // if( this->getParent() != cam) 167 // { 168 // this->setParent( cam); 169 // this->setRelCoor( 4.0, 0., 0.); 170 // this->setRelDir(); 171 // } 172 173 } 138 174 } 139 175 -
trunk/src/world_entities/scrolling_screen.h
r10453 r10455 25 25 void fadeOut(float speed); 26 26 27 void setTexture(const std::string& texture); 28 27 29 void setSpeed(float speed) { this->scrollingSpeed = speed; } 28 30 void setViewHeight(float height) { this->viewHeight = height; }
Note: See TracChangeset
for help on using the changeset viewer.