Changeset 8477 in orxonox.OLD for branches/water/src/world_entities/environments
- Timestamp:
- Jun 15, 2006, 4:08:15 PM (18 years ago)
- Location:
- branches/water/src/world_entities/environments
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/water/src/world_entities/environments/mapped_water.cc
r8473 r8477 151 151 WorldEntity::loadParams(root); 152 152 153 LoadParam(root, "waterPos", this, MappedWater, setWaterPos); 154 LoadParam(root, "lightPos", this, MappedWater, setLightPosition); 153 LoadParam(root, "waterpos", this, MappedWater, setWaterPos); 154 LoadParam(root, "watersize", this, MappedWater, setWaterSize); 155 LoadParam(root, "lightpos", this, MappedWater, setLightPosition); 155 156 } 156 157 … … 183 184 glMultiTexCoord2f(GL_TEXTURE3, 0, 0); // DUDV map texture 184 185 //glMultiTexCoord2f(GL_TEXTURE4, 0, 0); // Depth texture 185 glVertex3f(0.0f, waterPos.y, 0.0f);186 glVertex3f(0.0f, this->waterPos.y, 0.0f); 186 187 187 188 // The front left vertice for the water … … 193 194 glMultiTexCoord2f(GL_TEXTURE3, 0, 0); // DUDV map texture 194 195 //glMultiTexCoord2f(GL_TEXTURE4, 0, 0); // Depth texture 195 glVertex3f(0.0f, waterPos.y, 1000.0f);196 glVertex3f(0.0f, this->waterPos.y, this->zWidth); 196 197 197 198 // The front right vertice for the water … … 203 204 glMultiTexCoord2f(GL_TEXTURE3, 0, 0); // DUDV map texture 204 205 //glMultiTexCoord2f(GL_TEXTURE4, 0, 0); // Depth texture 205 glVertex3f( 1000.0f, waterPos.y, 1000.0f);206 glVertex3f(this->xWidth, this->waterPos.y, this->zWidth); 206 207 207 208 // The back right vertice for the water … … 213 214 glMultiTexCoord2f(GL_TEXTURE3, 0, 0); // DUDV map texture 214 215 //glMultiTexCoord2f(GL_TEXTURE4, 0, 0); // Depth texture 215 glVertex3f( 1000.0f,waterPos.y, 0.0f);216 glVertex3f(this->xWidth, this->waterPos.y, 0.0f); 216 217 glEnd(); 217 218 -
branches/water/src/world_entities/environments/mapped_water.h
r8473 r8477 34 34 void setLightPosition(float x, float y, float z) { this->lightPos = Vector(x,y,z); }; 35 35 void setWaterPos(float x, float y, float z) { this->waterPos = Vector(x,y,z); }; 36 void setWaterSize(float x, float z) { this->xWidth = x; this->zWidth = z; }; 36 37 37 38 private: 38 39 Vector waterPos; //!< position of the water 40 float xWidth, zWidth; //!< size of the water quad 39 41 Vector lightPos; //!< position of the light that is used to render the reflection 40 42
Note: See TracChangeset
for help on using the changeset viewer.