nSkyNode Class Reference
[Scene System]
#include <nskynode.h>
Inheritance diagram for nSkyNode:

Detailed Description
The SkyNode represents a skybox with sun, clouds and other celestial elements, each represented by a shapenode. The parameters can be set for different points of time (states), to potentiate a course of a day by interpolation.(C) 2005 RadonLabs GmbH
Definition at line 24 of file nskynode.h.
Public Types | |
| enum | ElementType { SkyElement = 0, SunElement, LightElement, CloudElement, StarElement, GenericElement, NumElementTypes, InvalidElement } |
Public Member Functions | |
| nSkyNode () | |
| constructor | |
| virtual | ~nSkyNode () |
| destructor | |
| virtual bool | SaveCmds (nPersistServer *ps) |
| object persistency | |
| void | Attach (nSceneServer *sceneServer, nRenderContext *renderContext) |
| Attach to sceneserver. | |
| void | UpdateSky (float worldTime) |
| Update. | |
| int | AddState (const nString &destName, const nString &stateName, float time) |
| Attaches a state to a sky element and defines a point of time. | |
| void | RemoveState (const nString &destName, const nString &stateName) |
| Detaches a state from a sky element. | |
| void | NewElement (nSkyNode::ElementType type, const nString &name) |
| Creates a new sky element. | |
| void | AddElement (nSkyNode::ElementType type, const nString &name) |
| Adds an existing Object as an element. | |
| void | DeleteElement (const nString &name) |
| Deletes an element. | |
| void | LinkTo (const nString &fromName, const nString &toName) |
| attaches one element to an other | |
| void | SetChannel (const char *name) |
| set the variable handle which drives this animator object (e.g. time) | |
| const char * | GetChannel () |
| get the variable which drives this animator object | |
| void | SetTimeFactor (float factor) |
| sets time multiplier | |
| float | GetTimeFactor () |
| gets time multiplier | |
| void | SetStartTime (float time) |
| sets start time | |
| float | GetStartTime () |
| gets start time | |
| void | SetRefreshTime (const nString &name, float time) |
| set refresh time | |
| float | GetRefreshTime (const nString &name) |
| get refresh time | |
| void | SetTimePeriod (float periode) |
| set time periode | |
| float | GetTimePeriod () |
| get time periode | |
| float | GetSkyTime () |
| get actual sky time | |
| int | SetStateTime (const nString &elementName, const nString &stateName, float time) |
| Changes a statetime. | |
| int | SetStateTime (int elementNr, int stateNr, float time) |
| Changes a statetime. | |
| float | GetStateTime (const nString &destName, const nString &stateName) |
| Changes a statetime. | |
| float | GetStateTime (int elementNr, int stateNr) |
| Changes a statetime. | |
| int | GetNumElements () |
| Get number of elements. | |
| int | GetNumStates (int elementNr) |
| Get number of states of an element. | |
| nAbstractShaderNode * | GetElement (const nString &name) |
| Get element (by name). | |
| nAbstractShaderNode * | GetElement (int elementNr) |
| Get element (by number). | |
| nSkyState * | GetState (const nString &elementName, const nString &stateName) |
| Get state (by name). | |
| nSkyState * | GetState (int elementNr, int stateNr) |
| Get state (by number). | |
| nSkyNode::ElementType | GetElementType (const nString &name) |
| Get element type (by name). | |
| nSkyNode::ElementType | GetElementType (int elementNr) |
| Get element type (by number). | |
| const char * | TypeToString (nSkyNode::ElementType type) const |
| converts enum type to string | |
| nSkyNode::ElementType | StringToType (const char *str) const |
| converts a string to enum type | |
Static Public Attributes | |
| static const float | CloudSpeedFactor = 0.0005f |
Protected Member Functions | |
| void | CollectParams (nShaderParams params, ParamList ¶mList) |
| Adds all params from nShaderparams to param list. | |
| int | FindElement (const nString &name) |
| Returns the index of the searched element. | |
| int | FindState (int elementNr, const nString &stateName) |
| Returns the index of the searched state. | |
| vector3 | GetSphericalCoordinates (vector3 angles) |
| Positions an Element by spherical coordinates. | |
| void | SetFaceToViewer (int element) |
| Rotates element to face the viewer. | |
| void | FindStates (int element, float time, int &state0, int &state1) |
| Find relevant states at a specific time for an specific element. | |
| void | SortOutParams (int element, ParamList ¶mList) |
| Sort out params, not to apply generic. | |
| float | ComputeWeight (int element, float time, int state0, int state1) |
| compute state weight | |
| vector3 | GetCameraPos () |
| Get actual camera position. | |
Protected Attributes | |
| nArray< ElementGroup > | elements |
| float | timePeriod |
| float | timeFactor |
| float | sunSpeedFactor |
| float | startTime |
| float | skyTime |
| float | worldTime |
| float | jumpTime |
| nVariable::Handle | channelVarHandle |
Classes | |
| struct | ElementGroup |
| struct | ParamList |
| struct | StateGroup |
Member Enumeration Documentation
|
|
Definition at line 28 of file nskynode.h. |
Constructor & Destructor Documentation
|
|
constructor
Definition at line 19 of file nskynode_main.cc. |
|
|
destructor
Definition at line 36 of file nskynode_main.cc. |
Member Function Documentation
|
|
object persistency
Reimplemented from nTransformNode. |
|
||||||||||||
|
Attach to sceneserver. Attach to the scene server. Reimplemented from nTransformNode. Definition at line 46 of file nskynode_main.cc. |
|
|
Update. Updates all elements of the nskynode Definition at line 520 of file nskynode_main.cc. |
|
||||||||||||||||
|
Attaches a state to a sky element and defines a point of time. Attaches a state to a sky element and defines a point of time, when it should be applied Definition at line 276 of file nskynode_main.cc. |
|
||||||||||||
|
Detaches a state from a sky element. Removes a state from an element Definition at line 319 of file nskynode_main.cc. |
|
||||||||||||
|
Creates a new sky element. Creates a new sky element and initializes it. Definition at line 350 of file nskynode_main.cc. |
|
||||||||||||
|
Adds an existing Object as an element. Adds an existing Object as an element Definition at line 66 of file nskynode_main.cc. |
|
|
Deletes an element. Deletes an existing sky element Definition at line 384 of file nskynode_main.cc. |
|
||||||||||||
|
attaches one element to an other links one element to another Definition at line 406 of file nskynode_main.cc. |
|
|
set the variable handle which drives this animator object (e.g. time) Sets the "animation channel" which drives the sky animation. This could be something like "time", but the actual names are totally up to the application. The actual channel value will be pulled from the render context. Definition at line 1014 of file nskynode_main.cc. |
|
|
get the variable which drives this animator object Return the animation channel which drives the sky animation. Definition at line 1025 of file nskynode_main.cc. |
|
|
sets time multiplier Sets the multiplier for the time Definition at line 175 of file nskynode.h. |
|
|
gets time multiplier Gets the multiplier for the time Definition at line 186 of file nskynode.h. |
|
|
sets start time Sets the start point of time Definition at line 197 of file nskynode.h. |
|
|
gets start time Gets the start point of time Definition at line 209 of file nskynode.h. |
|
||||||||||||
|
set refresh time Sets the refresh time for an element Definition at line 826 of file nskynode_main.cc. |
|
|
get refresh time Gets the refresh time of an element Definition at line 836 of file nskynode_main.cc. |
|
|
set time periode Sets the time period for a day Definition at line 220 of file nskynode.h. |
|
|
get time periode Gets the time period for a day Definition at line 231 of file nskynode.h. |
|
|
get actual sky time Gets the actual time from this skynode Definition at line 242 of file nskynode.h. |
|
||||||||||||||||
|
Changes a statetime.
Definition at line 846 of file nskynode_main.cc. |
|
||||||||||||||||
|
Changes a statetime.
Definition at line 858 of file nskynode_main.cc. |
|
||||||||||||
|
Changes a statetime.
Definition at line 882 of file nskynode_main.cc. |
|
||||||||||||
|
Changes a statetime.
Definition at line 894 of file nskynode_main.cc. |
|
|
Get number of elements. Gets number of elements Definition at line 904 of file nskynode_main.cc. |
|
|
Get number of states of an element. Gets number of states of an element Definition at line 914 of file nskynode_main.cc. |
|
|
Get element (by name). Gets a pointer to an element (by name) Definition at line 924 of file nskynode_main.cc. |
|
|
Get element (by number). Gets a pointer to an element (by number) Definition at line 934 of file nskynode_main.cc. |
|
||||||||||||
|
Get state (by name). Gets a pointer to an state of an element (by name) Definition at line 944 of file nskynode_main.cc. |
|
||||||||||||
|
Get state (by number). Gets a pointer to an state of an element (by number) Definition at line 954 of file nskynode_main.cc. |
|
|
Get element type (by name). Get element type (by name) Definition at line 964 of file nskynode_main.cc. |
|
|
Get element type (by number). Get element type (by number) Definition at line 974 of file nskynode_main.cc. |
|
|
converts enum type to string translates element types to string Definition at line 253 of file nskynode.h. |
|
|
converts a string to enum type translates string to element type Definition at line 274 of file nskynode.h. |
|
||||||||||||
|
Adds all params from nShaderparams to param list. Adds all params from the nShaderParams to the paramList Definition at line 984 of file nskynode_main.cc. |
|
|
Returns the index of the searched element. returns the index of an element Definition at line 416 of file nskynode_main.cc. |
|
||||||||||||
|
Returns the index of the searched state. returns the index of an state Definition at line 430 of file nskynode_main.cc. |
|
|
Positions an Element by spherical coordinates. Returns cartesian coordinates from spherical coordinates Definition at line 809 of file nskynode_main.cc. |
|
|
Rotates element to face the viewer. Updates the angle of the element, to ensure being faced to viewer Definition at line 794 of file nskynode_main.cc. |
|
||||||||||||||||||||
|
Find relevant states at a specific time for an specific element.
Definition at line 444 of file nskynode_main.cc. |
|
||||||||||||
|
Sort out params, not to apply generic.
Definition at line 473 of file nskynode_main.cc. |
|
||||||||||||||||||||
|
compute state weight
Definition at line 503 of file nskynode_main.cc. |
|
|
Get actual camera position. Return actual Camera Position Definition at line 1039 of file nskynode_main.cc. |
Member Data Documentation
|
|
Definition at line 14 of file nskynode_main.cc. |
|
|
Definition at line 158 of file nskynode.h. |
|
|
Definition at line 159 of file nskynode.h. |
|
|
Definition at line 160 of file nskynode.h. |
|
|
Definition at line 161 of file nskynode.h. |
|
|
Definition at line 162 of file nskynode.h. |
|
|
Definition at line 163 of file nskynode.h. |
|
|
Definition at line 164 of file nskynode.h. |
|
|
Definition at line 165 of file nskynode.h. |
|
|
Definition at line 166 of file nskynode.h. |
The documentation for this class was generated from the following files: