Changeset 8622 in orxonox.OLD for branches/water/src/world_entities/environments
- Timestamp:
- Jun 20, 2006, 1:27:38 PM (19 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
r8617 r8622 32 32 this->toList(OM_ENVIRON); 33 33 34 // the NormalMapScale will be overwritten if its also set in the oxw file 34 // those standardvalues will be overwritten if they're also set in the oxw file 35 this->setWaterPos(0, 0, 0); 36 this->setWaterSize(100, 100); 37 this->setWaterUV(9); 38 this->setWaterFlow(0.08); 39 this->setLightPos(0, 10, 0); 40 this->setWaterAngle(0); 35 41 this->setNormalMapScale(0.25f); 42 36 43 37 44 if (root != NULL) … … 178 185 LoadParam(root, "waterpos", this, MappedWater, setWaterPos); 179 186 LoadParam(root, "watersize", this, MappedWater, setWaterSize); 180 LoadParam(root, "lightpos", this, MappedWater, setLightPos ition);187 LoadParam(root, "lightpos", this, MappedWater, setLightPos); 181 188 LoadParam(root, "wateruv", this, MappedWater, setWaterUV); 182 189 LoadParam(root, "waterflow", this, MappedWater, setWaterFlow); 183 190 LoadParam(root, "normalmapscale", this, MappedWater, setNormalMapScale); 191 LoadParam(root, "waterangle", this, MappedWater, setWaterAngle); 184 192 } 185 193 … … 193 201 glPushMatrix(); 194 202 glTranslatef(this->waterPos.x ,0 ,this->waterPos.z); 203 glRotatef(this->waterAngle, 0, 1, 0); 195 204 196 205 mat.select(); -
branches/water/src/world_entities/environments/mapped_water.h
r8617 r8622 3 3 * 4 4 */ 5 /* example input in .oxw file 5 /* example input in .oxw file with the standard values 6 6 <MappedWater> 7 <waterpos>-500,0,-500</waterpos> 8 <watersize>1000,1000</watersize> 9 <wateruv>10</wateruv> 10 <waterflow>0.003</waterflow> 11 <lightpos>100,150,100</lightpos> 12 </MappedWater> */ 7 <waterpos>0,0,0</waterpos> 8 <watersize>100,100</watersize> 9 <wateruv>9</wateruv><!-- size of the waves --> 10 <waterflow>0.08</waterflow> 11 <lightpos>0,10,0</lightpos> 12 <waterangle>0</waterangle> 13 <normalmapscale>0.25</normalmapscale><!-- you won't see a big differnce if you change that --> 14 </MappedWater> 15 */ 13 16 14 17 … … 41 44 42 45 // functions to set parameters for the water, usually they're called through loadparam 43 void setLightPos ition(float x, float y, float z) { this->lightPos = Vector(x,y,z); };46 void setLightPos(float x, float y, float z) { this->lightPos = Vector(x,y,z); }; 44 47 void setWaterPos(float x, float y, float z) { this->waterPos = Vector(x,y,z); }; 45 48 void setWaterSize(float x, float z) { this->xWidth = x; this->zWidth = z; }; 49 void setWaterAngle(float angle) { this->waterAngle = angle; }; 46 50 void setWaterUV(float uv) { this->waterUV = uv; }; 47 51 void setWaterFlow(float flow) { this->waterFlow = flow; }; … … 55 59 float xWidth, zWidth; //!< size of the water quad 56 60 Vector lightPos; //!< position of the light that is used to render the reflection 61 float waterAngle; //!< defines how much the water will be turned around the point waterPos 57 62 58 63 float move; //!< textures coords, speeds, positions for the shaded textures....
Note: See TracChangeset
for help on using the changeset viewer.