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
00310 class SoHeightFieldRender : public SoSlice
00311 {
00312 SO_NODE_HEADER( SoHeightFieldRender );
00313
00314 public:
00315
00319 SoSFBool cellOutline;
00320
00327 SoSFFloat cellOutlineWidth;
00328
00335 SoSFColor cellOutlineColor;
00336
00338 enum BoundaryCells
00339 {
00341 ALWAYS,
00342
00344 SMART,
00345
00347 NONE
00348 };
00349
00356 SoSFEnum boundaryCells;
00357
00361 SoHeightFieldRender();
00362
00368 static SbBool isSupported(SoState* state=NULL);
00369
00370 private:
00371
00373 virtual void computeBBox(SoAction *, SbBox3f &box, SbVec3f ¢er);
00374
00377 virtual void rayPick(SoRayPickAction* action);
00378
00380 virtual void getBoundingBox(SoGetBoundingBoxAction *action);
00381
00382 private:
00383 static void initClass();
00384 static void exitClass();
00385
00389 virtual void notify(SoNotList *list);
00390
00394 SoVolumeStateHeightField* getVolumeStateHeightField() const;
00395
00397 virtual unsigned int getSumOfMaxTextures2D(SoLDMNodeFrontManager* nfm);
00398
00399 private:
00401 virtual void generatePrimitives(SoAction *action);
00402
00404 virtual void doRendering(SoGLRenderAction *action);
00405
00408 virtual SbBool shouldGLRender(SoGLRenderAction* action, SbBool isPointOrLine = FALSE);
00409
00411 virtual ~SoHeightFieldRender();
00412
00413 SoINTERNAL private:
00414
00416 virtual void ldmAction( SoLdmValuationAction* action );
00417
00418 private:
00422 virtual SoDetail* createTriangleDetail( SoRayPickAction* action,
00423 const SoPrimitiveVertex* v0,
00424 const SoPrimitiveVertex* v1,
00425 const SoPrimitiveVertex* v2,
00426 SoPickedPoint* pp );
00427
00428 private:
00429
00430 #if 1 SoDEPRECATED enum
00433 NormalPrecision
00434 {
00436 NORMAL,
00437
00439 HIGH
00440 };
00441 SoDEPRECATED
00443 SoSFEnum normalPrecision;
00444 #endif
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