Geant4-11
Functions | Variables
SoMarkerSet.cc File Reference
#include <HEPVis/nodes/SoMarkerSet.h>
#include <Inventor/errors/SoDebugError.h>
#include <Inventor/misc/SoState.h>
#include <Inventor/actions/SoGLRenderAction.h>
#include <Inventor/nodes/SoPointSet.h>
#include <Inventor/elements/SoCoordinateElement.h>
#include <Inventor/elements/SoCacheElement.h>
#include <Inventor/elements/SoLazyElement.h>
#include <HEPVis/SbGL.h>
#include <HEPVis/actions/SoGL2PSAction.h>

Go to the source code of this file.

Functions

static void drawMarker (SoAction *aAction,int aStyle)
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// More...
 
static GLubyte * getBitmap (int aW,int aH,char aFigure[])
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// More...
 

Variables

static char asterisk_5_5 []
 
static char asterisk_7_7 []
 
static char asterisk_9_9 []
 
static char circle_filled_5_5 []
 
static char circle_filled_7_7 []
 
static char circle_filled_9_9 []
 
static char circle_line_5_5 []
 
static char circle_line_7_7 []
 
static char circle_line_9_9 []
 
static char cross_5_5 []
 
static char cross_7_7 []
 
static char cross_9_9 []
 
static char david_star_filled_5_5 []
 
static char david_star_filled_7_7 []
 
static char david_star_filled_9_9 []
 
static char david_star_line_5_5 []
 
static char david_star_line_7_7 []
 
static char david_star_line_9_9 []
 
static char diamond_filled_5_5 []
 
static char diamond_filled_7_7 []
 
static char diamond_filled_9_9 []
 
static char diamond_line_5_5 []
 
static char diamond_line_7_7 []
 
static char diamond_line_9_9 []
 
static char plus_5_5 []
 5 5 /////////////////////////////////////////////////////// More...
 
static char plus_7_7 []
 7 7 /////////////////////////////////////////////////////// More...
 
static char plus_9_9 []
 9 9 /////////////////////////////////////////////////////// More...
 
static char * sFigures [54]
 
static char square_filled_5_5 []
 
static char square_filled_7_7 []
 
static char square_filled_9_9 []
 
static char square_line_5_5 []
 
static char square_line_7_7 []
 
static char square_line_9_9 []
 
static char star_5_5 []
 
static char star_7_7 []
 
static char star_9_9 []
 
static char swiss_cross_filled_5_5 []
 
static char swiss_cross_filled_7_7 []
 
static char swiss_cross_filled_9_9 []
 
static char swiss_cross_line_5_5 []
 
static char swiss_cross_line_7_7 []
 
static char swiss_cross_line_9_9 []
 
static char triangle_down_filled_5_5 []
 
static char triangle_down_filled_7_7 []
 
static char triangle_down_filled_9_9 []
 
static char triangle_down_line_5_5 []
 
static char triangle_down_line_7_7 []
 
static char triangle_down_line_9_9 []
 
static char triangle_up_filled_5_5 []
 
static char triangle_up_filled_7_7 []
 
static char triangle_up_filled_9_9 []
 
static char triangle_up_line_5_5 []
 
static char triangle_up_line_7_7 []
 
static char triangle_up_line_9_9 []
 

Function Documentation

◆ drawMarker()

void drawMarker ( SoAction *  aAction,
int  aStyle 
)
static

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

Definition at line 708 of file SoMarkerSet.cc.

714{
715 GLsizei w = 0,h = 0;
716 GLfloat xorig = 0,yorig = 0;
717 GLfloat xmove = 0,ymove = 0;
718
719 if((aStyle>=0)&&(aStyle<18)) {
720 w = h = 5;
721 xorig = yorig = 2;
722 GLubyte* bitmap = getBitmap(w,h,sFigures[aStyle]);
723 glBitmap(w,h,xorig,yorig,0.,0.,bitmap);
724 delete [] bitmap;
725 } else if((aStyle>=18)&&(aStyle<36)) {
726 w = h = 7;
727 xorig = yorig = 3;
728 GLubyte* bitmap = getBitmap(w,h,sFigures[aStyle]);
729 glBitmap(w,h,xorig,yorig,0.,0.,bitmap);
730 delete [] bitmap;
731 } else if((aStyle>=36)&&(aStyle<54)) {
732 w = h = 9;
733 xorig = yorig = 4;
734 GLubyte* bitmap = getBitmap(w,h,sFigures[aStyle]);
735 glBitmap(w,h,xorig,yorig,0.,0.,bitmap);
736 delete [] bitmap;
737 } else {
738 return;
739 }
740
741 if(aAction->isOfType(SoGL2PSAction::getClassTypeId())) {
742 ((SoGL2PSAction*)aAction)->addBitmap(w,h,xorig,yorig,xmove,ymove);
743 }
744
745}
static GLubyte * getBitmap(int, int, char[])
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
Definition: SoMarkerSet.cc:747
static char * sFigures[54]
Definition: SoMarkerSet.cc:568

