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_HEIGHTFIELD_RENDER_H
00025 #define _SO_HEIGHTFIELD_RENDER_H
00026
00027 #ifdef _WIN32
00028 #pragma warning( push )
00029 #pragma warning(disable:4251)
00030 #endif
00031
00032 #include <Inventor/SbBox.h>
00033 #include <VolumeViz/nodes/SoSlice.h>
00034 #include <Inventor/fields/SoSFColor.h>
00035
00036 class SoHeightFieldGeometry;
00037 class SoHeightFieldProperty;
00038 class SoHeightFieldRenderImpl;
00039 class SoVolumeStateHeightField;
00040
00311 class SoHeightFieldRender : public SoSlice
00312 {
00313 SO_NODE_HEADER( SoHeightFieldRender );
00314
00315 public:
00316
00320 SoSFBool cellOutline;
00321
00328 SoSFFloat cellOutlineWidth;
00329
00336 SoSFColor cellOutlineColor;
00337
00339 enum BoundaryCells
00340 {
00342 ALWAYS,
00343
00345 SMART,
00346
00348 NONE
00349 };
00350
00357 SoSFEnum boundaryCells;
00358
00362 SoHeightFieldRender();
00363
00369 static SbBool isSupported(SoState* state=NULL);
00370
00371 #if 1 SoDEPRECATED enum
00374 NormalPrecision
00375 {
00377 NORMAL,
00378
00380 HIGH
00381 };
00382 SoDEPRECATED
00384 SoSFEnum normalPrecision;
00385
00386 #endif
00388 private:
00389
00391 virtual void computeBBox(SoAction *, SbBox3f &box, SbVec3f ¢er);
00392
00395 virtual void rayPick(SoRayPickAction* action);
00396
00397 private:
00398 static void initClass();
00399 static void exitClass();
00400
00404 virtual void notify(SoNotList *list);
00405
00408 virtual SbBool shouldGLRender(SoGLRenderAction* action, SbBool isPointOrLine = FALSE);
00409
00413 SoVolumeStateHeightField* getVolumeStateHeightField() const;
00414
00416 virtual unsigned int getSumOfMaxTextures2D(SoLDMNodeFrontManager* nfm);
00417
00418 private:
00420 virtual void generatePrimitives(SoAction *action);
00421
00422 virtual void getBoundingBox(SoGetBoundingBoxAction *action);
00423
00425 virtual void doRendering(SoGLRenderAction *action);
00426
00428 virtual ~SoHeightFieldRender();
00429
00430 SoINTERNAL private:
00431
00433 virtual void ldmAction( SoLdmValuationAction* action );
00434
00435 private:
00439 virtual SoDetail* createTriangleDetail( SoRayPickAction* action,
00440 const SoPrimitiveVertex* v0,
00441 const SoPrimitiveVertex* v1,
00442 const SoPrimitiveVertex* v2,
00443 SoPickedPoint* pp );
00444
00445 private:
00451 SoHeightFieldRenderImpl* getImpl( SoState* state );
00452 SoHeightFieldRenderImpl* m_heightFieldRenderImpl;
00453
00456 SoVolumeStateHeightField* m_volumeStateHeightField;
00457 };
00458
00459 #ifdef _WIN32
00460 #pragma warning( pop )
00461 #endif
00462 #endif // _SO_HEIGHTFIELD_RENDER_H
00463
00464