SmallChange
1.0.0
A collection of extensions to Coin3D
Loading...
Searching...
No Matches
SmColorGradient.h
1
#ifndef SMALLCHANGE_COLORGRADIENT_H
2
#define SMALLCHANGE_COLORGRADIENT_H
3
4
/**************************************************************************\
5
*
6
* This file is part of the SmallChange extension library for Coin.
7
* Copyright (C) 1998-2003 by Systems in Motion. All rights reserved.
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 SmallChange with software that can not be combined with the
16
* GNU GPL, and for taking advantage of the additional benefits of our
17
* support services, please contact Systems in Motion about acquiring
18
* a Coin Professional Edition License.
19
*
20
* See <URL:http://www.coin3d.org> for more information.
21
*
22
* Systems in Motion, Teknobyen, Abels Gate 5, 7030 Trondheim, NORWAY.
23
* <URL:http://www.sim.no>.
24
*
25
\**************************************************************************/
26
27
#include <Inventor/fields/SoSFEnum.h>
28
#include <Inventor/fields/SoSFBool.h>
29
#include <Inventor/fields/SoMFFloat.h>
30
#include <Inventor/fields/SoMFColor.h>
31
#include <Inventor/nodes/SoSubNode.h>
32
#include <Inventor/fields/SoSFString.h>
33
#include <SmallChange/basic.h>
34
#include <SmallChange/elements/SmColorGradientElement.h>
35
36
// Avoid problem with Microsoft Visual C++ Win32 API headers (they
37
// #define RELATIVE/ABSOLUTE in their header files (WINGDI.H)
38
#ifdef RELATIVE
39
#undef RELATIVE
40
#endif
// RELATIVE
41
42
#ifdef ABSOLUTE
43
#undef ABSOLUTE
44
#endif
// ABSOLUTE
45
46
47
class
SoFieldSensor
;
48
class
SoSensor
;
49
50
class
SMALLCHANGE_DLL_API
SmColorGradient
:
public
SoNode
{
51
typedef
SoNode
inherited
;
52
53
SO_NODE_HEADER(
SmColorGradient
);
54
55
public
:
56
static
void
initClass(
void
);
57
SmColorGradient
(
void
);
58
59
enum
Mapping {
60
RELATIVE = SmColorGradientElement::RELATIVE,
61
ABSOLUTE = SmColorGradientElement::ABSOLUTE
62
};
63
64
SoSFBool on;
65
SoSFEnum mapping;
66
SoMFColor color;
67
SoMFFloat parameter;
68
69
SoSFString filename;
70
71
virtual
void
doAction(
SoAction
*
action
);
72
virtual
void
GLRender(
SoGLRenderAction
*
action
);
73
virtual
void
callback(
SoCallbackAction
*
action
);
74
75
protected
:
76
virtual
~SmColorGradient
();
77
virtual
SbBool readInstance(
SoInput
*
in
,
unsigned
short
flags
);
78
virtual
void
notify(
SoNotList
*
l
);
79
80
private
:
81
SbBool loadFilename(
void
);
82
SoFieldSensor
* filenamesensor;
83
static
void
filenameSensorCB(
void
* data,
SoSensor
*);
84
85
};
86
87
#endif
// !SMALLCHANGE_COLORGRADIENT_H
SbList
Definition
misc/SbList.h:69
SmColorGradient
The SmColorGradient class is a node for specifying color gradients for Scenery nodes.
Definition
SmColorGradient.h:50
SoAction
SoNode
lib
SmallChange
nodes
SmColorGradient.h
Generated on Tue Sep 10 2024 20:35:47 for SmallChange by
1.10.0