References getBitmap(), and sFigures.

Referenced by HEPVis_SoMarkerSet::GLRender().

◆ getBitmap()

GLubyte * getBitmap ( int  aW,
int  aH,
char  aFigure[] 
)
static

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

Definition at line 747 of file SoMarkerSet.cc.

754{
755 int index = 0;
756 GLubyte* bitmap = new GLubyte[aW * aH + 1];
757 int ichar = 0;
758 int ibit = 0;
759 unsigned char byte = 0;
760 for ( int row = 0; row < aH; row++ ){
761 for ( int col = 0; col < aW; col++){
762 unsigned char c = aFigure[ichar];
763 ichar++;
764 if(c==' ') {
765 ibit++;
766 } else {
767 byte += (1<<(7-ibit));
768 ibit++;
769 }
770 if(ibit==8) {
771 //unsigned char h = byte / 16;
772 //unsigned char l = byte % 16;
773 //printf("0x%x%x\n",h,l);
774 bitmap[index] = byte;
775 index++;
776 ibit = 0;
777 byte = 0;
778 }
779
780 }
781 if(ibit!=8) { //Jump to next byte.
782 //unsigned char h = byte / 16;
783 //unsigned char l = byte % 16;
784 //printf("0x%x%x\n",h,l);
785 bitmap[index] = byte;
786 index++;
787 ibit = 0;
788 byte = 0;
789 }
790 }
791 return bitmap;
792}

Referenced by drawMarker().

Variable Documentation

◆ asterisk_5_5

char asterisk_5_5[]
static
Initial value:
= {
"x x x"
" xxx "
" x "
" xxx "
"x x x"
}

Definition at line 81 of file SoMarkerSet.cc.

◆ asterisk_7_7

char asterisk_7_7[]
static
Initial value:
= {
"x x x"
" x x x "
" xxx "
" x "
" xxx "
" x x x "
"x x x"
}

Definition at line 212 of file SoMarkerSet.cc.

◆ asterisk_9_9

char asterisk_9_9[]
static
Initial value:
= {
"x x x"
" x x x "
" x x x "
" xxx "
" x "
" xxx "
" x x x "
" x x x "
"x x x"
}

Definition at line 380 of file SoMarkerSet.cc.

◆ circle_filled_5_5

char circle_filled_5_5[]
static
Initial value:
= {
" xxx "
"xxxxx"
"xxxxx"
"xxxxx"
" xxx "
}

Definition at line 109 of file SoMarkerSet.cc.

◆ circle_filled_7_7

char circle_filled_7_7[]
static
Initial value:
= {
" xxxxx "
"xxxxxxx"
"xxxxxxx"
"xxxxxxx"
"xxxxxxx"
"xxxxxxx"
" xxxxx "
}

Definition at line 248 of file SoMarkerSet.cc.

◆ circle_filled_9_9

char circle_filled_9_9[]
static
Initial value:
= {
" xxx "
" xxxxxxx "
" xxxxxxx "
"xxxxxxxxx"
"xxxxxxxxx"
"xxxxxxxxx"
" xxxxxxx "
" xxxxxxx "
" xxx "
}

Definition at line 424 of file SoMarkerSet.cc.

◆ circle_line_5_5

char circle_line_5_5[]
static
Initial value:
= {
" xxx "
"x x"
"x x"
"x x"
" xxx "
}

Definition at line 102 of file SoMarkerSet.cc.

◆ circle_line_7_7

char circle_line_7_7[]
static
Initial value:
= {
" xxxxx "
"x x"
"x x"
"x x"
"x x"
"x x"
" xxxxx "
}

