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

SoVolumeRender.h
1 #ifndef COIN_SOVOLUMERENDER_H
2 #define COIN_SOVOLUMERENDER_H
3 
4 /**************************************************************************\
5  *
6  * This file is part of the SIM Voleon visualization library.
7  * Copyright (C) 2003-2004 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 SIM Voleon with software that can not be combined with
16  * the GNU GPL, and for taking advantage of the additional benefits
17  * of our support services, please contact Systems in Motion about
18  * acquiring a SIM Voleon Professional Edition License.
19  *
20  * See <URL:http://www.coin3d.org/> for more information.
21  *
22  * Systems in Motion, Postboks 1283, Pirsenteret, 7462 Trondheim, NORWAY.
23  * <URL:http://www.sim.no/>.
24  *
25 \**************************************************************************/
26 
27 #include <Inventor/nodes/SoNode.h>
28 #include <Inventor/nodes/SoSubNode.h>
29 #include <Inventor/nodes/SoShape.h>
30 #include <Inventor/fields/SoSFEnum.h>
31 #include <Inventor/fields/SoSFBool.h>
32 #include <Inventor/fields/SoSFVec3f.h>
33 #include <Inventor/fields/SoSFFloat.h>
34 #include <Inventor/fields/SoSFInt32.h>
35 #include <VolumeViz/C/basic.h>
36 
37 
38 class SIMVOLEON_DLL_API SoVolumeRender : public SoShape {
39  typedef SoShape inherited;
40 
41  SO_NODE_HEADER(SoVolumeRender);
42 
43 public:
44  static void initClass(void);
45  SoVolumeRender(void);
46 
47  enum Interpolation { NEAREST, LINEAR };
48  enum Composition { MAX_INTENSITY, SUM_INTENSITY, ALPHA_BLENDING };
49  enum NumSlicesControl { ALL, MANUAL, AUTOMATIC };
50 
51  enum AbortCode { CONTINUE, ABORT, SKIP };
52  typedef AbortCode SoVolumeRenderAbortCB(int totalslices, int thisslice,
53  void * userdata);
54 
55  void setAbortCallback(SoVolumeRenderAbortCB * func, void * userdata = NULL);
56 
57  SoSFEnum interpolation;
58  SoSFEnum composition;
59  SoSFBool lighting;
60  SoSFVec3f lightDirection;
61  SoSFFloat lightIntensity;
62  SoSFEnum numSlicesControl;
63  SoSFInt32 numSlices;
64  SoSFBool viewAlignedSlices;
65 
66 protected:
67  ~SoVolumeRender();
68 
69  virtual void GLRender(SoGLRenderAction * action);
70  virtual void rayPick(SoRayPickAction * action);
71  virtual void generatePrimitives(SoAction * action);
72  virtual void computeBBox(SoAction * action, SbBox3f & box, SbVec3f & center);
73 
74 private:
75  friend class SoVolumeRenderP;
76  class SoVolumeRenderP * pimpl;
77 };
78 
79 #endif // !COIN_SOVOLUMERENDER_H
Definition: SoVolumeRender.h:47
Interpolation
Definition: SoVolumeRender.h:47
SoSFEnum composition
Definition: SoVolumeRender.h:58
AbortCode SoVolumeRenderAbortCB(int totalslices, int thisslice, void *userdata)
Definition: SoVolumeRender.h:52
Render the full volume.
Definition: SoVolumeRender.h:38
NumSlicesControl
Definition: SoVolumeRender.h:49
SoSFEnum interpolation
Definition: SoVolumeRender.h:57
Composition
Definition: SoVolumeRender.h:48
SoSFEnum numSlicesControl
Definition: SoVolumeRender.h:62
AbortCode
Definition: SoVolumeRender.h:51
SoSFInt32 numSlices
Definition: SoVolumeRender.h:63
Definition: SoVolumeRender.h:48

Copyright © 1998-2004 by Systems in Motion AS. All rights reserved.

Generated on Fri Jul 31 2015 13:47:24 for SIMVoleon by Doxygen. 1.8.9.1