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

SoVolumeRender.h

00001 #ifndef COIN_SOVOLUMERENDER_H
00002 #define COIN_SOVOLUMERENDER_H
00003 
00004 /**************************************************************************\
00005  *
00006  *  This file is part of the SIM Voleon visualization library.
00007  *  Copyright (C) 2003-2004 by Systems in Motion.  All rights reserved.
00008  *
00009  *  This library is free software; you can redistribute it and/or
00010  *  modify it under the terms of the GNU General Public License
00011  *  ("GPL") version 2 as published by the Free Software Foundation.
00012  *  See the file LICENSE.GPL at the root directory of this source
00013  *  distribution for additional information about the GNU GPL.
00014  *
00015  *  For using SIM Voleon with software that can not be combined with
00016  *  the GNU GPL, and for taking advantage of the additional benefits
00017  *  of our support services, please contact Systems in Motion about
00018  *  acquiring a SIM Voleon Professional Edition License.
00019  *
00020  *  See <URL:http://www.coin3d.org/> for more information.
00021  *
00022  *  Systems in Motion, Postboks 1283, Pirsenteret, 7462 Trondheim, NORWAY.
00023  *  <URL:http://www.sim.no/>.
00024  *
00025 \**************************************************************************/
00026 
00027 #include <Inventor/nodes/SoNode.h>
00028 #include <Inventor/nodes/SoSubNode.h>
00029 #include <Inventor/nodes/SoShape.h>
00030 #include <Inventor/fields/SoSFEnum.h>
00031 #include <Inventor/fields/SoSFBool.h>
00032 #include <Inventor/fields/SoSFVec3f.h>
00033 #include <Inventor/fields/SoSFFloat.h>
00034 #include <Inventor/fields/SoSFInt32.h>
00035 #include <VolumeViz/C/basic.h>
00036 
00037 
00038 class SIMVOLEON_DLL_API SoVolumeRender : public SoShape {
00039   typedef SoShape inherited;
00040 
00041   SO_NODE_HEADER(SoVolumeRender);
00042 
00043 public:
00044   static void initClass(void);
00045   SoVolumeRender(void);
00046 
00047   enum Interpolation { NEAREST, LINEAR };
00048   enum Composition { MAX_INTENSITY, SUM_INTENSITY, ALPHA_BLENDING };
00049   enum NumSlicesControl { ALL, MANUAL, AUTOMATIC };
00050 
00051   enum AbortCode { CONTINUE, ABORT, SKIP };
00052   typedef AbortCode SoVolumeRenderAbortCB(int totalslices, int thisslice, 
00053                                           void * userdata);
00054 
00055   void setAbortCallback(SoVolumeRenderAbortCB * func, void * userdata = NULL);
00056 
00057   SoSFEnum interpolation;
00058   SoSFEnum composition;
00059   SoSFBool lighting;
00060   SoSFVec3f lightDirection;
00061   SoSFFloat lightIntensity;
00062   SoSFEnum numSlicesControl;
00063   SoSFInt32 numSlices;
00064   SoSFBool viewAlignedSlices;
00065 
00066 protected:
00067   ~SoVolumeRender();
00068 
00069   virtual void GLRender(SoGLRenderAction * action);
00070   virtual void rayPick(SoRayPickAction * action);
00071   virtual void generatePrimitives(SoAction * action);
00072   virtual void computeBBox(SoAction * action, SbBox3f & box, SbVec3f & center);
00073 
00074 private:  
00075   friend class SoVolumeRenderP;
00076   class SoVolumeRenderP * pimpl;
00077 };
00078 
00079 #endif // !COIN_SOVOLUMERENDER_H

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

Generated on Wed Feb 21 02:26:21 2007 for SIMVoleon by Doxygen. 1.4.6