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

SoTexture3.h
00001 #ifndef COIN_SOTEXTURE3_H
00002 #define COIN_SOTEXTURE3_H
00003 
00004 /**************************************************************************\
00005  *
00006  *  This file is part of the Coin 3D visualization library.
00007  *  Copyright (C) by Kongsberg Oil & Gas Technologies.
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 Coin with software that can not be combined with the GNU
00016  *  GPL, and for taking advantage of the additional benefits of our
00017  *  support services, please contact Kongsberg Oil & Gas Technologies
00018  *  about acquiring a Coin Professional Edition License.
00019  *
00020  *  See http://www.coin3d.org/ for more information.
00021  *
00022  *  Kongsberg Oil & Gas Technologies, Bygdoy Alle 5, 0257 Oslo, NORWAY.
00023  *  http://www.sim.no/  sales@sim.no  coin-support@coin3d.org
00024  *
00025 \**************************************************************************/
00026 
00027 #include <Inventor/nodes/SoSubNode.h>
00028 #include <Inventor/nodes/SoTexture.h>
00029 #include <Inventor/fields/SoSFEnum.h>
00030 #include <Inventor/fields/SoSFImage3.h>
00031 #include <Inventor/fields/SoMFString.h>
00032 #include <Inventor/fields/SoSFColor.h>
00033 #include <Inventor/fields/SoSFBool.h>
00034 #include <Inventor/elements/SoTextureImageElement.h>
00035 
00036 class SoFieldSensor;
00037 class SoSensor;
00038 
00039 class COIN_DLL_API SoTexture3 : public SoTexture {
00040   typedef SoTexture inherited;
00041 
00042   SO_NODE_HEADER(SoTexture3);
00043 
00044 public:
00045   static void initClass(void);
00046   SoTexture3(void);
00047 
00048   enum Model {
00049     MODULATE = SoTextureImageElement::MODULATE,
00050     DECAL = SoTextureImageElement::DECAL,
00051     BLEND = SoTextureImageElement::BLEND
00052   };
00053 
00054   enum Wrap {
00055     REPEAT = SoTextureImageElement::REPEAT,
00056     CLAMP = SoTextureImageElement::CLAMP
00057   };
00058 
00059   SoMFString filenames;
00060   SoSFImage3 images;
00061   SoSFEnum wrapR;
00062   SoSFEnum wrapS;
00063   SoSFEnum wrapT;
00064   SoSFEnum model;
00065   SoSFColor blendColor;
00066   SoSFBool enableCompressedTexture;
00067 
00068   virtual void doAction(SoAction *action);
00069   virtual void GLRender(SoGLRenderAction *action);
00070   virtual void callback(SoCallbackAction *action);
00071 
00072 protected:
00073   virtual ~SoTexture3();
00074 
00075   virtual SbBool readInstance(SoInput *in, unsigned short flags);
00076   virtual void notify(SoNotList *list);
00077   int getReadStatus(void);
00078   void setReadStatus(int s);
00079 
00080 private:
00081   SbBool loadFilenames(SoInput * in = NULL);
00082   int readstatus;
00083   class SoGLImage *glimage;
00084   SbBool glimagevalid;
00085 
00086   class SoFieldSensor *filenamesensor;
00087   static void filenameSensorCB(void *, SoSensor *);
00088 };
00089 
00090 #endif // !COIN_SOTEXTURE3_H

Copyright © 1998-2010 by Kongsberg Oil & Gas Technologies. All rights reserved.

Generated on Fri Dec 11 2015 03:24:56 for Coin by Doxygen 1.7.6.1.