Changeset 8741 in orxonox.OLD for branches/terrain/src/world_entities
- Timestamp:
- Jun 23, 2006, 11:29:40 AM (19 years ago)
- Location:
- branches/terrain/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/terrain/src/world_entities/terrain_entity.cc
r8697 r8741 144 144 mat->setAmbient( 1.0f, 1.0f, 1.0f ); 145 145 mat->setDiffuseMap( _lightFile, GL_TEXTURE_2D, 0 ); 146 mat->setDiffuseMap( std::string( " maps/gras_128.jpg" ), GL_TEXTURE_2D, 1 );146 mat->setDiffuseMap( std::string( "pictures/debug.png" ), GL_TEXTURE_2D, 1 ); 147 147 terrain->addMaterial( mat ); 148 148 } … … 382 382 } 383 383 } 384 void TerrainEntity::getAltitude( Vector& _position, Vector& _normal ) 385 { 386 Triple altitude( _position.x-getAbsCoor().x, 0.0f, _position.z-getAbsCoor().z ), 387 normal( 0.0f, 0.0f, 0.0f ); 388 if ( terrain ) 389 terrain->getAltitude( altitude, normal ); 390 391 _position.y = altitude.y+getAbsCoor().y; 392 _normal.z = normal.z; _normal.y = normal.y; _normal.z = normal.z; 393 } 384 394 385 395 float TerrainEntity::getHeight( float x, float z ) -
branches/terrain/src/world_entities/terrain_entity.h
r8697 r8741 45 45 46 46 float getHeight(float x, float y); 47 void getAltitude( Vector& _position, Vector& _normal ); 47 48 virtual void draw() const; 48 49
Note: See TracChangeset
for help on using the changeset viewer.