Definition at line 239 of file SoMarkerSet.cc.

◆ circle_line_9_9

char circle_line_9_9[]
static
Initial value:
= {
" xxx "
" xx xx "
" x x "
"x x"
"x x"
"x x"
" x x "
" xx xx "
" xxx "
}

Definition at line 413 of file SoMarkerSet.cc.

◆ cross_5_5

char cross_5_5[]
static
Initial value:
= {
"x x"
" x x "
" x "
" x x "
"x x"
}

Definition at line 88 of file SoMarkerSet.cc.

◆ cross_7_7

char cross_7_7[]
static
Initial value:
= {
"x x"
" x x "
" xxx "
" x "
" xxx "
" x x "
"x x"
}

Definition at line 221 of file SoMarkerSet.cc.

◆ cross_9_9

char cross_9_9[]
static
Initial value:
= {
"x x"
" x x "
" x x "
" x x "
" x "
" x x "
" x x "
" x x "
"x x"
}

Definition at line 391 of file SoMarkerSet.cc.

◆ david_star_filled_5_5

char david_star_filled_5_5[]
static
Initial value:
= {
" x "
"xxxxx"
" xxx "
"xxxxx"
" x "
}

Definition at line 151 of file SoMarkerSet.cc.

◆ david_star_filled_7_7

char david_star_filled_7_7[]
static
Initial value:
= {
" x "
"xxxxxxx"
" xxxxx "
" xxx "
" xxxxx "
"xxxxxxx"
" x "
}

Definition at line 302 of file SoMarkerSet.cc.

◆ david_star_filled_9_9

char david_star_filled_9_9[]
static
Initial value:
= {
" x "
" xxx "
"xxxxxxxxx"
" xxxxxxx "
" xxxxx "
" xxxxxxx "
"xxxxxxxxx"
" xxx "
" x "
}

Definition at line 490 of file SoMarkerSet.cc.

◆ david_star_line_5_5

char david_star_line_5_5[]
static
Initial value:
= {
" x "
"xxxxx"
" x x "
"xxxxx"
" x "
}

Definition at line 144 of file SoMarkerSet.cc.

◆ david_star_line_7_7

char david_star_line_7_7[]
static
Initial value:
= {
" x "
"xxxxxxx"
" x x "
" x x "
" x x "
"xxxxxxx"
" x "
}

Definition at line 293 of file SoMarkerSet.cc.

◆ david_star_line_9_9

char david_star_line_9_9[]
static
Initial value:
= {
" x "
" x x "
"xxxxxxxxx"
" x x "
" x x "
" x x "
"xxxxxxxxx"
" x x "
" x "
}

Definition at line 479 of file SoMarkerSet.cc.

◆ diamond_filled_5_5

char diamond_filled_5_5[]
static
Initial value:
= {
" x "
" xxx "
"xxxxx"
" xxx "
" x "
}

Definition at line 179 of file SoMarkerSet.cc.

◆ diamond_filled_7_7

char diamond_filled_7_7[]
static
Initial value:
= {
" x "
" xxx "
" xxxxx "
"xxxxxxx"
" xxxxx "
" xxx "
" x "
}

Definition at line 338 of file SoMarkerSet.cc.

◆ diamond_filled_9_9

char diamond_filled_9_9[]
static
Initial value:
= {
" x "
" xxx "
" xxxxx "
" xxxxxxx "
"xxxxxxxxx"
" xxxxxxx "
" xxxxx "
" xxx "
" x "
}

Definition at line 534 of file SoMarkerSet.cc.

◆ diamond_line_5_5

char diamond_line_5_5[]
static
Initial value:
= {
" x "
" x x "
"x x"
" x x "
" x "
}

Definition at line 172 of file SoMarkerSet.cc.

◆ diamond_line_7_7

char diamond_line_7_7[]
static
Initial value:
= {
" x "
" x x "
" x x "
"x x"
" x x "
" x x "
" x "
}

Definition at line 329 of file SoMarkerSet.cc.

◆ diamond_line_9_9

char diamond_line_9_9[]
static
Initial value:
= {
" x "
" x x "
" x x "
" x x "
"x x"
" x x "
" x x "
" x x "
" x "
}

Definition at line 523 of file SoMarkerSet.cc.

◆ plus_5_5

char plus_5_5[]
static
Initial value:
= {
" x "
" x "
"xxxxx"
" x "
" x "
}

5 5 ///////////////////////////////////////////////////////

Definition at line 74 of file SoMarkerSet.cc.

◆ plus_7_7

char plus_7_7[]
static
Initial value:
= {
" x "
" x "
" x "
"xxxxxxx"
" x "
" x "
" x "
}

7 7 ///////////////////////////////////////////////////////

Definition at line 203 of file SoMarkerSet.cc.

◆ plus_9_9

char plus_9_9[]
static
Initial value:
= {
" x "
" x "
" x "
" x "
"xxxxxxxxx"
" x "
" x "
" x "
" x "
}

9 9 ///////////////////////////////////////////////////////

Definition at line 369 of file SoMarkerSet.cc.

◆ sFigures

char* sFigures[54]
static

Definition at line 568 of file SoMarkerSet.cc.

Referenced by drawMarker().

◆ square_filled_5_5

char square_filled_5_5[]
static
Initial value:
= {
"xxxxx"
"xxxxx"
"xxxxx"
"xxxxx"
"xxxxx"
}

Definition at line 193 of file SoMarkerSet.cc.

◆ square_filled_7_7

char square_filled_7_7[]
static
Initial value:
= {
"xxxxxxx"
"xxxxxxx"
"xxxxxxx"
"xxxxxxx"
"xxxxxxx"
"xxxxxxx"
"xxxxxxx"
}

Definition at line 356 of file SoMarkerSet.cc.

◆ square_filled_9_9

char square_filled_9_9[]
static
Initial value:
= {
"xxxxxxxxx"
"xxxxxxxxx"
"xxxxxxxxx"
"xxxxxxxxx"
"xxxxxxxxx"
"xxxxxxxxx"
"xxxxxxxxx"
"xxxxxxxxx"
"xxxxxxxxx"
}

Definition at line 556 of file SoMarkerSet.cc.

◆ square_line_5_5

char square_line_5_5[]
static
Initial value:
= {
"xxxxx"
"x x"
"x x"
"x x"
"xxxxx"
}

Definition at line 186 of file SoMarkerSet.cc.

◆ square_line_7_7

char square_line_7_7[]
static
Initial value:
= {
"xxxxxxx"
"x x"
"x x"
"x x"
"x x"
"x x"
"xxxxxxx"
}

Definition at line 347 of file SoMarkerSet.cc.

◆ square_line_9_9

char square_line_9_9[]
static
Initial value:
= {
"xxxxxxxxx"
"x x"
"x x"
"x x"
"x x"
"x x"
"x x"
"x x"
"xxxxxxxxx"
}

Definition at line 545 of file SoMarkerSet.cc.

◆ star_5_5

char star_5_5[]
static
Initial value:
= {
"x x x"
" xxx "
"xxxxx"
" xxx "
"x x x"
}

Definition at line 95 of file SoMarkerSet.cc.

◆ star_7_7

char star_7_7[]
static
Initial value:
= {
"x x x"
" x x x "
" xxx "
"xxxxxxx"
" xxx "
" x x x "
"x x x"
}

Definition at line 230 of file SoMarkerSet.cc.

◆ star_9_9

char star_9_9[]
static
Initial value:
= {
"x x x"
" x x x "
" x x x "
" xxx "
"xxxxxxxxx"
" xxx "
" x x x "
" x x x "
"x x x"
}

Definition at line 402 of file SoMarkerSet.cc.

◆ swiss_cross_filled_5_5

char swiss_cross_filled_5_5[]
static
Initial value:
= {
" xxx "
"xxxxx"
"xxxxx"
"xxxxx"
" xxx "
}

Definition at line 165 of file SoMarkerSet.cc.

◆ swiss_cross_filled_7_7

char swiss_cross_filled_7_7[]
static
Initial value:
= {
" xxx "
" xxx "
"xxxxxxx"
"xxxxxxx"
"xxxxxxx"
" xxx "
" xxx "
}

Definition at line 320 of file SoMarkerSet.cc.

◆ swiss_cross_filled_9_9

char swiss_cross_filled_9_9[]
static
Initial value:
= {
" xxx "
" xxx "
" xxx "
"xxxxxxxxx"
"xxxxxxxxx"
"xxxxxxxxx"
" xxx "
" xxx "
" xxx "
}

Definition at line 512 of file SoMarkerSet.cc.

◆ swiss_cross_line_5_5

char swiss_cross_line_5_5[]
static
Initial value:
= {
" xxx "
"xx xx"
"x x"
"xx xx"
" xxx "
}

Definition at line 158 of file SoMarkerSet.cc.

◆ swiss_cross_line_7_7

char swiss_cross_line_7_7[]
static
Initial value:
= {
" xxx "
" x x "
"xxx xxx"
"x x"
"xxx xxx"
" x x "
" xxx "
}

Definition at line 311 of file SoMarkerSet.cc.

◆ swiss_cross_line_9_9

char swiss_cross_line_9_9[]
static
Initial value:
= {
" xxx "
" x x "
" x x "
"xxxx xxxx"
"x x"
"xxxx xxxx"
" x x "
" x x "
" xxx "
}

Definition at line 501 of file SoMarkerSet.cc.

◆ triangle_down_filled_5_5

char triangle_down_filled_5_5[]
static
Initial value:
= {
" x "
" x "
" xxx "
" xxx "
"xxxxx"
}

Definition at line 137 of file SoMarkerSet.cc.

◆ triangle_down_filled_7_7

char triangle_down_filled_7_7[]
static
Initial value:
= {
" x "
" x "
" xxx "
" xxx "
" xxxxx "
" xxxxx "
"xxxxxxx"
}

Definition at line 284 of file SoMarkerSet.cc.

◆ triangle_down_filled_9_9

char triangle_down_filled_9_9[]
static
Initial value:
= {
" x "
" x "
" xxx "
" xxx "
" xxxxx "
" xxxxx "
" xxxxxxx "
" xxxxxxx "
"xxxxxxxxx"
}

Definition at line 468 of file SoMarkerSet.cc.

◆ triangle_down_line_5_5

char triangle_down_line_5_5[]
static
Initial value:
= {
" x "
" x "
" x x "
" x x "
"xxxxx"
}

Definition at line 130 of file SoMarkerSet.cc.

◆ triangle_down_line_7_7

char triangle_down_line_7_7[]
static
Initial value:
= {
" x "
" x "
" x x "
" x x "
" x x "
" x x "
"xxxxxxx"
}

Definition at line 275 of file SoMarkerSet.cc.

◆ triangle_down_line_9_9

char triangle_down_line_9_9[]
static
Initial value:
= {
" x "
" x "
" x x "
" x x "
" x x "
" x x "
" x x "
" x x "
"xxxxxxxxx"
}

Definition at line 457 of file SoMarkerSet.cc.

◆ triangle_up_filled_5_5

char triangle_up_filled_5_5[]
static
Initial value:
= {
"xxxxx"
" xxx "
" xxx "
" x "
" x "
}

Definition at line 123 of file SoMarkerSet.cc.

◆ triangle_up_filled_7_7

char triangle_up_filled_7_7[]
static
Initial value:
= {
"xxxxxxx"
" xxxxx "
" xxxxx "
" xxx "
" xxx "
" x "
" x "
}

Definition at line 266 of file SoMarkerSet.cc.

◆ triangle_up_filled_9_9

char triangle_up_filled_9_9[]
static
Initial value:
= {
"xxxxxxxxx"
" xxxxxxx "
" xxxxxxx "
" xxxxx "
" xxxxx "
" xxx "
" xxx "
" x "
" x "
}

Definition at line 446 of file SoMarkerSet.cc.

◆ triangle_up_line_5_5

char triangle_up_line_5_5[]
static
Initial value:
= {
"xxxxx"
" x x "
" x x "
" x "
" x "
}

Definition at line 116 of file SoMarkerSet.cc.

◆ triangle_up_line_7_7

char triangle_up_line_7_7[]
static
Initial value:
= {
"xxxxxxx"
" x x "
" x x "
" x x "
" x x "
" x "
" x "
}

Definition at line 257 of file SoMarkerSet.cc.

◆ triangle_up_line_9_9

char triangle_up_line_9_9[]
static
Initial value:
= {
"xxxxxxxxx"
" x x "
" x x "
" x x "
" x x "
" x x "
" x x "
" x "
" x "
}

Definition at line 435 of file SoMarkerSet.cc.