21 #ifndef CAELUM__FLAT_CLOUD_LAYER_H 22 #define CAELUM__FLAT_CLOUD_LAYER_H 25 #include "InternalUtilities.h" 26 #include "PrivatePtr.h" 46 Ogre::SceneManager *sceneMgr,
47 Ogre::SceneNode *cloudRoot);
55 Ogre::Real timePassed,
56 const Ogre::Vector3 &sunDirection,
57 const Ogre::ColourValue &sunLightColour,
58 const Ogre::ColourValue &fogColour,
59 const Ogre::ColourValue &sunSphereColour);
62 void advanceAnimation (Ogre::Real timePassed);
69 Ogre::Vector2 mCloudSpeed;
70 Ogre::Vector2 mCloudMassOffset;
71 Ogre::Vector2 mCloudDetailOffset;
75 void setCloudMassOffset(
const Ogre::Vector2 &cloudMassOffset);
76 void setCloudDetailOffset(
const Ogre::Vector2 &cloudDetailOffset);
82 void setCloudSpeed (
const Ogre::Vector2 &cloudSpeed);
90 Ogre::Vector3 mSunDirection;
91 Ogre::ColourValue mSunLightColour;
92 Ogre::ColourValue mSunSphereColour;
93 Ogre::ColourValue mFogColour;
96 void setSunDirection(
const Ogre::Vector3 &sunDirection);
97 void setSunLightColour(
const Ogre::ColourValue &sunLightColour);
98 void setSunSphereColour(
const Ogre::ColourValue &sunSphereColour);
99 void setFogColour(
const Ogre::ColourValue &fogColour);
100 const Ogre::Vector3 getSunDirection ()
const;
101 const Ogre::ColourValue getSunLightColour ()
const;
102 const Ogre::ColourValue getSunSphereColour ()
const;
103 const Ogre::ColourValue getFogColour ()
const;
107 Ogre::SceneManager *mSceneMgr;
117 void setup(Ogre::GpuProgramParametersSharedPtr fpParams, Ogre::GpuProgramParametersSharedPtr vpParams);
119 Ogre::GpuProgramParametersSharedPtr vpParams;
120 Ogre::GpuProgramParametersSharedPtr fpParams;
146 Real mMeshWidth, mMeshHeight;
147 int mMeshWidthSegments, mMeshHeightSegments;
153 void _ensureGeometry();
158 void _invalidateGeometry();
162 void setMeshParameters (
163 Real meshWidth, Real meshHeight,
164 int meshWidthSegments,
int meshHeightSegments);
167 inline void setMeshWidth (Real value) { mMeshWidth = value; _invalidateGeometry (); }
168 inline void setMeshHeight (Real value) { mMeshHeight = value; _invalidateGeometry (); }
169 inline void setMeshWidthSegments (
int value) { mMeshWidthSegments = value; _invalidateGeometry (); }
170 inline void setMeshHeightSegments (
int value) { mMeshHeightSegments = value; _invalidateGeometry (); }
171 inline Real getMeshWidth ()
const {
return mMeshWidth; }
172 inline Real getMeshHeight ()
const {
return mMeshHeight; }
173 inline int getMeshWidthSegments ()
const {
return mMeshWidthSegments; }
174 inline int getMeshHeightSegments ()
const {
return mMeshHeightSegments; }
178 std::auto_ptr<Ogre::Image> mCloudCoverLookup;
181 Ogre::String mCloudCoverLookupFileName;
184 Ogre::Real mCloudCover;
190 void setCloudCover (
const Ogre::Real cloudCover);
209 void setCloudCoverLookup (
const Ogre::String& fileName);
215 const Ogre::String getCloudCoverLookupFileName ()
const;
220 void disableCloudCoverLookup ();
223 Ogre::Real mCloudCoverVisibilityThreshold;
228 void _updateVisibilityThreshold ();
241 void setCloudCoverVisibilityThreshold (
const Ogre::Real value);
251 void setHeight(Ogre::Real height);
256 Ogre::Real getHeight()
const;
260 Ogre::Real mCloudBlendPos;
264 int mCurrentTextureIndex;
267 Ogre::Real mCloudBlendTime;
270 std::vector<String> mNoiseTextureNames;
277 void setCloudBlendTime (
const Ogre::Real value);
282 Ogre::Real getCloudBlendTime ()
const;
289 void setCloudBlendPos (
const Ogre::Real value);
292 Ogre::Real getCloudBlendPos ()
const;
295 Ogre::Real mCloudUVFactor;
302 void setCloudUVFactor (
const Ogre::Real value);
307 Ogre::Real mHeightRedFactor;
313 void setHeightRedFactor (
const Ogre::Real value);
318 Ogre::Real mNearFadeDist;
319 Ogre::Real mFarFadeDist;
320 Ogre::Vector3 mFadeDistMeasurementVector;
333 void setFadeDistances (Ogre::Real nearValue, Ogre::Real farValue);
336 void setNearFadeDist (
const Ogre::Real value);
341 void setFarFadeDist (
const Ogre::Real value);
354 void setFadeDistMeasurementVector (
const Ogre::Vector3& value);
359 void setQueryFlags (uint flags) { mEntity->setQueryFlags (flags); }
360 uint getQueryFlags ()
const {
return mEntity->getQueryFlags (); }
361 void setVisibilityFlags (uint flags) { mEntity->setVisibilityFlags (flags); }
362 uint getVisibilityFlags ()
const {
return mEntity->getVisibilityFlags (); }
366 #endif // CAELUM__FLAT_CLOUD_LAYER_H const Ogre::Vector3 getFadeDistMeasurementVector() const
Get the value set by setFadeDistMeasurementVector.
Ogre::Real getCloudUVFactor() const
Ogre::Real getFarFadeDist() const
Get fade distance (see setFadeDistances).
const Ogre::Vector2 getCloudSpeed() const
Gets cloud movement speed.
Ogre::Real getHeightRedFactor() const
Ogre::Real getCloudCover() const
Gets the current cloud cover.
A flat cloud layer; drawn as a simple plane.
void setMeshWidth(Real value)
Ogre::Real getCloudCoverVisibilityThreshold() const
Get cloud cover visiblity threshold.
Ogre::Real getNearFadeDist() const
Get near fade distance (see setFadeDistances).
An optimized reference to a gpu shared parameter.