- // repaint the cloud colors based on current value of sun_angle,
- // sky, and fog colors. This updates the color arrays for
- // ssgVtxTable.
- // sun angle in degrees relative to verticle
- // 0 degrees = high noon
- // 90 degrees = sun rise/set
- // 180 degrees = darkest midnight
- bool repaint( sgVec3 fog_color );
-
- // reposition the cloud layer at the specified origin and
- // orientation
- // lon specifies a rotation about the Z axis
- // lat specifies a rotation about the new Y axis
- // spin specifies a rotation about the new Z axis (and orients the
- // sunrise/set effects
- bool reposition( sgVec3 p, sgVec3 up, double lon, double lat, double alt );
-
- // draw the cloud layer
- void draw();
-
+ /**
+ * repaint the cloud colors based on the specified fog_color
+ * @param fog_color the fog color
+ */
+ bool repaint( const SGVec3f& fog_color );
+
+ /**
+ * reposition the cloud layer at the specified origin and
+ * orientation.
+ * @param p position vector
+ * @param up the local up vector
+ * @param lon specifies a rotation about the Z axis
+ * @param lat specifies a rotation about the new Y axis
+ * @param spin specifies a rotation about the new Z axis
+ * (and orients the sunrise/set effects)
+ * @param dt the time elapsed since the last call
+ */
+ bool reposition( const SGVec3f& p, const SGVec3f& up,
+ double lon, double lat, double alt,
+ double dt = 0.0 );
+
+ osg::Switch* getNode() { return layer_root.get(); }
+
+ static bool enable_bump_mapping;
+
+ /** return the 3D layer cloud associated with this 2D layer */
+ SGCloudField *get_layer3D(void) { return layer3D; }
+protected:
+ void setTextureOffset(const osg::Vec2& offset);