Changeset 455 for trunk/gui/vizservers/nanovis/VolumeRenderer.cpp
- Timestamp:
- Jun 2, 2006, 9:38:14 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/vizservers/nanovis/VolumeRenderer.cpp
r452 r455 74 74 } 75 75 } 76 } 77 78 TransferFunction* 79 VolumeRenderer::get_volume_shading(Volume* _vol) 80 { 81 for (int i=0; i < volume.size(); i++) { 82 if (volume[i] == _vol) { 83 return tf[i]; 84 } 85 } 86 return NULL; 76 87 } 77 88 … … 891 902 892 903 //x 893 glColor3f(0. , 0., 0.5);894 895 int length = strlen(vol->label[0]);904 glColor3f(0.5, 0.5, 0.5); 905 906 int length = vol->label[0].size(); 896 907 glPushMatrix(); 897 908 898 glTranslatef(.5*vol->aspect_ratio_width, vol->aspect_ratio_height, -0. 2*vol->aspect_ratio_depth);909 glTranslatef(.5*vol->aspect_ratio_width, vol->aspect_ratio_height, -0.1*vol->aspect_ratio_depth); 899 910 glRotatef(180, 0, 0, 1); 900 911 glRotatef(90, 1, 0, 0); 901 912 902 glScalef(0.000 35, 0.00035, 0.00035);913 glScalef(0.0008, 0.0008, 0.0008); 903 914 for(int i=0; i<length; i++){ 904 glutStrokeCharacter(GLUT_STROKE_ROMAN, vol->label[0] [i]);915 glutStrokeCharacter(GLUT_STROKE_ROMAN, vol->label[0].c_str()[i]); 905 916 glTranslatef(0.04, 0., 0.); 906 917 } … … 908 919 909 920 //y 910 length = strlen(vol->label[1]);921 length = vol->label[1].size(); 911 922 glPushMatrix(); 912 glTranslatef(vol->aspect_ratio_width, 0.5*vol->aspect_ratio_height, -0. 2*vol->aspect_ratio_depth);923 glTranslatef(vol->aspect_ratio_width, 0.5*vol->aspect_ratio_height, -0.1*vol->aspect_ratio_depth); 913 924 glRotatef(90, 0, 1, 0); 914 925 glRotatef(90, 0, 0, 1); 915 926 916 glScalef(0.000 35, 0.00035, 0.00035);927 glScalef(0.0008, 0.0008, 0.0008); 917 928 for(int i=0; i<length; i++){ 918 glutStrokeCharacter(GLUT_STROKE_ROMAN, vol->label[1] [i]);929 glutStrokeCharacter(GLUT_STROKE_ROMAN, vol->label[1].c_str()[i]); 919 930 glTranslatef(0.04, 0., 0.); 920 931 } … … 923 934 924 935 //z 925 length = strlen(vol->label[2]);936 length = vol->label[2].size(); 926 937 glPushMatrix(); 927 938 glTranslatef(0., 1.*vol->aspect_ratio_height, 0.5*vol->aspect_ratio_depth); 928 939 glRotatef(90, 0, 1, 0); 929 940 930 glScalef(0.000 35, 0.00035, 0.00035);941 glScalef(0.0008, 0.0008, 0.0008); 931 942 for(int i=0; i<length; i++){ 932 glutStrokeCharacter(GLUT_STROKE_ROMAN, vol->label[2] [i]);943 glutStrokeCharacter(GLUT_STROKE_ROMAN, vol->label[2].c_str()[i]); 933 944 glTranslatef(0.04, 0., 0.); 934 945 }
Note: See TracChangeset
for help on using the changeset viewer.