Changeset 451 for trunk/gui/vizservers/nanovis/VolumeRenderer.cpp
- Timestamp:
- May 31, 2006 8:12:41 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/vizservers/nanovis/VolumeRenderer.cpp
r449 r451 64 64 65 65 return ret; 66 } 67 68 void 69 VolumeRenderer::shade_volume(Volume* _vol, TransferFunction* _tf) 70 { 71 for (int i=0; i < volume.size(); i++) { 72 if (volume[i] == _vol) { 73 tf[i] = _tf; 74 } 75 } 66 76 } 67 77 … … 851 861 852 862 //x 853 glPushMatrix(); 854 glTranslatef(0., -0.2, 1.); 855 glColor3f(1.f, 1.0f, 1.0f); 856 863 char* xlabel = (char*)vol->label[0].c_str(); 864 if (*xlabel != '\0') { 857 865 glPushMatrix(); 858 glScalef(1./volume[volume_index]->aspect_ratio_width, 859 1./volume[volume_index]->aspect_ratio_height, 860 1./volume[volume_index]->aspect_ratio_depth); 861 glPrint((char*)vol->label[0].c_str(), 0); 866 glTranslatef(0., -0.2, 1.); 867 glColor3f(1.f, 1.0f, 1.0f); 868 869 glPushMatrix(); 870 glScalef(1./volume[volume_index]->aspect_ratio_width, 871 1./volume[volume_index]->aspect_ratio_height, 872 1./volume[volume_index]->aspect_ratio_depth); 873 glPrint(xlabel, 0); 874 glPopMatrix(); 862 875 glPopMatrix(); 863 glPopMatrix();876 } 864 877 865 878 //y 866 glPushMatrix(); 867 glTranslatef(1., 0.5, 0.); 868 879 char* ylabel = (char*)vol->label[1].c_str(); 880 if (*ylabel != '\0') { 869 881 glPushMatrix(); 870 glScalef(1./volume[volume_index]->aspect_ratio_width, 871 1./volume[volume_index]->aspect_ratio_height, 872 1./volume[volume_index]->aspect_ratio_depth); 873 glRotatef(45., 0., 1., 0.); 874 glColor3f(1.f, 1.0f, 1.0f); 875 glPrint((char*)vol->label[1].c_str(), 0); 882 glTranslatef(1., 0.5, 0.); 883 884 glPushMatrix(); 885 glScalef(1./volume[volume_index]->aspect_ratio_width, 886 1./volume[volume_index]->aspect_ratio_height, 887 1./volume[volume_index]->aspect_ratio_depth); 888 glRotatef(45., 0., 1., 0.); 889 glColor3f(1.f, 1.0f, 1.0f); 890 glPrint((char*)vol->label[1].c_str(), 0); 891 glPopMatrix(); 876 892 glPopMatrix(); 877 glPopMatrix();893 } 878 894 879 895 //z 880 glPushMatrix(); 881 glTranslatef(1., -0.2, 1.); 882 896 char* zlabel = (char*)vol->label[2].c_str(); 897 if (*zlabel != '\0') { 883 898 glPushMatrix(); 884 glScalef(1./volume[volume_index]->aspect_ratio_width, 885 1./volume[volume_index]->aspect_ratio_height, 886 1./volume[volume_index]->aspect_ratio_depth); 887 glRotatef(90., 0., 1., 0.); 888 glColor3f(1.f, 1.0f, 1.0f); 889 glPrint((char*)vol->label[2].c_str(), 0); 899 glTranslatef(1., -0.2, 1.); 900 901 glPushMatrix(); 902 glScalef(1./volume[volume_index]->aspect_ratio_width, 903 1./volume[volume_index]->aspect_ratio_height, 904 1./volume[volume_index]->aspect_ratio_depth); 905 glRotatef(90., 0., 1., 0.); 906 glColor3f(1.f, 1.0f, 1.0f); 907 glPrint((char*)vol->label[2].c_str(), 0); 908 glPopMatrix(); 890 909 glPopMatrix(); 891 glPopMatrix();910 } 892 911 893 912 glDisable(GL_TEXTURE_2D);
Note: See TracChangeset
for help on using the changeset viewer.