http://www.sim.no/
http://www.coin3d.org/
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
include
Inventor
elements
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
30
class
COIN_DLL_API
SoEnvironmentElement
:
public
SoReplacedElement
{
31
typedef
SoReplacedElement
inherited
;
32
33
SO_ELEMENT_HEADER(
SoEnvironmentElement
);
34
public
:
35
static
void
initClass(
void
);
36
protected
:
37
virtual
~
SoEnvironmentElement
();
38
39
public
:
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
75
protected
:
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
86
float
ambientIntensity
;
87
SbColor
ambientColor
;
88
SbVec3f
attenuation
;
89
int32_t
fogType
;
90
SbColor
fogColor
;
91
float
fogVisibility
;
92
float
fogStart
;
93
};
94
95
#endif // !COIN_SOENVIRONMENTELEMENT_H
Copyright © 1998-2010 by
Kongsberg Oil & Gas Technologies
. All rights reserved.
Generated for Coin by
Doxygen
1.8.2.