VR-Forces 4.0.4 Class Documentation
include/vrvOsg/DtOsgTerrainOverlayOperation.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 2008 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 /******************************************************************************
00006 ** $RCSfile: DtOsgOverlayOperation.h,v $ $Revision: 1.13 $ $State: Exp $
00007 ******************************************************************************/
00008 
00012 
00013 #ifndef DtOsgOverlayOperation_H_
00014 #define DtOsgOverlayOperation_H_
00015 
00016 #include <vrvOsg/vrvOsg.h>
00017 #include <vrvCore/DtDe.h>
00018 #include <vrvCore/DtTerrainOverlayOperation.h>
00019 
00020 #include <osg/Node>
00021 #include <osg/Texture>
00022 #include <osg/TexEnv>
00023 
00024 #include <string>
00025 #include <vector>
00026 
00027 namespace makVrv
00028 {
00032    class DT_DLL_VRVOSG DtOsgTerrainOverlayOperation : public DtTerrainOverlayOperation
00033    {
00034    public:
00035       typedef std::vector<int> TextureUnitList;
00036 
00037    public:
00038       DtOsgTerrainOverlayOperation();
00039 
00040       DtOsgTerrainOverlayOperation(const DtOsgTerrainOverlayOperation&);
00041 
00042       DtOsgTerrainOverlayOperation& operator=(
00043          const DtOsgTerrainOverlayOperation&);
00044 
00045       DtOsgTerrainOverlayOperation(OverlayType type, std::string definition);
00046 
00050       virtual DtOsgTerrainOverlayOperation::TextureUnitList apply(
00051          osg::Node* node, DtDe& de, 
00052          const DtOsgTerrainOverlayOperation::TextureUnitList free);
00053 
00056       int countUnitsNeeded( osg::Node* node, 
00057          const DtOsgTerrainOverlayOperation::TextureUnitList free );
00058 
00059       virtual void restoreDefaults(osg::Node* node, DtDe& de);
00060 
00061       void setWrapMode(osg::Texture::WrapMode);
00062       osg::Texture::WrapMode wrapMode() const;
00063 
00064       void setBlendMode(osg::TexEnv::Mode);
00065       osg::TexEnv::Mode blendMode() const;
00066 
00067    protected:
00068       void unitsUsed(osg::Node* node, std::set<int> &usedunits, 
00069          const DtOsgTerrainOverlayOperation::TextureUnitList &testunits);
00070 
00071    protected:
00072       osg::Texture::WrapMode  myWrapMode;
00073       osg::TexEnv::Mode       myBlendMode;
00074    };
00075 }
00076 #endif /* DtOsgOverlayOperation_H_ */

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)