Changeset 6227 in orxonox.OLD for branches/height_map/src/world_entities
- Timestamp:
- Dec 21, 2005, 2:22:59 PM (19 years ago)
- Location:
- branches/height_map/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/height_map/src/world_entities/terrain.cc
r6103 r6227 30 30 31 31 using namespace std; 32 HeightMap * hm; 32 33 33 34 CREATE_FACTORY(Terrain, CL_TERRAIN); … … 41 42 this->init(); 42 43 43 this->tmp_mat = new Material(); 44 this->tmp_mat = new Material(); 45 tmp_mat->setTransparency(1.0); 46 tmp_mat->setIllum(0.3); 47 /* tmp_mat->setDiffuse(0.55,0.4,0.2); 48 tmp_mat->setAmbient(0.6,0.4,0.2); 49 tmp_mat->setSpecular(0.02,0.02,0.02);*/ 50 tmp_mat->setDiffuse(1.0,1.0,1.0); 51 tmp_mat->setAmbient(1.0,1.0,1.0 ); 52 tmp_mat->setSpecular(1.0,1.0,1.0); 53 tmp_mat->setShininess(.1); 54 tmp_mat->setTransparency(1.0); 55 56 tmp_mat->diffuseTexture = NULL; 57 tmp_mat->ambientTexture = NULL; 58 // tmp_mat->specularTexture = NULL; 59 44 60 // this->loadParams(root); 45 61 46 62 char* heightmapName = ResourceManager::getFullName("pictures/heightmapHello.bmp"); 47 HeightMap * hm = new HeightMap(heightmapName); 48 63 char* colourmapName = ResourceManager::getFullName("pictures/heightmapHelloCM.bmp"); 64 hm = new HeightMap(heightmapName, colourmapName); 65 hm->scale(Vector(23.0f,1.7f,23.0f)); 49 66 hm->load(); 50 67 this->model=hm; … … 201 218 202 219 /* translate */ 203 glTranslatef (this->getAbsCoor ().x ,204 this->getAbsCoor ().y ,205 this->getAbsCoor ().z );220 glTranslatef (this->getAbsCoor ().x - 1000, 221 this->getAbsCoor ().y - 400, 222 this->getAbsCoor ().z - 1000) ; 206 223 /* rotate */ 207 224 Vector tmpRot = this->getAbsDir().getSpacialAxis(); 208 225 glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z ); 209 210 this->tmp_mat->select(); 211 212 this->model->draw(); 213 if (this->objectList) 226 227 //this->tmp_mat->select(); 228 229 230 hm->draw(); 231 /* if (this->objectList) 214 232 glCallList(this->objectList); 215 233 else if (this->model) … … 217 235 if (this->vegetation) 218 236 this->vegetation->draw(); 237 */ 219 238 glPopMatrix(); 220 239 -
branches/height_map/src/world_entities/terrain.h
r6103 r6227 44 44 private: 45 45 Model* vegetation; 46 Model* model; 46 47 Material* tmp_mat; 47 48 int objectList;
Note: See TracChangeset
for help on using the changeset viewer.