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

SoGLBigImage.h
00001 #ifndef COIN_SOGLBIGIMAGE_H
00002 #define COIN_SOGLBIGIMAGE_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/SbBasic.h>
00028 #include <Inventor/SbVec2s.h>
00029 #include <Inventor/SbVec2f.h>
00030 #include <Inventor/misc/SoGLImage.h>
00031 
00032 class COIN_DLL_API SoGLBigImage : public SoGLImage {
00033   typedef SoGLImage inherited;
00034 
00035 public:
00036 
00037   SoGLBigImage();
00038   virtual void unref(SoState * state = NULL);
00039 
00040   static SoType getClassTypeId(void);
00041   virtual SoType getTypeId(void) const ;
00042 
00043   virtual void setData(const SbImage * image,
00044                        const Wrap wraps = REPEAT,
00045                        const Wrap wrapt = REPEAT,
00046                        const float quality = 0.5f,
00047                        const int border = 0,
00048                        SoState * createinstate = NULL);
00049 
00050   virtual void setData(const SbImage * image,
00051                        const Wrap wraps,
00052                        const Wrap wrapt,
00053                        const Wrap wrapr,
00054                        const float quality = 0.5f,
00055                        const int border = 0,
00056                        SoState * createinstate = NULL);
00057 
00058   int initSubImages(const SbVec2s & subimagesize) const;
00059   void handleSubImage(const int idx, SbVec2f & start, SbVec2f & end,
00060                       SbVec2f & tcmul);
00061   void applySubImage(SoState * state, const int idx, const float quality,
00062                      const SbVec2s & projsize);
00063   SbBool exceededChangeLimit(void);
00064   static int setChangeLimit(const int limit);
00065 
00066   // will return NULL to avoid that SoGLTextureImageElement will
00067   // update the texture state.
00068   virtual SoGLDisplayList * getGLDisplayList(SoState * state);
00069 
00070 
00071 protected:
00072   virtual void unrefOldDL(SoState * state, const uint32_t maxage);
00073 
00074 public:
00075   static void initClass(void);
00076 
00077 private:
00078   virtual ~SoGLBigImage();
00079 
00080   class SoGLBigImageP * pimpl;
00081   friend class SoGLBigImageP;
00082 };
00083 
00084 #endif // !COIN_SOGLBIGIMAGE_H

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

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