Changeset 8859 in orxonox.OLD for branches/mountain_lake/src/world_entities/environments/mapped_water.h
- Timestamp:
- Jun 28, 2006, 3:07:55 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/mountain_lake/src/world_entities/environments/mapped_water.h
r8848 r8859 45 45 // functions to set parameters for the water, usually they're called through loadparam 46 46 void setLightPos(float x, float y, float z) { this->lightPos = Vector(x,y,z); } 47 void setWaterPos(float x, float y, float z) { this->water Pos = Vector(x,y,z); }47 void setWaterPos(float x, float y, float z) { this->waterHeight = y; this->waterVerts[0] = x; this->waterVerts[1] = z; } 48 48 void setWaterSize(float x, float z) { this->xWidth = x; this->zWidth = z; } 49 49 void setWaterAngle(float angle) { this->waterAngle = angle; } … … 59 59 void resetShininess(float shine); 60 60 void resetLightPos(float x, float y, float z); 61 void resetWaterPos(float x, float y, float z) { this->setWaterPos(x, y, z); this->calcVerts(); } 62 void resetWaterSize(float x, float z) { this->setWaterSize(x, z); this->calcVerts(); } 63 void resetWaterAngle(float angle) { this->setWaterAngle(angle); this->calcVerts(); } 61 64 62 65 // fade functions … … 69 72 void initTextures(); 70 73 void initShaders(); 74 void calcVerts(); 71 75 72 76 private: 73 Vector waterPos; //!< position of the water 77 float waterHeight; //!< position of the water 78 float waterVerts[8]; //!< coords of the 4 vertexes of the water quad 74 79 float xWidth, zWidth; //!< size of the water quad 75 float waterVerts[8]; //!< coords of the 4 vertexes of the water quad76 80 Vector lightPos; //!< position of the light that is used to render the reflection 77 81 float waterAngle; //!< defines how much the water will be turned around the point waterPos 78 82 Vector waterColor; //!< color of the water 79 80 Vector newWaterColor; //!< used to fade the water color81 float colorFadeTime;82 83 83 84 float move; … … 96 97 Shader::Uniform* color_uni; //!< uniform that is used for the watercolor 97 98 Shader::Uniform* shine_uni; //!< uniform that is used for the specular shininessd of the water 98 99 99 100 101 102 Vector newWaterColor; //!< used to fade the water color 103 float colorFadeTime; 100 104 int tempcounter; 101 105 };
Note: See TracChangeset
for help on using the changeset viewer.