Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
SoFenceSlice.h
Go to the documentation of this file.
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
11#include <Inventor/SbBox.h>
12#include <Inventor/STL/vector>
13#include <Inventor/STL/pair>
14
15#include <LDM/SoLDMTileID.h>
16
17
19
20class SoCache ;
21class SoLDMNodeFrontManager;
22class SoVolumeData;
23class SoVolumeStateFenceSlice;
24class SoVolumeFaceSet;
26
272class SoFenceSlice : public SoSlice
273{
275
276public:
281
294
305
306 enum Axis {
310 Z
311 };
312
318
325 static SbBool isSupported(SoState* state=NULL);
326
327private:
331 virtual void computeBBox( SoAction *action, SbBox3f &box, SbVec3f &center );
332
333 virtual void computeBBox(SoAction *action, SbXfBox3d &box, SbVec3d &center);
334
336 bool intersectGeometry(const SoLDMTileID& tile) const;
337
338 virtual void doAction( SoAction *action );
339
340 virtual void callback( SoCallbackAction *action );
341
342 virtual void GLRender( SoGLRenderAction *action );
343
344 virtual void rayPick( SoRayPickAction *action );
345
346 virtual void getBoundingBox(SoGetBoundingBoxAction *action);
347
348private:
349
350 static void initClass();
351 static void exitClass();
352
356 virtual bool intersect( SoLDMNodeFrontManager* nfm, const SoLDMTileID& tileId );
357
359 virtual void notify(SoNotList *list);
360
364 virtual void setRenderProgress(SoProgressIndicator* ps) override;
365
366private:
367
371 virtual void generatePrimitives(SoAction *action);
372
376 virtual void doRendering(SoGLRenderAction *action);
377
381 virtual ~SoFenceSlice();
382
383SoINTERNAL private:
384
385 virtual void ldmAction( SoLdmValuationAction* action );
386
387private:
388
389 typedef std::vector<SbVec3f> VertexVector;
390 typedef std::pair<float, float> FloatPair;
391
397 SoVolumeFaceSet* getGeometry( SoAction* action = NULL) const;
398
400 void computeVertexProperties( SoAction* action );
401
409 bool intersectLine(const SbBox3f& tileBbox, const SbVec2f& p0,
410 const SbVec2f& p1, SbVec2f* clippedLine,
411 FloatPair& alpha) const;
412
413 SoVertexProperty *m_vertexProperty;
414 mutable SoVolumeFaceSet* m_geometry;
415
417 std::vector<SbVec3f> m_normals;
418
419 bool m_needRecomputeGeom;
420
422 mutable SbThreadMutex m_mutex;
423
424};
425
426#ifdef _WIN32
427#pragma warning( pop )
428#endif
429#endif // _SO_FENCE_SLICE_
430
431
#define SoINTERNAL
#define SO_NODE_HEADER(className)
Definition SoSubNode.h:151
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