Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 167 vs 168 for /trunk/Source Code/Environment/Water/Headers/Water.h

Diff revisions: vs.
  @@ -53,13 +53,14 @@
53 53 void releaseDepthMaterial(){}
54 54 bool getDrawState(const RenderStage& currentStage) const;
55 55
56 - bool isInView(const bool distanceCheck,const BoundingBox& boundingBox,const BoundingSphere& sphere) {return true;}
56 + bool isInView(const BoundingBox& boundingBox,const BoundingSphere& sphere, const bool distanceCheck = true) {return true;}
57 57
58 - void setParams(F32 shininess, F32 noiseTile, F32 noiseFactor, F32 transparency);
58 + void setParams(F32 shininess, const vec2<F32>& noiseTile, const vec2<F32>& noiseFactor, F32 transparency);
59 59 inline Quad3D* getQuad() {return _plane;}
60 60
61 61 /// Reflector overwrite
62 62 void updateReflection();
63 + void updatePlaneEquation();
63 64 /// Used for many things, such as culling switches, and underwater effects
64 65 inline bool isPointUnderWater(const vec3<F32>& pos) { return (pos.y < _waterLevel); }
65 66
  @@ -75,13 +76,22 @@
75 76 bool computeBoundingBox(SceneGraphNode* const sgn);
76 77
77 78 private:
79 + /// number of lights in the scene
78 80 U8 _lightCount;
81 + /// the hw clip-plane index for the water
82 + I32 _clippingPlaneID;
79 83 /// cached far plane value
80 84 F32 _farPlane;
81 85 /// cached water level
82 86 F32 _waterLevel;
87 + /// cached water depth
88 + F32 _waterDepth;
83 89 /// Last known camera position
84 90 vec3<F32> _eyePos;
91 + /// Camera's position delta from the previous frame only on the XY plane
92 + vec2<F32> _eyeDiff;
93 + /// The plane's transformed normal
94 + vec3<F32> _absNormal;
85 95 /// the water's "geometry"
86 96 Quad3D* _plane;
87 97 Texture2D* _texture;