![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /****************************************************************************** 00002 ** Copyright (c) 2008 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 ******************************************************************************/ 00005 /****************************************************************************** 00006 ** $RCSfile: DtTdbPropAdder.h,v $ $Revision: 1.1 $ $State: Exp $ 00007 ******************************************************************************/ 00008 00012 00013 #ifndef DtTdbPropAdder_H_ 00014 #define DtTdbPropAdder_H_ 00015 00016 #include <vrvTerrain/vrvTerrain.h> 00017 #include <vrvCore/DtPropAdder.h> 00018 #include <makArchives/DtAddPropsRuleRecord.h> 00019 #include <vector> 00020 00021 class DtNetworkNode; 00022 class DtPoint; 00023 00024 namespace makVrv 00025 { 00026 class DtDe; 00027 class DtAgentManagerInterface; 00028 class DtProp; 00029 class DtTerrainLayer; 00030 00033 class DT_DLL_VRVTERRAIN DtTdbPropAdder : public DtPropAdder 00034 { 00035 public: 00036 00038 DtTdbPropAdder(DtDe& de, const std::string& fileName, 00039 DtAgentManagerInterface& agentManagerInterface); 00040 00042 virtual ~DtTdbPropAdder(); 00043 00046 void addProps(const makArchives::DtAddPropsRuleRecord& rule, 00047 DtTerrainLayer* terrainLayer); 00048 00049 protected: 00050 00052 bool matchRuleWithNode(const makArchives::DtAddPropsRuleRecord& rule, const DtNetworkNode& node); 00053 00055 bool matchPairWithNode(const std::string& field, const std::string& value, const DtNetworkNode& node); 00056 00058 bool buildProp(const makArchives::DtAddPropsRuleRecord& rule, const DtNetworkNode& node, 00059 DtTerrainLayer* terrainLayer); 00060 00063 bool validPoint(const DtPoint& point) const; 00064 00065 protected: 00066 00067 std::string myFileName; 00068 00069 }; 00070 00072 class DT_DLL_VRVTERRAIN DtTdbPropAdderCreator : public DtPropAdderCreator 00073 { 00074 public: 00075 DtTdbPropAdderCreator(DtDe& de); 00076 00077 DtPropAdder* create( const std::string& filename, DtAgentManagerInterface&); 00078 00079 protected: 00080 DtDe& myDe; 00081 }; 00082 } 00083 00084 #endif 00085