Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoFenceSlice.h
1#ifndef _SO_FENCE_SLICE_
2#define _SO_FENCE_SLICE_
3
4#ifdef _WIN32
5#pragma warning( push )
6#pragma warning(disable:4251)
7#endif
8
9#include <Inventor/fields/SoMFVec2f.h>
10#include <Inventor/fields/SoSFInt32.h>
11#include <Inventor/SbBox.h>
12#include <Inventor/STL/vector>
13#include <Inventor/STL/pair>
14
15#include <LDM/SoLDMTileID.h>
16
17
18#include <VolumeViz/nodes/SoSlice.h>
19
20class SoCache ;
21class SoLDMNodeFrontManager;
22class SoVolumeData;
23class SoVolumeStateFenceSlice;
24class SoVolumeFaceSet;
26
266class SoFenceSlice : public SoSlice
267{
268 SO_NODE_HEADER( SoFenceSlice );
269
270public:
275
288
299
300 enum Axis {
304 Z
305 };
306
312
319 static SbBool isSupported(SoState* state=NULL);
320
321private:
325 virtual void computeBBox( SoAction *action, SbBox3f &box, SbVec3f &center );
326
327 virtual void computeBBox(SoAction *action, SbXfBox3d &box, SbVec3d &center);
328
330 bool intersectGeometry(const SoLDMTileID& tile) const;
331
332 virtual void doAction( SoAction *action );
333
334 virtual void callback( SoCallbackAction *action );
335
336 virtual void GLRender( SoGLRenderAction *action );
337
338 virtual void rayPick( SoRayPickAction *action );
339
340 virtual void getBoundingBox(SoGetBoundingBoxAction *action);
341
342private:
343
344 static void initClass();
345 static void exitClass();
346
350 virtual bool intersect( SoLDMNodeFrontManager* nfm, const SoLDMTileID& tileId );
351
353 virtual void notify(SoNotList *list);
354
358 virtual void setRenderProgress(SoProgressIndicator* ps) override;
359
360private:
361
365 virtual void generatePrimitives(SoAction *action);
366
370 virtual void doRendering(SoGLRenderAction *action);
371
375 virtual ~SoFenceSlice();
376
377SoINTERNAL private:
378
379 virtual void ldmAction( SoLdmValuationAction* action );
380
381private:
382
383 typedef std::vector<SbVec3f> VertexVector;
384 typedef std::pair<float, float> FloatPair;
385
391 SoVolumeFaceSet* getGeometry( SoAction* action = NULL) const;
392
394 void computeVertexProperties( SoAction* action );
395
403 bool intersectLine(const SbBox3f& tileBbox, const SbVec2f& p0,
404 const SbVec2f& p1, SbVec2f* clippedLine,
405 FloatPair& alpha) const;
406
407 SoVertexProperty *m_vertexProperty;
408 mutable SoVolumeFaceSet* m_geometry;
409
411 std::vector<SbVec3f> m_normals;
412
413 bool m_needRecomputeGeom;
414
416 mutable SbThreadMutex m_mutex;
417
418};
419
420#ifdef _WIN32
421#pragma warning( pop )
422#endif
423#endif // _SO_FENCE_SLICE_
424
425
3D box class.
Definition SbBox.h:649
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Portable mutex c...
2D vector class.
Definition SbVec.h:76
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> 3D vector class ...
Definition SbVec.h:1214
3D vector class.
Definition SbVec.h:932
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> 3D box with an a...
Definition SbBox.h:1513
Abstract base class for all actions.
Definition SoAction.h:132
Performs a generic traversal of a scene graph or path.
<a href="IconLegend.html"><img src="extVR.gif" alt="VolumeViz" border="0"></a> Fence slice shape nod...
@ Z
(Default)
SoSFInt32 dataSetId
Specifies the SoVolumeData node to use.
static SbBool isSupported(SoState *state=NULL)
Returns true if graphic card can render an SoFenceSlice.
SoMFVec2f points
Set of points defining a lineset.
SoFenceSlice()
Constructor.
SoSFEnum axis
Extrusion axis: X, Y, or Z.
Renders a scene graph using Open Inventor's Render Engine.
Computes bounding box of a scene.
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Tile ID
Definition SoLDMTileID.h:63
friend class SoLdmValuationAction
Definition SoLdmShape.h:84
Multiple-value field containing any number of two-dimensional vectors.
Definition SoMFVec2f.h:89
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Class for report...
Intersects objects with a ray cast into scene.
Field containing an enumerated value.
Definition SoSFEnum.h:89
Field containing a int32_t integer.
Definition SoSFInt32.h:80
<a href="IconLegend.html"><img src="extVR.gif" alt="VolumeViz" border="0"></a> Abstract base class f...
Definition SoSlice.h:62
Traversal state.
Definition SoState.h:74
Vertex property node.
<a href="IconLegend.html"><img src="extVR.gif" alt="VolumeViz" border="0"></a> Volume data property ...
<a href="IconLegend.html"><img src="extVR.gif" alt="VolumeViz" border="0"></a> Polygonal face shape ...
int SbBool
Boolean type.
Definition SbBase.h:87