build: update parfait spec with a parfait-agent package
[pcp.git] / src / pmview / pcpcolor.h
blob85d47dfd3cfd55195096f1e8f6081dccaec55c08
1 /*
2 * Copyright (c) 1997 Silicon Graphics, Inc. All Rights Reserved.
3 * Copyright (c) 2009 Aconex. All Rights Reserved.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * for more details.
15 #ifndef _PCPCOLOR_H_
16 #define _PCPCOLOR_H_
18 #include <Inventor/SbColor.h>
19 #include <Inventor/fields/SoSFString.h>
20 #include <Inventor/fields/SoSFColor.h>
21 #include <Inventor/fields/SoSFFloat.h>
22 #include <Inventor/nodes/SoSubNode.h>
24 #include "main.h"
25 #include "modlist.h"
27 class PCPColor : public SoNode {
28 SO_NODE_HEADER(PCPColor);
29 public:
30 // Fields:
31 SoSFString metric; // PCP metric spec
32 SoSFFloat maxValue;
33 SoSFColor color; // Color of glow
35 // Initializes this class for use in scene graphs. This
36 // should be called after database initialization and before
37 // any instance of this node is constructed.
38 static void initClass();
39 // Constructor
40 PCPColor();
41 protected:
42 QmcMetric *theMetric;
44 // These implement supported actions. The only actions that
45 // deal with materials are the callback and GL render
46 // actions. We will inherit all other action methods from
47 // SoNode.
48 virtual void GLRender(SoGLRenderAction *action);
49 virtual void callback(SoCallbackAction *action);
50 // This implements generic traversal of PCPColor node, used in
51 // both of the above methods.
52 virtual void doAction(SoAction *action);
54 private:
55 // Destructor. Private to keep people from trying to delete
56 // nodes, rather than using the reference count mechanism.
57 virtual ~PCPColor();
58 SbColor emissiveColor;
61 #endif /* _PCPCOLOR_H_ */