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
00455 class SoHeightFieldRender : public SoSlice
00456 {
00457 SO_NODE_HEADER( SoHeightFieldRender );
00458
00459 public:
00460
00464 SoSFBool cellOutline;
00465
00472 SoSFFloat cellOutlineWidth;
00473
00480 SoSFColor cellOutlineColor;
00481
00483 enum BoundaryCells
00484 {
00486 ALWAYS,
00487
00489 SMART,
00490
00492 NONE
00493 };
00494
00501 SoSFEnum boundaryCells;
00502
00506 SoHeightFieldRender();
00507
00513 static SbBool isSupported(SoState* state=NULL);
00514
00515 private:
00516
00518 virtual void computeBBox(SoAction *, SbBox3f &box, SbVec3f ¢er);
00519
00522 virtual void rayPick(SoRayPickAction* action);
00523
00525 virtual void getBoundingBox(SoGetBoundingBoxAction *action);
00526
00527 private:
00528 static void initClass();
00529 static void exitClass();
00530
00534 virtual void notify(SoNotList *list);
00535
00539 SoVolumeStateHeightField* getVolumeStateHeightField() const;
00540
00542 virtual unsigned int getSumOfMaxTextures2D(SoLDMNodeFrontManager* nfm);
00543
00544 private:
00546 virtual void generatePrimitives(SoAction *action);
00547
00549 virtual void doRendering(SoGLRenderAction *action);
00550
00553 virtual SbBool shouldGLRender(SoGLRenderAction* action, SbBool isPointOrLine = FALSE);
00554
00556 virtual ~SoHeightFieldRender();
00557
00558 SoINTERNAL private:
00559
00561 virtual void ldmAction( SoLdmValuationAction* action );
00562
00563 private:
00567 virtual SoDetail* createTriangleDetail( SoRayPickAction* action,
00568 const SoPrimitiveVertex* v0,
00569 const SoPrimitiveVertex* v1,
00570 const SoPrimitiveVertex* v2,
00571 SoPickedPoint* pp );
00572
00573 private:
00574
00575 #if 1 SoDEPRECATED enum
00578 NormalPrecision
00579 {
00581 NORMAL,
00582
00584 HIGH
00585 };
00586 SoDEPRECATED
00588 SoSFEnum normalPrecision;
00589 #endif
00596 SoHeightFieldRenderImpl* getImpl( SoState* state );
00597 SoHeightFieldRenderImpl* m_heightFieldRenderImpl;
00598
00601 SoVolumeStateHeightField* m_volumeStateHeightField;
00602 };
00603
00604 #ifdef _WIN32
00605 #pragma warning( pop )
00606 #endif
00607 #endif // _SO_HEIGHTFIELD_RENDER_H
00608
00609