00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _SO_LDM_VVIZ_GEOMETRY_
00025 #define _SO_LDM_VVIZ_GEOMETRY_
00026
00027 #include <LDM/SoLDMLargeDataManagement.h>
00028 #include <LDM/SoLDMTileVisitor.h>
00029 #include <Inventor/SbPList.h>
00030 #include <Inventor/SbElapsedTime.h>
00031
00032 class SoAction;
00033 class SoNode;
00034 class SoROI;
00035
00036 #ifdef _MSC_VER
00037 #pragma warning( push )
00038 #pragma warning(disable:4251)
00039 #endif
00040
00069 SoEXTENDER_Documented class SoDEPRECATED SoLDMGeometry : public SoLDMLargeDataManagement
00070 {
00071 public:
00075 SoLDMGeometry();
00076
00080 virtual ~SoLDMGeometry();
00081
00085 void beginCollectingGeometry(SoState* state = NULL);
00086
00091 void addGeometry( SoAction *action, SoNode* node );
00092
00096 void endCollectingGeometry(SoState* state = NULL);
00097
00101 bool isTileInROI(SoROI*, const SbBox3i32& ,SoLDMTileVisitor::NodeStatus&, SbBool);
00102
00107 int getGeometry(SbPList& geomList);
00108
00113 void assignTilePriority();
00114
00115 private:
00116 void setUpdateGeometry();
00117 bool needsUpdate();
00118 bool toUpdate(SoNode*);
00119 void updated(SoNode*);
00120
00122 bool has2DShapes();
00123
00125 bool has3DShapes();
00126
00127 bool isCollecting(){return m_isCollecting;};
00128
00129
00130 static int getPointToPlaneDistance(const SbVec3i32& point, const SbPlane& plane);
00131
00132
00133 static int getPointToBoxSkinDistance(const SbVec3i32& point, const SbBox3i32& box);
00134
00135 bool m_ROIChanged;
00136
00137
00138 private:
00139 struct GeometryInfos
00140 {
00141 GeometryInfos() : m_firstMove(1),
00142 m_userIsInteracting(FALSE),
00143 m_changeNotification(FALSE),
00144 m_numGeoms(0), m_currentGeomIndex(0) {}
00145 int m_firstMove;
00146 SbBool m_userIsInteracting;
00147 SbBool m_changeNotification;
00148
00149 SbPList m_geometryList;
00150 int m_numGeoms;
00151 int m_currentGeomIndex;
00152 };
00153 typedef std::map<int, GeometryInfos> CtxGeometryMap;
00154
00155 CtxGeometryMap m_geometryInfos;
00156
00157 static void setUpdateGeometry(CtxGeometryMap::value_type& p);
00158 static bool needsUpdate(CtxGeometryMap::value_type& p);
00159 static void deleteLDMGeomElement(CtxGeometryMap::value_type& p);
00160
00162 void removeUnusuedContext();
00163
00164 void handleInteraction(SoState* state);
00165 bool m_rightEye;
00166
00167 bool m_isCollecting;
00168
00169 SbBool m_viewCulling;
00170 int m_sliceTexLoadRate;
00171 int m_texLoadRate;
00172 LDM_TILE_ID_TYPE m_maxTileID;
00173
00174 friend class SoLDMGeometryToUpdate;
00175 friend class SoLDMGeometryUpdated;
00176 };
00177
00178
00179 #ifdef _MSC_VER
00180 #pragma warning( pop )
00181 #endif
00182
00183 #endif // _SO_LDM_VVIZ_GEOMETRY_
00184
00185
00186