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 SOLDMVALUATIONACTION_H
00025 #define SOLDMVALUATIONACTION_H
00026
00027 #include <Inventor/actions/SoSubAction.h>
00028 #include <Inventor/actions/SoCallbackAction.h>
00029 #include <LDM/SoLDMLargeDataManagement.h>
00030 #include <Inventor/STL/stack>
00031 #include <Inventor/STL/vector>
00032
00033 #ifdef _WIN32
00034 #pragma warning( push )
00035 #pragma warning(disable:4251)
00036 #endif
00037
00038 class SoPrimitiveVertex;
00039 class SoShape;
00040 class SoLdmValuationActionInterface;
00041 class SoDEPRECATED SoLdmValuationAction : public SoCallbackAction
00054 {
00055 SO_ACTION_HEADER(SoLdmValuationAction);
00056
00057 public:
00061 SoLdmValuationAction();
00062
00063 private:
00064 static void initClass();
00065 static void exitClass();
00066
00068 static SoAction* createCb();
00069
00071 bool isCollecting() const { return m_isCollecting; }
00072
00074 void addDataSet(SoDataSet* ds);
00075
00078 void traverseToCurrentNode();
00079
00080 private:
00081 virtual void beginTraversal(SoNode *node);
00082
00083 virtual void invokeTriangleCallbacks(const SoShape *shape,
00084 const SoPrimitiveVertex *v1,
00085 const SoPrimitiveVertex *v2,
00086 const SoPrimitiveVertex *v3);
00087
00088 virtual void invokeLineSegmentCallbacks(const SoShape *shape,
00089 const SoPrimitiveVertex *v1,
00090 const SoPrimitiveVertex *v2);
00091
00092 virtual void invokePointCallbacks(const SoShape *shape,
00093 const SoPrimitiveVertex *v);
00094
00095 private:
00096 static void callDoAction(SoAction *action, SoNode *node);
00097 static void voidAction(SoAction *action, SoNode *node);
00098 static void doValuationActionSeparator(SoAction *action, SoNode *node);
00099 static void doValuationActionDataSet(SoAction *action, SoNode *node);
00100 static void doValuationAction(SoAction *action, SoNode *node);
00101 static void doActionOnRTT(SoAction *action, SoNode* node);
00102
00104 void valueOctree();
00105 bool m_isCollecting;
00106
00108 SoLDM::DsVector m_dsList;
00109
00114 bool isSameDsList() const;
00116 void updateDsListCache();
00118 std::vector<uint64_t> m_prevDsIDList;
00119
00120
00121
00122
00123
00124 unsigned short m_resourceState ;
00125
00129
00130 void pushStack();
00131
00132
00133 int popStack();
00134
00135
00136 void incrementStackValue();
00137
00138
00139
00140 std::stack< int,std::vector<int> > m_separatorTraversalStack;
00141
00142
00143
00144 static bool s_useLdmValuationCache;
00145
00146
00147
00148 SoLdmValuationActionInterface* m_volGeom;
00149
00150 };
00151
00152 #ifdef _WIN32
00153 #pragma warning( pop )
00154 #endif
00155
00156 #endif
00157
00158
00159