Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
HEPVis_SoMarkerSet Class Reference

#include <SoMarkerSet.h>

+ Inheritance diagram for HEPVis_SoMarkerSet:

Public Types

enum  MarkerType {
  PLUS_5_5 = 0 , ASTERISK_5_5 , CROSS_5_5 , STAR_5_5 ,
  CIRCLE_LINE_5_5 , CIRCLE_FILLED_5_5 , TRIANGLE_UP_LINE_5_5 , TRIANGLE_UP_FILLED_5_5 ,
  TRIANGLE_DOWN_LINE_5_5 , TRIANGLE_DOWN_FILLED_5_5 , DAVID_STAR_LINE_5_5 = 10 , DAVID_STAR_FILLED_5_5 ,
  SWISS_CROSS_LINE_5_5 , SWISS_CROSS_FILLED_5_5 , DIAMOND_LINE_5_5 , DIAMOND_FILLED_5_5 ,
  SQUARE_LINE_5_5 , SQUARE_FILLED_5_5 = 17 , PLUS_7_7 = 18 , ASTERISK_7_7 ,
  CROSS_7_7 , STAR_7_7 , CIRCLE_LINE_7_7 , CIRCLE_FILLED_7_7 ,
  TRIANGLE_UP_LINE_7_7 , TRIANGLE_UP_FILLED_7_7 , TRIANGLE_DOWN_LINE_7_7 , TRIANGLE_DOWN_FILLED_7_7 ,
  DAVID_STAR_LINE_7_7 , DAVID_STAR_FILLED_7_7 , SWISS_CROSS_LINE_7_7 = 30 , SWISS_CROSS_FILLED_7_7 ,
  DIAMOND_LINE_7_7 , DIAMOND_FILLED_7_7 , SQUARE_LINE_7_7 , SQUARE_FILLED_7_7 = 35 ,
  PLUS_9_9 = 36 , ASTERISK_9_9 , CROSS_9_9 , STAR_9_9 ,
  CIRCLE_LINE_9_9 , CIRCLE_FILLED_9_9 , TRIANGLE_UP_LINE_9_9 , TRIANGLE_UP_FILLED_9_9 ,
  TRIANGLE_DOWN_LINE_9_9 , TRIANGLE_DOWN_FILLED_9_9 , DAVID_STAR_LINE_9_9 , DAVID_STAR_FILLED_9_9 ,
  SWISS_CROSS_LINE_9_9 = 30 , SWISS_CROSS_FILLED_9_9 , DIAMOND_LINE_9_9 , DIAMOND_FILLED_9_9 ,
  SQUARE_LINE_9_9 , SQUARE_FILLED_9_9 = 53
}
 

Public Member Functions

 HEPVis_SoMarkerSet ()
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
 
virtual void GLRender (SoGLRenderAction *)
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
 

Static Public Member Functions

static void initClass ()
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
 

Public Attributes

SoMFInt32 markerIndex
 

Protected Member Functions

virtual ~HEPVis_SoMarkerSet ()
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
 

Detailed Description

Definition at line 35 of file SoMarkerSet.h.

Member Enumeration Documentation

◆ MarkerType

Enumerator
PLUS_5_5 
ASTERISK_5_5 
CROSS_5_5 
STAR_5_5 
CIRCLE_LINE_5_5 
CIRCLE_FILLED_5_5 
TRIANGLE_UP_LINE_5_5 
TRIANGLE_UP_FILLED_5_5 
TRIANGLE_DOWN_LINE_5_5 
TRIANGLE_DOWN_FILLED_5_5 
DAVID_STAR_LINE_5_5 
DAVID_STAR_FILLED_5_5 
SWISS_CROSS_LINE_5_5 
SWISS_CROSS_FILLED_5_5 
DIAMOND_LINE_5_5 
DIAMOND_FILLED_5_5 
SQUARE_LINE_5_5 
SQUARE_FILLED_5_5 
PLUS_7_7 
ASTERISK_7_7 
CROSS_7_7 
STAR_7_7 
CIRCLE_LINE_7_7 
CIRCLE_FILLED_7_7 
TRIANGLE_UP_LINE_7_7 
TRIANGLE_UP_FILLED_7_7 
TRIANGLE_DOWN_LINE_7_7 
TRIANGLE_DOWN_FILLED_7_7 
DAVID_STAR_LINE_7_7 
DAVID_STAR_FILLED_7_7 
SWISS_CROSS_LINE_7_7 
SWISS_CROSS_FILLED_7_7 
DIAMOND_LINE_7_7 
DIAMOND_FILLED_7_7 
SQUARE_LINE_7_7 
SQUARE_FILLED_7_7 
PLUS_9_9 
ASTERISK_9_9 
CROSS_9_9 
STAR_9_9 
CIRCLE_LINE_9_9 
CIRCLE_FILLED_9_9 
TRIANGLE_UP_LINE_9_9 
TRIANGLE_UP_FILLED_9_9 
TRIANGLE_DOWN_LINE_9_9 
TRIANGLE_DOWN_FILLED_9_9 
DAVID_STAR_LINE_9_9 
DAVID_STAR_FILLED_9_9 
SWISS_CROSS_LINE_9_9 
SWISS_CROSS_FILLED_9_9 
DIAMOND_LINE_9_9 
DIAMOND_FILLED_9_9 
SQUARE_LINE_9_9 
SQUARE_FILLED_9_9 

