Open Inventor Release 2024.1.1
 
Loading...
Searching...
No Matches
SoMarkerSet.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2017 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : R. ALBOU (May 1998)
22**=======================================================================*/
23
24/* include files */
25#ifndef _SO_MARKER_SET_
26#define _SO_MARKER_SET_
27
28#include <Inventor/nodes/SoPointSet.h>
29#include <Inventor/fields/SoMFInt32.h>
30#include <Inventor/fields/SoSFFloat.h>
31#include <Inventor/fields/SoMFFloat.h>
32
34class SbThreadMutex;
35class SoMarker;
36
37namespace markerset {
38 class SoMarkerSetRenderer;
39}
40class SoMarkerSizeCache;
43/*----------------------------------------------------------------------------*/
44
144class SoMarkerSet : public SoPointSet {
145 SO_NODE_HEADER(SoMarkerSet) ;
146
147 public:
175
189
200
205
228
249
270
291
312
333
354
375
396 };
397
402
418 static void addMarker(int markerIndex, const SbVec2s &size, const unsigned char *bytes,
419 SbBool isLSBFirst = TRUE, SbBool isUpToDown = TRUE);
420
438 static void addMarker(int markerIndex, const SbVec2s &size,
439 const unsigned char *bytes,
440 const uint32_t *orderedRGBA,
441 SbBool isLSBFirst = TRUE, SbBool isUpToDown = TRUE);
442
447 static void addMarker(int markerIndex, SoMarker* marker );
448
457 SbVec2s &size,
458 const unsigned char *&bytes,
459 SbBool &isLSBFirst);
460
470 SbVec2s &size,
471 const unsigned char *&bytes,
472 const uint32_t *&orderedRGBA,
473 SbBool &isLSBFirst);
474
480
486
487private:
488 // Generates markers representing marker set
489 virtual void generatePrimitives(SoAction *action);
490
491 // Destructor.
492 virtual ~SoMarkerSet();
493
494private:
495 virtual void GLRender(SoGLRenderAction *action);
496 virtual void getPrimitiveCount(SoGetPrimitiveCountAction *action);
497
498 // Computes bounding box
499 virtual void computeBBox( SoAction *action, SbBox3f &box, SbVec3f &center );
500
501 static SbBool isMarkerBitSet(int markerIndex, int bitNumber);
502
503private:
504 static void initClass();
505 static void exitClass();
506
507 // manage notification
508 virtual void notify(SoNotList *list);
509
510private:
511
513 markerset::SoMarkerSetRenderer* m_MarkerSetShaderRenderer;
514
516 void updateRenderer(markerset::SoMarkerSetRenderer* renderer, SoNotList* list);
517
519 markerset::SoMarkerSetRenderer* chooseRenderer(SoState* state);
520
521 // Cache storage for marker sizes during rayPick action
522 SoRayPickAction* m_currentPickAction;
523 SoMarkerSizeCache* m_markerSizeCache;
524};
525
526#endif // !_SO_MARKER_SET_
527
528
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:700
3D vector class.
Definition SbVec.h:932
Abstract base class for all actions.
Definition SoAction.h:132
Renders a scene graph using Open Inventor's Render Engine.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Counts number of...
Multiple-value field containing any number of floating point values.
Definition SoMFFloat.h:90
Multiple-value field containing any number of int32_t integers.
Definition SoMFInt32.h:88
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Defines a custom...
Definition SoMarker.h:130
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Extension of Poi...
static void addMarker(int markerIndex, SoMarker *marker)
Add a new marker with index markerIndex using an existing marker definition.
SoSFFloat markerGlobalScale
Specifies a global scale factor applied to all markers.
static void addMarker(int markerIndex, const SbVec2s &size, const unsigned char *bytes, SbBool isLSBFirst=TRUE, SbBool isUpToDown=TRUE)
Add a new marker with index markerIndex .
static SbBool removeMarker(int markerIndex)
Remove the marker with index markerIndex .
static int getNumDefinedMarkers()
Return the number of defined markers.
static void addMarker(int markerIndex, const SbVec2s &size, const unsigned char *bytes, const uint32_t *orderedRGBA, SbBool isLSBFirst=TRUE, SbBool isUpToDown=TRUE)
Add a new colored marker with index markerIndex .
SoMarkerSet()
Constructor.
static SoMarker * getMarker(int markerIndex)
Retrieve the definition of the marker with index markerIndex .
static SbBool getMarker(int markerIndex, SbVec2s &size, const unsigned char *&bytes, SbBool &isLSBFirst)
Retrieve the description of the marker with index markerIndex .
static SbBool getMarker(int markerIndex, SbVec2s &size, const unsigned char *&bytes, const uint32_t *&orderedRGBA, SbBool &isLSBFirst)
Retrieve the description of the colored marker with index markerIndex .
SoMFInt32 markerIndex
Specifies the marker index (type of marker) for each marker.
MarkerType
Marker type.
@ SATELLITE_LINE_9_9
Satellite line 9x9.
@ CIRCLE_LINE_9_9
Circle line 9x9.
@ HOURGLASS_LINE_7_7
Hourglass line 7x7.
@ TRIANGLE_LINE_9_9
Triangle line 9x9.
@ SATELLITE_LINE_7_7
Satellite line 7x7.
@ HOURGLASS_LINE_9_9
Hourglass line 9x9.
@ WELL_5_5
Well 5x5.
@ CAUTION_LINE_7_7
Caution line 7x7.
@ STAR_7_7
Star 7x7.
@ CAUTION_FILLED_7_7
Caution filled 7x7.
@ HOURGLASS_FILLED_7_7
Hourglass filled 7x7.
@ SHIP_FILLED_7_7
Ship filled 7x7.
@ PLUS_7_7
Plus 7x7.
@ BAR_5_5
Bar 5x5.
@ CAUTION_FILLED_5_5
Caution filled 5x5.
@ DIAMOND_LINE_7_7
Diamond line 7x7.
@ SHIP_FILLED_9_9
Ship filled 9x9.
@ Y_9_9
Y 9x9.
@ SATELLITE_FILLED_9_9
Satellite filled 9x9.
@ SQUARE_LINE_5_5
Square line 5x5.
@ CROSS_7_7
Cross 7x7.
@ SHIP_FILLED_5_5
Ship filled 5x5.
@ BACKSLASH_7_7
Backslash 7x7.
@ CIRCLE_FILLED_7_7
Circle filled 7x7.
@ PLUS_5_5
Plus 5x5.
@ PINE_TREE_LINE_5_5
Pine line 5x5.
@ TRIANGLE_LINE_7_7
Triangle line 7x7.
@ HOURGLASS_LINE_5_5
Hourglass line 5x5.
@ CROSS_9_9
Cross 9x9.
@ PINE_TREE_FILLED_7_7
Pine filled 7x7.
@ LIGHTNING_5_5
Lightning 5x5.
@ DIAMOND_FILLED_9_9
Diamond filled 9x9.
@ PINE_TREE_LINE_9_9
Pine line 9x9.
@ SHIP_LINE_9_9
Ship line 9x9.
@ SQUARE_FILLED_9_9
Square filled 9x9.
@ CIRCLE_LINE_7_7
Circle line 7x7.
@ SQUARE_FILLED_7_7
Square filled 7x7.
@ STAR_5_5
Star 5x5.
@ MINUS_5_5
Minus 5x5.
@ BAR_7_7
Bar 7x7.
@ HOURGLASS_FILLED_9_9
Hourglass filled 9x9.
@ SQUARE_LINE_9_9
Square line 9x9.
@ DIAMOND_FILLED_7_7
Diamond filled 7x7.
@ RHOMBUS_LINE_7_7
Rhombus line 7x7.
@ SHIP_LINE_7_7
Ship line 7x7.
@ DIAMOND_LINE_9_9
Diamond line 9x9.
@ Y_5_5
Y 5x5.
@ DIAMOND_LINE_5_5
Diamond line 5x5.
@ BAR_9_9
Bar 9x9.
@ DIAMOND_FILLED_5_5
Diamond filled 5x5.
@ SHIP_LINE_5_5
Ship line 5x5.
@ CAUTION_FILLED_9_9
Caution filled 9x9.
@ RHOMBUS_LINE_5_5
Rhombus line 5x5.
@ BACKSLASH_5_5
Backslash 5x5.
@ SATELLITE_FILLED_7_7
Satellite filled 7x7.
@ PINE_TREE_FILLED_9_9
Pine filled 9x9.
@ TRIANGLE_FILLED_9_9
Triangle filled 9x9.
@ CIRCLE_FILLED_9_9
Circle filled 9x9.
@ SLASH_7_7
Slash 7x7.
@ SLASH_9_9
Slash 9x9.
@ RHOMBUS_FILLED_5_5
Rhombus filled 5x5.
@ SATELLITE_FILLED_5_5
Satellite filled 5x5.
@ CIRCLE_FILLED_5_5
Circle filled 5x5.
@ LIGHTNING_9_9
Lightning 9x9.
@ TRIANGLE_FILLED_7_7
Triangle filled 7x7.
@ PINE_TREE_FILLED_5_5
Pine filled 5x5.
@ RHOMBUS_LINE_9_9
Rhombus line 9x9.
@ HOURGLASS_FILLED_5_5
Hourglass filled 5x5.
@ TRIANGLE_FILLED_5_5
Triangle filled 5x5.
@ WELL_9_9
Well 9x9.
@ RHOMBUS_FILLED_9_9
Rhombus filled 9x9.
@ MINUS_7_7
Minus 7x7.
@ SLASH_5_5
Slash 5x5.
@ Y_7_7
Y 7x7.
@ RHOMBUS_FILLED_7_7
Rhombus filled 7x7.
@ SATELLITE_LINE_5_5
Satellite line 5x5.
@ STAR_9_9
Star 9x9.
@ CAUTION_LINE_9_9
Caution line 9x9.
@ LIGHTNING_7_7
Lightning 7x7.
@ SQUARE_FILLED_5_5
Square filled 5x5.
@ CROSS_5_5
Cross 5x5.
@ PINE_TREE_LINE_7_7
Pine line 7x7.
@ BACKSLASH_9_9
Backslash 9x9.
@ TRIANGLE_LINE_5_5
Triangle line 5x5.
@ CIRCLE_LINE_5_5
Circle line 5x5.
@ WELL_7_7
Well 7x7.
@ PLUS_9_9
Plus 9x9.
@ MINUS_9_9
Minus 9x9.
@ SQUARE_LINE_7_7
Square line 7x7.
@ CAUTION_LINE_5_5
Caution line 5x5.
SoMFFloat markerScale
Specifies the scale factor applied to each marker.
Point set shape node.
Definition SoPointSet.h:163
Intersects objects with a ray cast into scene.
Field containing a floating-point value.
Definition SoSFFloat.h:78
Traversal state.
Definition SoState.h:74
int SbBool
Boolean type.
Definition SbBase.h:87