00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef _SO_VALUE_ORDERING_HH
00033 #define _SO_VALUE_ORDERING_HH 1
00034
00035 #include <Inventor/fields/SoSFBool.h>
00036 #include <Inventor/nodes/SoRenderList.h>
00037
00038 class SoAlarmSensor;
00039 class SoIdleSensor;
00040
00041 #ifndef HIDDEN_FROM_DOC
00042
00043 class SoDEPRECATED SoValueRenderObject : public SoRenderObject{
00045 public:
00046 SoValueRenderObject(const SoPath* p)
00047 : SoRenderObject(p)
00048 { minTris = 0; numTris = 0; substitute = NULL; };
00049
00050 virtual ~SoValueRenderObject() {
00051 if (substitute!=NULL) { substitute->unref(); substitute = NULL; } };
00052 SbVec3f center;
00053 float rad_sq;
00054 SbBox3f bbox;
00055 int32_t numTris, minTris;
00056 float renderValue;
00057 SoNode *substitute;
00058 };
00059 #endif // HIDDEN_FROM_DOC
00060 class SoDEPRECATED SoValueOrdering : public SoRenderList{
00147
00148 SO_NODE_HEADER(SoValueOrdering);
00149
00150 public:
00162 SoValueOrdering();
00163
00175 SoValueOrdering(int numChildren);
00176
00177
00182 SoSFBool dropCulling;
00187 SoSFUInt32 dropScreenArea;
00193 SoSFBool adjustDecimation;
00199 SoSFBool boundingBoxSubstitutes;
00206 SoSFBool decimateSubstitutes;
00211 SoSFBool lowValueCulling;
00212
00213 private:
00214
00215 virtual void getBoundingBox(SoGetBoundingBoxAction *action);
00216 virtual void GLRenderBelowPath(SoGLRenderAction *action);
00217 virtual void pick(SoPickAction *action);
00218 virtual void getPrimitiveCount(SoGetPrimitiveCountAction *action);
00219
00220 private:
00221 static void initClass();
00222 static void exitClass();
00223
00224 private:
00225
00226
00227 virtual void doStandardTraversal(SoAction *action);
00228
00229
00230 virtual void doSpatialTraversal(SoAction *action);
00231
00232
00233 virtual SoRenderObject *createRenderObject(const SoPath *path);
00234 virtual void removingRenderObject(SoRenderObject *);
00235 virtual SbBool isFieldChangeImportant(SoNode *triggerNode,
00236 SoField* triggerField);
00237 virtual void renderObjectChanged(SoRenderObject *);
00238 virtual void ourFieldChanged(SoField *);
00239
00240 private:
00241
00242 virtual ~SoValueOrdering();
00243
00244 private:
00245
00246 void commonConstructor();
00247
00248 SoGetBoundingBoxAction *bbAction;
00249 SoGetPrimitiveCountAction *countAction;
00250
00251 SbPList changeQueue;
00252 void insertInChangedQueue(void*);
00253 void updateChangedQueue();
00254 void updateRenderObject(SoValueRenderObject*);
00255
00256 int32_t totalTris;
00257 double maxError;
00258 SbIntList needsDecimating;
00259 SoAlarmSensor *decimateIdle;
00260 static void decimateIdleCB(void* data, SoSensor*) {
00261 ((SoValueOrdering*)data)->decimateMaxError(); };
00262 void decimateMaxError();
00263
00264 };
00265
00266 #endif
00267
00268