Definition at line 41 of file SoMarkerSet.h.

41 {
42 //************ 5x5 markers
43 PLUS_5_5 = 0,
61
62 //************ 7x7 markers
63 PLUS_7_7 = 18,
81
82 //************ 9x9 markers
83 PLUS_9_9 = 36,
101 } ;

Constructor & Destructor Documentation

◆ HEPVis_SoMarkerSet()

HEPVis_SoMarkerSet::HEPVis_SoMarkerSet ( )

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//

Definition at line 639 of file SoMarkerSet.cc.

643{
644 SO_NODE_CONSTRUCTOR(HEPVis_SoMarkerSet);
645
646 SO_NODE_ADD_FIELD(markerIndex,(CROSS_5_5));
647}

◆ ~HEPVis_SoMarkerSet()

HEPVis_SoMarkerSet::~HEPVis_SoMarkerSet ( )
protectedvirtual

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//

Definition at line 649 of file SoMarkerSet.cc.

653{
654}

Member Function Documentation

◆ GLRender()

void HEPVis_SoMarkerSet::GLRender ( SoGLRenderAction *  aAction)
virtual

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//

Definition at line 656 of file SoMarkerSet.cc.

661{
662 SoState* state = aAction->getState();
663
664 const SoCoordinateElement* coordinateElement =
665 SoCoordinateElement::getInstance(state);
666 if(coordinateElement==NULL) return;
667
668 if(aAction->isOfType(SoGL2PSAction::getClassTypeId())) {
669 SoCacheElement::invalidate(state);
670 }
671
672 const SbColor& color = SoLazyElement::getDiffuse(aAction->getState(),0);
673 float red,green,blue;
674 color.getValue(red,green,blue);
675
676 int mark = markerIndex[0];
677
678 int starti = startIndex.getValue();
679 int pointn = numPoints.getValue();
680 int pointi;
681
682 glPushAttrib( (GLbitfield)(GL_CURRENT_BIT | GL_ENABLE_BIT));
683 glDisable(GL_LIGHTING);
684 glColor3f(red,green,blue);
685
686#ifdef WIN32
687 //WIN32 : depth test is out over bitmap !
688 glDisable(GL_DEPTH_TEST);
689#endif
690
691 glPixelStorei(GL_UNPACK_ALIGNMENT,1);
692 for(pointi=starti;pointi<pointn;pointi++){
693 const SbVec3f& vec = coordinateElement->get3(pointi);
694 glRasterPos3f(vec[0],vec[1],vec[2]);
695 // Do a push, pop to correct a deffect of Mesa-3.1.
696 // If not, further line drawing will have bad colors.
697 // The glPopAttrib will compell a reinitialisation of
698 // some internal Mesa state.
699 //glPushAttrib(GL_ALL_ATTRIB_BITS);
700 //glPopAttrib();
701 //
702 drawMarker(aAction,mark);
703 }
704
705 glPopAttrib();
706}
SoMFInt32 markerIndex
Definition: SoMarkerSet.h:38

◆ initClass()

void HEPVis_SoMarkerSet::initClass ( )
static

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//

Definition at line 627 of file SoMarkerSet.cc.

631{
632 static bool first = true;
633 if (first) {
634 first = false;
635 SO_NODE_INIT_CLASS(HEPVis_SoMarkerSet,SoPointSet,"PointSet");
636 }
637}

Referenced by G4OpenInventor::InitNodes().

Member Data Documentation

◆ markerIndex

SoMFInt32 HEPVis_SoMarkerSet::markerIndex

The documentation for this class was generated from the following files: