SmallChange  1.0.0
A collection of extensions to Coin3D
Loading...
Searching...
No Matches
CoinEnvironment.h
1#ifndef COIN_COINENVIRONMENT_H
2#define COIN_COINENVIRONMENT_H
3/**************************************************************************\
4 * Copyright (c) Kongsberg Oil & Gas Technologies AS
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions are
9 * met:
10 *
11 * Redistributions of source code must retain the above copyright notice,
12 * this list of conditions and the following disclaimer.
13 *
14 * Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 *
18 * Neither the name of the copyright holder nor the names of its
19 * contributors may be used to endorse or promote products derived from
20 * this software without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33\**************************************************************************/
34
35#include <Inventor/nodes/SoSubNode.h>
36#include <Inventor/fields/SoSFFloat.h>
37#include <Inventor/fields/SoSFColor.h>
38#include <Inventor/fields/SoSFVec3f.h>
39#include <Inventor/fields/SoSFEnum.h>
40#include <Inventor/elements/SoEnvironmentElement.h>
41
42#include <SmallChange/basic.h>
43
44
46 typedef SoNode inherited;
47
48 SO_NODE_HEADER(CoinEnvironment);
49
50public:
51 static void initClass(void);
52 CoinEnvironment(void);
53
54 enum FogType {
55 NONE = SoEnvironmentElement::NONE,
56 HAZE = SoEnvironmentElement::HAZE,
57 FOG = SoEnvironmentElement::FOG,
58 SMOKE = SoEnvironmentElement::SMOKE
59 };
60
61 virtual void GLRender(SoGLRenderAction * action);
62 virtual void callback(SoCallbackAction * action);
63
65 SoSFColor ambientColor;
66 SoSFVec3f attenuation;
67 SoSFEnum fogType;
68 SoSFColor fogColor;
69 SoSFFloat fogVisibility;
70 SoSFFloat fogStart;
71
72protected:
73 virtual ~CoinEnvironment();
74};
75
76#endif // !COIN_COINENVIRONMENT_H
The CoinEnvironment class is a node for specifying global rendering parameters.
Definition CoinEnvironment.h:45
SoSFColor fogColor
Definition CoinEnvironment.h:68
FogType
Definition CoinEnvironment.h:54
SoSFFloat fogVisibility
Definition CoinEnvironment.h:69
SoSFColor ambientColor
Definition CoinEnvironment.h:65
SoSFFloat fogStart
Definition CoinEnvironment.h:70
SoSFVec3f attenuation
Definition CoinEnvironment.h:66
SoSFFloat ambientIntensity
Definition CoinEnvironment.h:64
SoSFEnum fogType
Definition CoinEnvironment.h:67
Definition misc/SbList.h:69