Drag[en]gine Game Engine
1.21
|
Sky definition for world resources. More...
#include <deSky.h>
Public Types | |
typedef deTObjectReference< deSky > | Ref |
Type holding strong reference. More... | |
Public Types inherited from deResource | |
typedef deTObjectReference< deResource > | Ref |
Type holding strong reference. More... | |
Public Types inherited from deObject | |
typedef deTObjectReference< deObject > | Ref |
Type holding strong reference. More... | |
Public Member Functions | |
Management | |
const decColor & | GetBgColor () const |
Background color. More... | |
void | SetBgColor (const decColor &color) |
Set background color. More... | |
Controllers | |
int | GetControllerCount () const |
Number of controllers. More... | |
void | SetControllerCount (int count) |
Set number of controllers. More... | |
deSkyController & | GetControllerAt (int index) const |
Controller at index. More... | |
int | IndexOfControllerNamed (const char *name) const |
Index of named controller or -1 if absent. More... | |
int | GetLinkCount () const |
Number of links. More... | |
void | SetLinkCount (int count) |
Set number of links. More... | |
deSkyLink & | GetLinkAt (int index) const |
Link at index. More... | |
int | GetLayerCount () const |
Number of layers. More... | |
void | SetLayerCount (int count) |
Set number of layers. More... | |
deSkyLayer & | GetLayerAt (int index) const |
Layer at index. More... | |
void | NotifyParametersChanged () |
Notify peer parameters changed. More... | |
System Peers | |
deBaseGraphicSky * | GetPeerGraphic () const |
Graphic system peer or NULL if not set. More... | |
void | SetPeerGraphic (deBaseGraphicSky *peer) |
Set graphic system peer. More... | |
Public Member Functions inherited from deResource | |
deResourceManager * | GetResourceManager () const |
Resource manager or NULL if resource is leaking. More... | |
deEngine * | GetEngine () const |
Game engine object from resource manager. More... | |
deResource * | GetLLManagerPrev () const |
Previous resource in the resource manager linked list. More... | |
void | SetLLManagerPrev (deResource *resource) |
Set next resource in the resource manager linked list. More... | |
deResource * | GetLLManagerNext () const |
Next resource in the resource manager linked list. More... | |
void | SetLLManagerNext (deResource *resource) |
Set next resource in the resource manager linked list. More... | |
void | MarkLeaking () |
Marks the resource leaking. More... | |
deResource (deResourceManager *resourceManager) | |
Create resource. More... | |
Public Member Functions inherited from deObject | |
int | GetRefCount () const |
Reference count. More... | |
void | AddReference () |
Add reference increasing reference count by 1. More... | |
void | FreeReference () |
Decrease reference count by one and delete object if count reaches 0. More... | |
deObject () | |
Create object with reference count of 1. More... | |
Constructors and Destructors | |
deSky (deSkyManager *manager) | |
Create sky resource. More... | |
virtual | ~deSky () |
Clean up sky resource. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from deResource | |
virtual | ~deResource () |
Clean up resource. More... | |
Protected Member Functions inherited from deObject | |
virtual | ~deObject () |
Clean up object. More... | |
Sky definition for world resources.
Supports differenf 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.
Sky layer properties can be dynamically modified using controllers and targets. Sky instances provide the controllers defined in the sky resource allowing the user to modify the controller at runtime.
typedef deTObjectReference<deSky> deSky::Ref |
Type holding strong reference.
deSky::deSky | ( | deSkyManager * | manager | ) |
Create sky resource.
|
protectedvirtual |
Clean up sky resource.
|
inline |
Background color.
deSkyController& deSky::GetControllerAt | ( | int | index | ) | const |
Controller at index.
deeOutOfBoundary | index is less than 0 or larger than or equal to GetControllerCount(). |
|
inline |
Number of controllers.
deSkyLayer& deSky::GetLayerAt | ( | int | index | ) | const |
Layer at index.
deeOutOfBoundary | index is less than 0 or larger than or equal to GetLayerCount(). |
|
inline |
Number of layers.
deSkyLink& deSky::GetLinkAt | ( | int | index | ) | const |
Link at index.
deeOutOfBoundary | index is less than 0 or larger than or equal to GetLinkCount(). |
|
inline |
Number of links.
|
inline |
Graphic system peer or NULL if not set.
int deSky::IndexOfControllerNamed | ( | const char * | name | ) | const |
Index of named controller or -1 if absent.
void deSky::NotifyParametersChanged | ( | ) |
Notify peer parameters changed.
Use after changing one or more parameters. If possible avoid changing parameters while sky instances use this sky.
void deSky::SetBgColor | ( | const decColor & | color | ) |
Set background color.
void deSky::SetControllerCount | ( | int | count | ) |
Set number of controllers.
Sets all controllers to default vaules.
void deSky::SetLayerCount | ( | int | count | ) |
Set number of layers.
Sets all links to default vaules.
void deSky::SetLinkCount | ( | int | count | ) |
Set number of links.
Sets all links to default vaules.
void deSky::SetPeerGraphic | ( | deBaseGraphicSky * | peer | ) |
Set graphic system peer.