Dynamic Sky for scenes. More...
#include <deSky.h>
Public Member Functions | |
Constructors and Destructors | |
| deSky (deSkyManager *manager) | |
| Creates a new sky object with the given resource manager. | |
| ~deSky () | |
| Cleans up the sky. | |
Management | |
| const decColor & | GetBgColor () const |
| Retrieves the background color of the sky. | |
| void | SetBgColor (const decColor &color) |
| Sets the background color of the sky. | |
Layers | |
| int | GetLayerCount () const |
| Retrieves the count of layers. | |
| deSkyLayer * | GetLayerAt (int index) const |
| Retrieves the layer at the given index. | |
| int | IndexOfLayer (deSkyLayer *layer) const |
| Retrieves the index of the given layer or -1 if not found. | |
| bool | HasLayer (deSkyLayer *layer) const |
| Determines if the layer exists. | |
| void | AddLayer (deSkyLayer *layer) |
| Adds a layer. | |
| void | RemoveLayer (deSkyLayer *layer) |
| Removes a layer. | |
| void | RemoveLayerAt (int index) |
| Removes the layer at the given index. | |
| void | RemoveAllLayers () |
| Removes all layers. | |
| void | NotifyLayerPositionChanged (int layer) |
| Notifies peers that a layer changed position. | |
| void | NotifyLayerOrientationChanged (int layer) |
| Notifies peers that a layer changed orientation. | |
| void | NotifyLayerSizeChanged (int layer) |
| Notifies peers that a layer changed size. | |
| void | NotifyLayerColorChanged (int layer) |
| Notifies peers that a layer changed color or intensity. | |
| void | NotifyLayerSkinChanged (int layer) |
| Notifies peers that a layer changed skin. | |
| void | NotifyLayerBodiesChanged (int layer) |
| Notifies peers that a layer changed bodies. | |
| void | NotifyLayerLightChanged (int layer) |
| Notifies peers that a layer changed light properties. | |
| void | NotifyLayerTransparencyChanged (int layer) |
| Notifies peers that a layer transparency changed. | |
Notifications | |
| void | Update (float time) |
| Updates the sky. | |
System Peers | |
| deBaseGraphicSky * | GetGraphicSky () const |
| Retrieves the graphic system peer object. | |
| void | SetGraphicSky (deBaseGraphicSky *sky) |
| Sets the graphic system peer object. | |
Dynamic Sky for scenes.
Provides support for dynamic skies. Supported are various kinds of skies. The most simple is using a 6 sided sky box with static or dynamic images on the sides. Another way is to use the layer system. This system considers the sky to be projected onto a unit sphere at the center you are standing. The sky is rendered behind anything else in the scene. Each layer can be assigned a rotation, and image and a set of sky bodies. All sky bodies in the layer use the same image. Layers are rendered in ascending order that they are created. To provide planetary movement simply modify the view and up vectors of the layers. Try to avoid changing the bodies once you added them to the layers as this could be slow depending on the graphic module.
| deSky::deSky | ( | deSkyManager * | manager ) |
Creates a new sky object with the given resource manager.
| deSky::~deSky | ( | ) |
Cleans up the sky.
| void deSky::AddLayer | ( | deSkyLayer * | layer ) |
Adds a layer.
| const decColor& deSky::GetBgColor | ( | ) | const [inline] |
Retrieves the background color of the sky.
| deBaseGraphicSky* deSky::GetGraphicSky | ( | ) | const [inline] |
Retrieves the graphic system peer object.
| deSkyLayer* deSky::GetLayerAt | ( | int | index ) | const |
Retrieves the layer at the given index.
| int deSky::GetLayerCount | ( | ) | const [inline] |
Retrieves the count of layers.
| bool deSky::HasLayer | ( | deSkyLayer * | layer ) | const |
Determines if the layer exists.
| int deSky::IndexOfLayer | ( | deSkyLayer * | layer ) | const |
Retrieves the index of the given layer or -1 if not found.
| void deSky::NotifyLayerBodiesChanged | ( | int | layer ) |
Notifies peers that a layer changed bodies.
| void deSky::NotifyLayerColorChanged | ( | int | layer ) |
Notifies peers that a layer changed color or intensity.
| void deSky::NotifyLayerLightChanged | ( | int | layer ) |
Notifies peers that a layer changed light properties.
| void deSky::NotifyLayerOrientationChanged | ( | int | layer ) |
Notifies peers that a layer changed orientation.
| void deSky::NotifyLayerPositionChanged | ( | int | layer ) |
Notifies peers that a layer changed position.
| void deSky::NotifyLayerSizeChanged | ( | int | layer ) |
Notifies peers that a layer changed size.
| void deSky::NotifyLayerSkinChanged | ( | int | layer ) |
Notifies peers that a layer changed skin.
| void deSky::NotifyLayerTransparencyChanged | ( | int | layer ) |
Notifies peers that a layer transparency changed.
| void deSky::RemoveAllLayers | ( | ) |
Removes all layers.
| void deSky::RemoveLayer | ( | deSkyLayer * | layer ) |
Removes a layer.
| void deSky::RemoveLayerAt | ( | int | index ) |
Removes the layer at the given index.
| void deSky::SetBgColor | ( | const decColor & | color ) |
Sets the background color of the sky.
| void deSky::SetGraphicSky | ( | deBaseGraphicSky * | sky ) |
Sets the graphic system peer object.
| void deSky::Update | ( | float | time ) |
Updates the sky.
Is used to give the system peers the chance to update internal data structured.
| time | Seconds elapsed since the last update |
1.7.2