29 #ifndef __X3DBACKGROUNDNODE_H__
30 #define __X3DBACKGROUNDNODE_H__
133 Inst< SFNode > _metadata = 0,
134 Inst< SFTime > _bindTime = 0,
135 Inst< SFBool > _isBound = 0,
136 Inst< DisplayList > _displayList = 0,
137 Inst< MFFloat > _groundAngle = 0,
138 Inst< MFColor > _groundColor = 0,
139 Inst< MFFloat > _skyAngle = 0,
140 Inst< MFColor > _skyColor = 0,
141 Inst< SFFloat > _transparency = 0);
160 virtual void renderBackground();
165 if( skyColor->size() == 1 ) {
166 RGB c = skyColor->getValueByIndex( 0 );
167 H3DFloat a = 1.0f - transparency->getValue();
168 return RGBA( c.r*a, c.g*a, c.b*a, a );
170 return RGBA( 0, 0, 0, 0 );
177 virtual void render();
Header file for H3DDisplayListObject.
Contains the MFColor field class.
Contains the MFFloat field class.
Contains the SFFloat field class.
Contains the SFMatrix4d field class.
Contains the SFMatrix4f field class.
Header file for X3DBindableNode, X3D scene-graph node.
We use the Field's lazy evaluation mechanisms to manage the GL display lists for rendering,...
Definition: H3DDisplayListObject.h:60
virtual void traverseSG(TraverseInfo &ti)
traverseSG is called once per scenegraph loop on the scene in order to traverse the scenegraph.
Definition: Node.cpp:50
TraverseInfo is a structure that is passed along when traversing the scene graph.
Definition: TraverseInfo.h:57
const Matrix4f & getAccForwardMatrix()
Get the accumulated forward transformation matrix, i.e.
Definition: TraverseInfo.h:363
X3DBackgroundNode is the abstract type from which all backgrounds inherit.
Definition: X3DBackgroundNode.h:126
H3DUniquePtr< SFFloat > transparency
The transparency field simply specifies the transparency for the sky and ground.
Definition: X3DBackgroundNode.h:243
static X3DBackgroundNode * getActive()
Convenience function to get the top of the X3DBackgroundNode stack.
Definition: X3DBackgroundNode.h:144
static H3DNodeDatabase database
The H3DNodeDatabase for this node.
Definition: X3DBackgroundNode.h:246
H3DUniquePtr< MFColor > groundColor
The groundColor field specifies the colour of the ground at the various angles on the ground partial ...
Definition: X3DBackgroundNode.h:207
H3DUniquePtr< MFColor > skyColor
The skyColor field specifies the colour of the sky at various angles on the sky sphere.
Definition: X3DBackgroundNode.h:235
virtual void traverseSG(TraverseInfo &ti)
Saves the accForwardMatrix for use in the render function.
Definition: X3DBackgroundNode.h:150
virtual RGBA glClearColor()
Returns the color that OpenGL should clear the buffer with before starting to render to it.
Definition: X3DBackgroundNode.h:164
H3DUniquePtr< MFFloat > groundAngle
The groundAngle field specifies the angles from the nadir that the concentric circles of colour appea...
Definition: X3DBackgroundNode.h:190
H3DUniquePtr< SFMatrix4f > localToGlobal
A field that transforms from local to global space.
Definition: X3DBackgroundNode.h:250
H3DUniquePtr< MFFloat > skyAngle
The skyAngle field specifies the angles from the zenith in which concentric circles of colour appear.
Definition: X3DBackgroundNode.h:219
H3DUniquePtr< DisplayList > displayList
The DisplayList instance handling the OpenGL caching of this object.
Definition: X3DBackgroundNode.h:180
H3DUniquePtr< SFMatrix4d > projectionMatrix
Projection matrix for background C++ field only.
Definition: X3DBackgroundNode.h:254
X3DBindableNode is the abstract base type for all bindable children nodes, including Background,...
Definition: X3DBindableNode.h:108
static X3DBindableNode * getActive(const string &bindable_stack_name)
Returns the active bindable instance, i.e.
Definition: X3DBindableNode.h:149
H3D API namespace.
Definition: Anchor.h:38
The H3DNodeDatabase contains a mapping between a name of a Node and the constructor for the Node with...
Definition: H3DNodeDatabase.h:194