Coin Logo http://www.sim.no/
http://www.coin3d.org/

SoEnvironmentElement.h
1#ifndef COIN_SOENVIRONMENTELEMENT_H
2#define COIN_SOENVIRONMENTELEMENT_H
3
4/**************************************************************************\
5 *
6 * This file is part of the Coin 3D visualization library.
7 * Copyright (C) by Kongsberg Oil & Gas Technologies.
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * ("GPL") version 2 as published by the Free Software Foundation.
12 * See the file LICENSE.GPL at the root directory of this source
13 * distribution for additional information about the GNU GPL.
14 *
15 * For using Coin with software that can not be combined with the GNU
16 * GPL, and for taking advantage of the additional benefits of our
17 * support services, please contact Kongsberg Oil & Gas Technologies
18 * about acquiring a Coin Professional Edition License.
19 *
20 * See http://www.coin3d.org/ for more information.
21 *
22 * Kongsberg Oil & Gas Technologies, Bygdoy Alle 5, 0257 Oslo, NORWAY.
23 * http://www.sim.no/ sales@sim.no coin-support@coin3d.org
24 *
25\**************************************************************************/
26
27#include <Inventor/elements/SoReplacedElement.h>
28#include <Inventor/SbColor.h>
29
30class COIN_DLL_API SoEnvironmentElement : public SoReplacedElement {
32
33 SO_ELEMENT_HEADER(SoEnvironmentElement);
34public:
35 static void initClass(void);
36protected:
37 virtual ~SoEnvironmentElement();
38
39public:
40
41 enum FogType {
42 NONE,
43 HAZE,
44 FOG,
45 SMOKE
46 };
47
48 virtual void init(SoState * state);
49
50 static void set(SoState * const state, SoNode * const node,
51 const float ambientIntensity, const SbColor & ambientColor,
52 const SbVec3f & attenuation, const int32_t fogType,
53 const SbColor & fogColor, const float fogVisibility,
54 const float fogStart = 0.0f);
55 static void get(SoState * const state,
56 float & ambientIntensity, SbColor & ambientColor,
57 SbVec3f & attenuation, int32_t & fogType,
58 SbColor & fogColor, float & fogVisibility,
59 float & fogStart);
60
61 static float getAmbientIntensity(SoState * const state);
62 static float getFogVisibility(SoState * const state);
63 static const SbVec3f & getLightAttenuation(SoState * const state);
64 static const SbColor & getAmbientColor(SoState * const state);
65 static const SbColor & getFogColor(SoState * const state);
66 static int32_t getFogType(SoState * const state);
67
68 static void getDefault(float & ambientIntensity,
69 SbColor & ambientColor, SbVec3f & attenuation,
70 int32_t & fogType, SbColor & fogColor,
71 float & fogVisibility, float & fogNear);
72
73 virtual void print(FILE * file) const;
74
75protected:
76
77 virtual void setElt(SoState * const state,
78 const float ambientIntensity,
79 const SbColor & ambientColor,
80 const SbVec3f & attenuation,
81 const int32_t fogType,
82 const SbColor & fogColor,
83 const float fogVisibility,
84 const float fogNear);
85
89 int32_t fogType;
92 float fogStart;
93};
94
95#endif // !COIN_SOENVIRONMENTELEMENT_H
The SbColor class contains the red, green and blue components which make up a color value.
Definition SbColor.h:30
The SbVec3f class is a 3 dimensional vector with floating point coordinates.
Definition SbVec3f.h:40
The SoEnvironmentElement class is yet to be documented.
Definition SoEnvironmentElement.h:30
SbColor ambientColor
Definition SoEnvironmentElement.h:87
SbColor fogColor
Definition SoEnvironmentElement.h:90
float ambientIntensity
Definition SoEnvironmentElement.h:86
float fogVisibility
Definition SoEnvironmentElement.h:91
SbVec3f attenuation
Definition SoEnvironmentElement.h:88
float fogStart
Definition SoEnvironmentElement.h:92
int32_t fogType
Definition SoEnvironmentElement.h:89
FogType
Definition SoEnvironmentElement.h:41
The SoNode class is the base class for nodes used in scene graphs.
Definition SoNode.h:47
The SoReplacedElement class is an abstract element superclass.
Definition SoReplacedElement.h:30
virtual void init(SoState *state)
Definition SoReplacedElement.cpp:79
virtual void print(FILE *file) const
Definition SoReplacedElement.cpp:108
The SoState class manages the Coin scenegraph traversal state data.
Definition SoState.h:35

Copyright © 1998-2010 by Kongsberg Oil & Gas Technologies. All rights reserved.

Generated on Wed Jul 17 2024 for Coin by Doxygen 1.12.0.