VR-Forces 4.0.4 Class Documentation
include/vrvSt/DtSpeedTreeForest.h
Go to the documentation of this file.
00001 /****************************************************************************** 
00002 ** Copyright (c) 2007 MAK Technologies, Inc. 
00003 ** All rights reserved. 
00004 ******************************************************************************/ 
00005 /****************************************************************************** 
00006 ** $RCSfile: DtSpeedTreeForest.h,v $ $Revision: 1.26 $ $State: Exp $ 
00007 ******************************************************************************/ 
00008  
00012  
00013 #ifndef DtSpeedTreeForest_H_ 
00014 #define DtSpeedTreeForest_H_ 
00015  
00016 #include <vrvSt/vrvSt.h> 
00017 #include <vrvOsg/DtOsgForest.h>
00018 #include <vrvSt/DtSpeedTreeDrawable.h> 
00019 #include <osg/ref_ptr>
00020 #include <osg/PositionAttitudeTransform>
00021 #include <osg/Geode>
00022  
00023 namespace makVrv 
00024 { 
00025 
00026    class DtAgentUpdateResolverInterface;
00027    class DtSpeedTreeModelInstance;
00028 
00031    class DT_DLL_VRVST DtSpeedTreeForest : public DtOsgForest
00032    { 
00033 
00034    public:
00035 
00037       friend class DtSpeedTreeForestClassesCreator;
00038       friend class DtSpeedTreeForestCreator;
00039       
00041       virtual ~DtSpeedTreeForest();
00042 
00046 
00047 
00049       virtual void removeTree(DtUniqueID record);
00050 
00053       virtual void setTreeClippingPlane(float fFar);
00054 
00064       virtual void setTreeLodDistances(float fNear, float fFar);
00065 
00067       virtual void setPerformanceProfile(int profile);
00068 
00069 
00071             
00072 
00076 
00077 
00079       virtual void addUniqueTree(const DtTreeRecord& record);
00080 
00082       virtual DtSpeedTreeModelInstance* findSpeedTreeModelInstance( const std::string& modelDef);
00083 
00085       bool makeContextCurrent();
00086 
00088 
00089    protected:
00090 
00092       DtSpeedTreeForest(DtDe& de, DtUniqueID id);
00093 
00095       virtual void slot_treeModelInstanceToBeDestroyed(const std::string& modelDef);
00096 
00098       virtual void slot_treeModelInstanceCreated(const std::string& modelDef);
00099 
00101       virtual DtTreeModel* castUpdaterToTreeModel( DtAgentUpdateResolverInterface* updater );
00102 
00104       virtual bool createTree(const DtTreeRecord& record);
00105 
00106    protected:
00107 
00108       osg::ref_ptr<osg::PositionAttitudeTransform> myPat;
00109       osg::ref_ptr<osg::Geode> myGeode;
00110       //osg::ref_ptr<DtIgSpeedTreeForestDrawable> myDrawable;
00111       osg::ref_ptr<DtSpeedTreeDrawable> myDrawable;
00112 
00113    }; 
00114 
00117    class DT_DLL_VRVST DtSpeedTreeForestCreator : public DtOsgForestCreator
00118    {
00119 
00120    public:
00121 
00123       virtual DtForestObject* create(DtDe& de, DtUniqueID id);
00124 
00125    };
00126 } 
00127  
00128 #endif 
00129  

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)