![]() |
http://www.sim.no http://www.coin3d.org |
00001 #ifndef COIN_SOTRANSFERFUNCTION_H 00002 #define COIN_SOTRANSFERFUNCTION_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 <VolumeViz/nodes/SoVolumeRendering.h> 00028 #include <Inventor/fields/SoMFFloat.h> 00029 #include <Inventor/fields/SoSFEnum.h> 00030 #include <Inventor/fields/SoSFInt32.h> 00031 #include <Inventor/fields/SoSFUInt32.h> 00032 00033 // ************************************************************************* 00034 00035 class SIMVOLEON_DLL_API SoTransferFunction : public SoVolumeRendering { 00036 typedef SoVolumeRendering inherited; 00037 00038 SO_NODE_HEADER(SoTransferFunction); 00039 00040 public: 00041 static void initClass(void); 00042 SoTransferFunction(void); 00043 00044 enum PredefColorMap { 00045 NONE = 0, 00046 GREY, 00047 GRAY = GREY, 00048 TEMPERATURE, 00049 PHYSICS, 00050 STANDARD, 00051 GLOW, 00052 BLUE_RED, 00053 SEISMIC 00054 }; 00055 00056 enum ColorMapType { 00057 ALPHA, 00058 LUM_ALPHA, 00059 RGBA 00060 }; 00061 00062 SoSFInt32 shift; 00063 SoSFInt32 offset; 00064 SoSFEnum predefColorMap; 00065 SoSFEnum colorMapType; 00066 SoMFFloat colorMap; 00067 00068 void reMap(int low, int high); 00069 SbBool hasTransparency(void) const; 00070 00071 protected: 00072 ~SoTransferFunction(); 00073 00074 virtual void doAction(SoAction * action); 00075 virtual void GLRender(SoGLRenderAction * action); 00076 virtual void callback(SoCallbackAction * action); 00077 virtual void pick(SoPickAction * action); 00078 00079 private: 00080 // These were added to make it possible to control the narrowing of 00081 // the transfer function from the iv-file. They provide the same 00082 // functionality as the reMap() function. 00083 // 00084 // These are "unofficial", private fields, as they are not available 00085 // in TGS VolumeViz, which we want to stay compatible with. 00086 SoSFUInt32 remapLow; 00087 SoSFUInt32 remapHigh; 00088 00089 friend class SoTransferFunctionP; 00090 class SoTransferFunctionP * pimpl; 00091 }; 00092 00093 // ************************************************************************* 00094 00095 #endif // !COIN_SOTRANSFERFUNCTION_H
Copyright © 1998-2004 by Systems in Motion AS. All rights reserved.
Generated on Mon Jul 27 22:01:15 2009 for SIMVoleon by Doxygen. 1.5.7.1