Changeset 2138 in Sophya
- Timestamp:
- Jul 29, 2002, 2:04:38 PM (23 years ago)
- Location:
- trunk/SophyaPI/PI
- Files:
-
- 6 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PI/Makefile
r2080 r2138 1 MODULECXXREPNAME := PI 2 MODULEDECCXXFLAGS := -msg_quiet 1 3 include ../Mgr/Makefile.h 2 4 3 5 all: $(LIB)libPI.a 4 clean: 5 rm -f $(OBJ)lut.o $(OBJ)parradapter.o $(OBJ)pi3ddrw.o $(OBJ)piapplgen.o $(OBJ)piapplmac.o $(OBJ)piapplx.o $(OBJ)piaxes.o $(OBJ)piaxestools.o $(OBJ)pibwdggen.o $(OBJ)pibwdgmac.o $(OBJ)pibwdgx.o $(OBJ)picmap.o $(OBJ)picmapgen.o $(OBJ)picmapmac.o $(OBJ)picmapview.o $(OBJ)picmapx.o $(OBJ)picons.o $(OBJ)picontainergen.o $(OBJ)picontainermac.o $(OBJ)picontainerx.o $(OBJ)pidrawer.o $(OBJ)pidrawwin.o $(OBJ)pidrwtools.o $(OBJ)pieldrw.o $(OBJ)pierrdisp.o $(OBJ)pievthandler.o $(OBJ)pifilechogen.o $(OBJ)pifilechomac.o $(OBJ)pifilechox.o $(OBJ)pifontgen.o $(OBJ)pifontmac.o $(OBJ)pifontx.o $(OBJ)pigraph3d.o $(OBJ)pigraphgen.o $(OBJ)pigraphmac.o $(OBJ)pigraphps.o $(OBJ)pigraphuc.o $(OBJ)pigraphx.o $(OBJ)pigratt.o $(OBJ)piimage.o $(OBJ)piimgtools.o $(OBJ)pilistgen.o $(OBJ)pilistmac.o $(OBJ)pilistx.o $(OBJ)pimenubargen.o $(OBJ)pimenubarmac.o $(OBJ)pimenubarx.o $(OBJ)pimenugen.o $(OBJ)pimenumac.o $(OBJ)pimenux.o $(OBJ)pimsghandler.o $(OBJ)pioptmenugen.o $(OBJ)pioptmenumac.o $(OBJ)pioptmenux.o $(OBJ)piperiodmac.o $(OBJ)piperiodx.o $(OBJ)pipixmapgen.o $(OBJ)pipixmapmac.o $(OBJ)pipixmapx.o $(OBJ)pippapplmac.o $(OBJ)pipplist.o $(OBJ)pippmenubar.o $(OBJ)pippoptmenu.o $(OBJ)pippviewadapter.o $(OBJ)pippwindowmac.o $(OBJ)piscdrawwdg.o $(OBJ)pistdwdggen.o $(OBJ)pistdwdgmac.o $(OBJ)pistdwdgx.o $(OBJ)pistzwin.o $(OBJ)pisurfdr.o $(OBJ)pitherm.o $(OBJ)piup.o $(OBJ)piup_def.o $(OBJ)piupdattachment.o $(OBJ)piwdggen.o $(OBJ)piwdgmac.o $(OBJ)piwdgx.o $(OBJ)piwindowgen.o $(OBJ)piwindowmac.o $(OBJ)piwindowx.o $(OBJ)pixtbase.o $(OBJ)piyfxdrw.o $(OBJ)psfile.o $(OBJ)xdispim.o 6 rm -f $(LIB)libPI.a 7 $(LIB)libPI.a : $(OBJ)lut.o $(OBJ)parradapter.o $(OBJ)pi3ddrw.o $(OBJ)piapplgen.o $(OBJ)piapplx.o $(OBJ)piaxes.o $(OBJ)piaxestools.o $(OBJ)pibwdggen.o $(OBJ)pibwdgx.o $(OBJ)picmap.o $(OBJ)picmapgen.o $(OBJ)picmapview.o $(OBJ)picmapx.o $(OBJ)picons.o $(OBJ)picontainergen.o $(OBJ)picontainerx.o $(OBJ)pidrawer.o $(OBJ)pidrawwin.o $(OBJ)pidrwtools.o $(OBJ)pieldrw.o $(OBJ)pievthandler.o $(OBJ)pifilechogen.o $(OBJ)pifilechox.o $(OBJ)pifontgen.o $(OBJ)pifontx.o $(OBJ)pigraph3d.o $(OBJ)pigraphgen.o $(OBJ)pigraphps.o $(OBJ)pigraphuc.o $(OBJ)pigraphx.o $(OBJ)pigratt.o $(OBJ)piimage.o $(OBJ)piimgtools.o $(OBJ)pilistgen.o $(OBJ)pilistx.o $(OBJ)pimenubargen.o $(OBJ)pimenubarx.o $(OBJ)pimenugen.o $(OBJ)pimenux.o $(OBJ)pimsghandler.o $(OBJ)pioptmenugen.o $(OBJ)pioptmenux.o $(OBJ)piperiodx.o $(OBJ)pipixmapgen.o $(OBJ)pipixmapx.o $(OBJ)piscdrawwdg.o $(OBJ)pistdwdggen.o $(OBJ)pistdwdgx.o $(OBJ)pistzwin.o $(OBJ)pisurfdr.o $(OBJ)pitherm.o $(OBJ)piwdggen.o $(OBJ)piwdgx.o $(OBJ)piwindowgen.o $(OBJ)piwindowx.o $(OBJ)pixtbase.o $(OBJ)piyfxdrw.o $(OBJ)psfile.o 8 $(ARCXX) $(ARCXXFLAGS) $@ $($(ARARGS)) 6 $(LIB)libPI.a : $(OBJ)lut.o $(OBJ)parradapter.o $(OBJ)pi3ddrw.o $(OBJ)pi3dwdg.o $(OBJ)piapplgen.o $(OBJ)piapplx.o $(OBJ)piaxes.o $(OBJ)piaxestools.o $(OBJ)pibwdggen.o $(OBJ)pibwdgx.o $(OBJ)picmap.o $(OBJ)picmapgen.o $(OBJ)picmapview.o $(OBJ)picmapx.o $(OBJ)picons.o $(OBJ)picontainergen.o $(OBJ)picontainerx.o $(OBJ)pidrawer.o $(OBJ)pidrawwin.o $(OBJ)pidrwtools.o $(OBJ)pieldrw.o $(OBJ)pievthandler.o $(OBJ)pifilechogen.o $(OBJ)pifilechox.o $(OBJ)pifontgen.o $(OBJ)pifontx.o $(OBJ)pigraph3d.o $(OBJ)pigraphgen.o $(OBJ)pigraphps.o $(OBJ)pigraphuc.o $(OBJ)pigraphx.o $(OBJ)pigratt.o $(OBJ)pigrcoord.o $(OBJ)piimage.o $(OBJ)piimgtools.o $(OBJ)pilineatt.o $(OBJ)pilistgen.o $(OBJ)pilistx.o $(OBJ)pimenubargen.o $(OBJ)pimenubarx.o $(OBJ)pimenugen.o $(OBJ)pimenux.o $(OBJ)pimsghandler.o $(OBJ)pioptmenugen.o $(OBJ)pioptmenux.o $(OBJ)piperiodx.o $(OBJ)pipixmapgen.o $(OBJ)pipixmapx.o $(OBJ)piscdrawwdg.o $(OBJ)pistdwdggen.o $(OBJ)pistdwdgx.o $(OBJ)pistzwin.o $(OBJ)pisurfdr.o $(OBJ)pitherm.o $(OBJ)piwdggen.o $(OBJ)piwdgx.o $(OBJ)piwindowgen.o $(OBJ)piwindowx.o $(OBJ)pixtbase.o $(OBJ)piyfxdrw.o $(OBJ)psfile.o 7 $(AR) $(ARFLAGS) $@ $($(ARARGS)) 9 8 ifeq ($(CXX),cxx) 10 9 $(CXX) $? $(CPPFLAGS) $(CXXFLAGS) -o $(OBJ)xx.x -Hf 10 endif 11 12 clean: 13 rm -f $(OBJ)lut.o $(OBJ)parradapter.o $(OBJ)pi3ddrw.o $(OBJ)pi3dwdg.o $(OBJ)piapplgen.o $(OBJ)piapplx.o $(OBJ)piaxes.o $(OBJ)piaxestools.o $(OBJ)pibwdggen.o $(OBJ)pibwdgx.o $(OBJ)picmap.o $(OBJ)picmapgen.o $(OBJ)picmapview.o $(OBJ)picmapx.o $(OBJ)picons.o $(OBJ)picontainergen.o $(OBJ)picontainerx.o $(OBJ)pidrawer.o $(OBJ)pidrawwin.o $(OBJ)pidrwtools.o $(OBJ)pieldrw.o $(OBJ)pievthandler.o $(OBJ)pifilechogen.o $(OBJ)pifilechox.o $(OBJ)pifontgen.o $(OBJ)pifontx.o $(OBJ)pigraph3d.o $(OBJ)pigraphgen.o $(OBJ)pigraphps.o $(OBJ)pigraphuc.o $(OBJ)pigraphx.o $(OBJ)pigratt.o $(OBJ)pigrcoord.o $(OBJ)piimage.o $(OBJ)piimgtools.o $(OBJ)pilineatt.o $(OBJ)pilistgen.o $(OBJ)pilistx.o $(OBJ)pimenubargen.o $(OBJ)pimenubarx.o $(OBJ)pimenugen.o $(OBJ)pimenux.o $(OBJ)pimsghandler.o $(OBJ)pioptmenugen.o $(OBJ)pioptmenux.o $(OBJ)piperiodx.o $(OBJ)pipixmapgen.o $(OBJ)pipixmapx.o $(OBJ)piscdrawwdg.o $(OBJ)pistdwdggen.o $(OBJ)pistdwdgx.o $(OBJ)pistzwin.o $(OBJ)pisurfdr.o $(OBJ)pitherm.o $(OBJ)piwdggen.o $(OBJ)piwdgx.o $(OBJ)piwindowgen.o $(OBJ)piwindowx.o $(OBJ)pixtbase.o $(OBJ)piyfxdrw.o $(OBJ)psfile.o 14 ifeq ($(CXX),cxx) 15 cd $(REPM); rm -f *.o 11 16 endif 12 17 … … 17 22 $(INC)machdefs.h pidrawer.h pibwdggen.h \ 18 23 piwdgx.h piwdggen.h pimsghandler.h picolist.h picmap.h picmapx.h \ 19 picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigraphuc.h \ 20 pievthandler.h psfile.h pigratt.h piaxes.h pieldrw.h pigraph3d.h \ 21 pibwdgx.h pigraphps.h pidrwtools.h pistdwdgx.h pistdwdggen.h \ 22 pioptmenux.h pioptmenugen.h pimenux.h pimenugen.h piwindowx.h \ 23 piwindowgen.h picontainerx.h picontainergen.h piapplx.h piapplgen.h \ 24 pimenubarx.h pimenubargen.h picons.h 24 picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h \ 25 pilineatt.h pigraphuc.h pievthandler.h psfile.h pigratt.h piaxes.h \ 26 pieldrw.h pigraph3d.h 27 $(OBJ)pi3dwdg.o: pi3dwdg.cc pi3dwdg.h pisysdep.h \ 28 $(INC)machdefs.h pi3ddrw.h pidrawer.h \ 29 pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h picolist.h picmap.h \ 30 picmapx.h picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h \ 31 pigrcoord.h pilineatt.h pigraphuc.h pievthandler.h psfile.h pigratt.h \ 32 piaxes.h pieldrw.h pigraph3d.h pibwdgx.h pigraphps.h pidrwtools.h \ 33 pistdwdgx.h pistdwdggen.h pioptmenux.h pioptmenugen.h pimenux.h \ 34 pimenugen.h piwindowx.h piwindowgen.h picontainerx.h picontainergen.h \ 35 piapplx.h piapplgen.h pimenubarx.h pimenubargen.h picons.h 25 36 $(OBJ)piapplgen.o: piapplgen.cc piapplgen.h pimsghandler.h \ 26 37 $(INC)machdefs.h pisysdep.h picontainerx.h \ … … 28 39 pimenubargen.h pimenux.h pimenugen.h picons.h pistdwdgx.h \ 29 40 pistdwdggen.h pibwdgx.h pibwdggen.h picmap.h picmapx.h picmapgen.h \ 30 pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigr aphuc.h \31 pi evthandler.h psfile.h pigraphps.h41 pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h pilineatt.h \ 42 pigraphuc.h pievthandler.h psfile.h pigraphps.h 32 43 $(OBJ)piapplx.o: piapplx.cc piapplx.h piapplgen.h pimsghandler.h \ 33 44 $(INC)machdefs.h pisysdep.h picontainerx.h \ … … 35 46 pimenubargen.h pimenux.h pimenugen.h picons.h pistdwdgx.h \ 36 47 pistdwdggen.h pibwdgx.h pibwdggen.h picmap.h picmapx.h picmapgen.h \ 37 pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigr aphuc.h \38 pi evthandler.h psfile.h pigraphps.h48 pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h pilineatt.h \ 49 pigraphuc.h pievthandler.h psfile.h pigraphps.h 39 50 $(OBJ)piaxes.o: piaxes.cc $(INC)machdefs.h piaxes.h \ 40 51 pigraphuc.h pisysdep.h pigraphgen.h piwdgx.h piwdggen.h \ 41 52 pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h pifontx.h \ 42 pifontgen.h pigr att.h53 pifontgen.h pigrcoord.h pilineatt.h pigratt.h 43 54 $(OBJ)piaxestools.o: piaxestools.cc piaxes.h pigraphuc.h pisysdep.h \ 44 55 $(INC)machdefs.h pigraphgen.h piwdgx.h \ 45 56 piwdggen.h pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h \ 46 pifontx.h pifontgen.h pigr att.h piaxestools.h pistdwdgx.h \47 pistdwdg gen.h pioptmenux.h pioptmenugen.h pimenux.h pimenugen.h \48 pi windowx.h piwindowgen.h picontainerx.h picontainergen.h piapplx.h \49 piappl gen.h pimenubarx.h pimenubargen.h picons.h pibwdgx.h \57 pifontx.h pifontgen.h pigrcoord.h pilineatt.h pigratt.h piaxestools.h \ 58 pistdwdgx.h pistdwdggen.h pioptmenux.h pioptmenugen.h pimenux.h \ 59 pimenugen.h piwindowx.h piwindowgen.h picontainerx.h picontainergen.h \ 60 piapplx.h piapplgen.h pimenubarx.h pimenubargen.h picons.h pibwdgx.h \ 50 61 pibwdggen.h pigraphx.h pievthandler.h psfile.h pigraphps.h \ 51 62 piscdrawwdg.h pidrawer.h pieldrw.h … … 53 64 $(INC)machdefs.h piwdgx.h piwdggen.h \ 54 65 pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h pigraphx.h \ 55 pigraphgen.h pifontx.h pifontgen.h pigraphuc.h pievthandler.h \ 56 psfile.h pidrawer.h pigratt.h piaxes.h pigraphps.h pidrwtools.h \ 57 pistdwdgx.h pistdwdggen.h pioptmenux.h pioptmenugen.h pimenux.h \ 58 pimenugen.h piwindowx.h piwindowgen.h picontainerx.h picontainergen.h \ 59 piapplx.h piapplgen.h pimenubarx.h pimenubargen.h picons.h pibwdgx.h 66 pigraphgen.h pifontx.h pifontgen.h pigrcoord.h pilineatt.h \ 67 pigraphuc.h pievthandler.h psfile.h pidrawer.h pigratt.h piaxes.h \ 68 pigraphps.h pidrwtools.h pistdwdgx.h pistdwdggen.h pioptmenux.h \ 69 pioptmenugen.h pimenux.h pimenugen.h piwindowx.h piwindowgen.h \ 70 picontainerx.h picontainergen.h piapplx.h piapplgen.h pimenubarx.h \ 71 pimenubargen.h picons.h pibwdgx.h 60 72 $(OBJ)pibwdgx.o: pibwdgx.cc pixtbaseP.h pibwdgx.h pisysdep.h \ 61 73 $(INC)machdefs.h pibwdggen.h piwdgx.h \ 62 74 piwdggen.h pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h \ 63 pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigr aphuc.h \64 pi evthandler.h psfile.h pigraphps.h pixtbase.h75 pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h pilineatt.h \ 76 pigraphuc.h pievthandler.h psfile.h pigraphps.h pixtbase.h 65 77 $(OBJ)picmap.o: picmap.cc picmap.h pisysdep.h \ 66 78 $(INC)machdefs.h picmapx.h picmapgen.h … … 70 82 $(INC)machdefs.h pibwdgx.h pibwdggen.h \ 71 83 piwdgx.h piwdggen.h pimsghandler.h picolist.h picmap.h picmapx.h \ 72 picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigr aphuc.h \73 pi evthandler.h psfile.h pigraphps.h84 picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h \ 85 pilineatt.h pigraphuc.h pievthandler.h psfile.h pigraphps.h 74 86 $(OBJ)picmapx.o: picmapx.cc piwdgx.h piwdggen.h \ 75 87 $(INC)machdefs.h pimsghandler.h picolist.h \ … … 80 92 pistdwdggen.h picontainerx.h picontainergen.h pibwdgx.h pibwdggen.h \ 81 93 picmap.h picmapx.h picmapgen.h pigraphx.h pigraphgen.h pifontx.h \ 82 pifontgen.h pigraphuc.h pievthandler.h psfile.h pigraphps.h 94 pifontgen.h pigrcoord.h pilineatt.h pigraphuc.h pievthandler.h \ 95 psfile.h pigraphps.h 83 96 $(OBJ)picontainergen.o: picontainergen.cc picontainergen.h pisysdep.h \ 84 97 $(INC)machdefs.h piwdgx.h piwdggen.h \ … … 90 103 pidrawer.h pibwdggen.h pisysdep.h piwdgx.h piwdggen.h pimsghandler.h \ 91 104 picolist.h picmap.h picmapx.h picmapgen.h pigraphx.h pigraphgen.h \ 92 pifontx.h pifontgen.h pigraphuc.h pievthandler.h psfile.h pigratt.h \ 93 piaxes.h pidrwtools.h pistdwdgx.h pistdwdggen.h pioptmenux.h \ 94 pioptmenugen.h pimenux.h pimenugen.h piwindowx.h piwindowgen.h \ 95 picontainerx.h picontainergen.h piapplx.h piapplgen.h pimenubarx.h \ 96 pimenubargen.h picons.h pibwdgx.h pigraphps.h ucckprot.h 105 pifontx.h pifontgen.h pigrcoord.h pilineatt.h pigraphuc.h \ 106 pievthandler.h psfile.h pigratt.h piaxes.h pidrwtools.h pistdwdgx.h \ 107 pistdwdggen.h pioptmenux.h pioptmenugen.h pimenux.h pimenugen.h \ 108 piwindowx.h piwindowgen.h picontainerx.h picontainergen.h piapplx.h \ 109 piapplgen.h pimenubarx.h pimenubargen.h picons.h pibwdgx.h \ 110 pigraphps.h ucckprot.h 97 111 $(OBJ)pidrawwin.o: pidrawwin.cc pidrawwin.h pisysdep.h \ 98 112 $(INC)machdefs.h piwindowx.h piwindowgen.h \ 99 113 picontainerx.h picontainergen.h piwdgx.h piwdggen.h pimsghandler.h \ 100 114 picolist.h piscdrawwdg.h pibwdgx.h pibwdggen.h picmap.h picmapx.h \ 101 picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigr aphuc.h \102 pi evthandler.h psfile.h pigraphps.h pistdwdgx.h pistdwdggen.h \103 pi drawer.h pigratt.h piaxes.h pieldrw.h115 picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h \ 116 pilineatt.h pigraphuc.h pievthandler.h psfile.h pigraphps.h \ 117 pistdwdgx.h pistdwdggen.h pidrawer.h pigratt.h piaxes.h pieldrw.h 104 118 $(OBJ)pidrwtools.o: pidrwtools.cc pidrwtools.h pisysdep.h \ 105 119 $(INC)machdefs.h pistdwdgx.h pistdwdggen.h \ … … 108 122 picontainerx.h picontainergen.h piapplx.h piapplgen.h pimenubarx.h \ 109 123 pimenubargen.h picons.h pibwdgx.h pibwdggen.h picmap.h picmapx.h \ 110 picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigraphuc.h \ 111 pievthandler.h psfile.h pigraphps.h piscdrawwdg.h pidrawer.h \ 112 pigratt.h piaxes.h pieldrw.h pi3ddrw.h pigraph3d.h 124 picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h \ 125 pilineatt.h pigraphuc.h pievthandler.h psfile.h pigraphps.h \ 126 piscdrawwdg.h pidrawer.h pigratt.h piaxes.h pieldrw.h pi3dwdg.h \ 127 pi3ddrw.h pigraph3d.h 113 128 $(OBJ)pieldrw.o: pieldrw.cc $(INC)machdefs.h \ 114 129 pieldrw.h pidrawer.h pibwdggen.h pisysdep.h piwdgx.h piwdggen.h \ 115 130 pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h pigraphx.h \ 116 pigraphgen.h pifontx.h pifontgen.h pigr aphuc.h pievthandler.h \117 p sfile.h pigratt.h piaxes.h131 pigraphgen.h pifontx.h pifontgen.h pigrcoord.h pilineatt.h \ 132 pigraphuc.h pievthandler.h psfile.h pigratt.h piaxes.h 118 133 $(OBJ)pievthandler.o: pievthandler.cc pievthandler.h pisysdep.h \ 119 134 $(INC)machdefs.h pimsghandler.h piwdgx.h \ 120 135 piwdggen.h picolist.h pigraphx.h pigraphgen.h picmap.h picmapx.h \ 121 picmapgen.h pifontx.h pifontgen.h 136 picmapgen.h pifontx.h pifontgen.h pigrcoord.h pilineatt.h 122 137 $(OBJ)pifilechogen.o: pifilechogen.cc pifilechogen.h pisysdep.h \ 123 138 $(INC)machdefs.h piwdgx.h piwdggen.h \ … … 128 143 picolist.h pimenubarx.h pimenubargen.h pimenux.h pimenugen.h picons.h \ 129 144 pistdwdgx.h pistdwdggen.h pibwdgx.h pibwdggen.h picmap.h picmapx.h \ 130 picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigr aphuc.h \131 pi evthandler.h psfile.h pigraphps.h pifilechox.h pifilechogen.h \132 pi windowx.h piwindowgen.h145 picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h \ 146 pilineatt.h pigraphuc.h pievthandler.h psfile.h pigraphps.h \ 147 pifilechox.h pifilechogen.h piwindowx.h piwindowgen.h 133 148 $(OBJ)pifontgen.o: pifontgen.cc pigraphgen.h pisysdep.h \ 134 149 $(INC)machdefs.h piwdgx.h piwdggen.h \ 135 150 pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h pifontx.h \ 136 pifontgen.h 151 pifontgen.h pigrcoord.h pilineatt.h 137 152 $(OBJ)pifontx.o: pifontx.cc pisysdep.h \ 138 153 $(INC)machdefs.h pifontx.h pifontgen.h \ … … 141 156 $(INC)machdefs.h pigraphuc.h pigraphgen.h \ 142 157 piwdgx.h piwdggen.h pimsghandler.h picolist.h picmap.h picmapx.h \ 143 picmapgen.h pifontx.h pifontgen.h 158 picmapgen.h pifontx.h pifontgen.h pigrcoord.h pilineatt.h 144 159 $(OBJ)pigraphgen.o: pigraphgen.cc pigraphgen.h pisysdep.h \ 145 160 $(INC)machdefs.h piwdgx.h piwdggen.h \ 146 161 pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h pifontx.h \ 147 pifontgen.h 162 pifontgen.h pigrcoord.h pilineatt.h 148 163 $(OBJ)pigraphps.o: pigraphps.cc pigraphps.h pisysdep.h \ 149 164 $(INC)machdefs.h pigraphgen.h piwdgx.h \ 150 165 piwdggen.h pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h \ 151 pifontx.h pifontgen.h p sfile.h166 pifontx.h pifontgen.h pigrcoord.h pilineatt.h psfile.h 152 167 $(OBJ)pigraphuc.o: pigraphuc.cc $(INC)machdefs.h \ 153 168 pigraphuc.h pisysdep.h pigraphgen.h piwdgx.h piwdggen.h \ 154 169 pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h pifontx.h \ 155 pifontgen.h ucckprot.h170 pifontgen.h pigrcoord.h pilineatt.h ucckprot.h 156 171 $(OBJ)pigraphx.o: pigraphx.cc pigraphx.h pisysdep.h \ 157 172 $(INC)machdefs.h pigraphgen.h piwdgx.h \ 158 173 piwdggen.h pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h \ 159 pifontx.h pifontgen.h 174 pifontx.h pifontgen.h pigrcoord.h pilineatt.h 160 175 $(OBJ)pigratt.o: pigratt.cc pigratt.h pisysdep.h \ 161 176 $(INC)machdefs.h pigraphgen.h piwdgx.h \ 162 177 piwdggen.h pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h \ 163 pifontx.h pifontgen.h 178 pifontx.h pifontgen.h pigrcoord.h pilineatt.h 179 $(OBJ)pigrcoord.o: pigrcoord.cc pigrcoord.h pisysdep.h \ 180 $(INC)machdefs.h 164 181 $(OBJ)piimage.o: piimage.cc piimage.h parradapter.h \ 165 182 $(INC)machdefs.h lut.h pisysdep.h pieldrw.h \ 166 183 pidrawer.h pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h picolist.h \ 167 184 picmap.h picmapx.h picmapgen.h pigraphx.h pigraphgen.h pifontx.h \ 168 pifontgen.h pigr aphuc.h pievthandler.h psfile.h pigratt.h piaxes.h \169 p ipixmapx.h pipixmapgen.h pibwdgx.h pigraphps.h pistdwdgx.h \170 pi stdwdggen.h piwindowx.h piwindowgen.h picontainerx.h \171 picontainer gen.h picmapview.h piimgtools.h pioptmenux.h \172 pioptmenu gen.h pimenux.h pimenugen.h piapplx.h piapplgen.h \173 pi menubarx.h pimenubargen.h picons.h pidrwtools.h piscdrawwdg.h \174 pi yfxdrw.h185 pifontgen.h pigrcoord.h pilineatt.h pigraphuc.h pievthandler.h \ 186 psfile.h pigratt.h piaxes.h pipixmapx.h pipixmapgen.h pibwdgx.h \ 187 pigraphps.h pistdwdgx.h pistdwdggen.h piwindowx.h piwindowgen.h \ 188 picontainerx.h picontainergen.h picmapview.h piimgtools.h \ 189 pioptmenux.h pioptmenugen.h pimenux.h pimenugen.h piapplx.h \ 190 piapplgen.h pimenubarx.h pimenubargen.h picons.h pidrwtools.h \ 191 piscdrawwdg.h piyfxdrw.h 175 192 $(OBJ)piimgtools.o: piimgtools.cc piimgtools.h pisysdep.h \ 176 193 $(INC)machdefs.h pistdwdgx.h pistdwdggen.h \ … … 179 196 picontainerx.h picontainergen.h piapplx.h piapplgen.h pimenubarx.h \ 180 197 pimenubargen.h picons.h pibwdgx.h pibwdggen.h picmap.h picmapx.h \ 181 picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigraphuc.h \ 182 pievthandler.h psfile.h pigraphps.h piimage.h parradapter.h lut.h \ 183 pieldrw.h pidrawer.h pigratt.h piaxes.h pipixmapx.h pipixmapgen.h \ 184 picmapview.h 198 picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h \ 199 pilineatt.h pigraphuc.h pievthandler.h psfile.h pigraphps.h piimage.h \ 200 parradapter.h lut.h pieldrw.h pidrawer.h pigratt.h piaxes.h \ 201 pipixmapx.h pipixmapgen.h picmapview.h 202 $(OBJ)pilineatt.o: pilineatt.cc pilineatt.h pisysdep.h \ 203 $(INC)machdefs.h 185 204 $(OBJ)pilistgen.o: pilistgen.cc pilistgen.h pisysdep.h \ 186 205 $(INC)machdefs.h piwdgx.h piwdggen.h \ … … 194 213 picontainerx.h picontainergen.h pimenubarx.h picons.h pistdwdgx.h \ 195 214 pistdwdggen.h pibwdgx.h pibwdggen.h picmap.h picmapx.h picmapgen.h \ 196 pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigr aphuc.h \197 pi evthandler.h psfile.h pigraphps.h215 pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h pilineatt.h \ 216 pigraphuc.h pievthandler.h psfile.h pigraphps.h 198 217 $(OBJ)pimenubarx.o: pimenubarx.cc pimenubarx.h pimenubargen.h pisysdep.h \ 199 218 $(INC)machdefs.h pimenux.h pimenugen.h \ … … 201 220 picontainerx.h picontainergen.h picons.h pistdwdgx.h pistdwdggen.h \ 202 221 pibwdgx.h pibwdggen.h picmap.h picmapx.h picmapgen.h pigraphx.h \ 203 pigraphgen.h pifontx.h pifontgen.h pigr aphuc.h pievthandler.h \204 p sfile.h pigraphps.h222 pigraphgen.h pifontx.h pifontgen.h pigrcoord.h pilineatt.h \ 223 pigraphuc.h pievthandler.h psfile.h pigraphps.h 205 224 $(OBJ)pimenugen.o: pimenugen.cc pimenugen.h pisysdep.h \ 206 225 $(INC)machdefs.h piwdgx.h piwdggen.h \ … … 220 239 picontainergen.h pimenubarx.h pimenubargen.h picons.h pibwdgx.h \ 221 240 pibwdggen.h picmap.h picmapx.h picmapgen.h pigraphx.h pigraphgen.h \ 222 pifontx.h pifontgen.h pigraphuc.h pievthandler.h psfile.h pigraphps.h 241 pifontx.h pifontgen.h pigrcoord.h pilineatt.h pigraphuc.h \ 242 pievthandler.h psfile.h pigraphps.h 223 243 $(OBJ)piperiodx.o: piperiodx.cc piwdgx.h piwdggen.h \ 224 244 $(INC)machdefs.h pimsghandler.h picolist.h \ … … 227 247 $(INC)machdefs.h pibwdgx.h pibwdggen.h \ 228 248 piwdgx.h piwdggen.h pimsghandler.h picolist.h picmap.h picmapx.h \ 229 picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigr aphuc.h \230 pi evthandler.h psfile.h pigraphps.h249 picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h \ 250 pilineatt.h pigraphuc.h pievthandler.h psfile.h pigraphps.h 231 251 $(OBJ)pipixmapx.o: pipixmapx.cc pipixmapx.h pipixmapgen.h pisysdep.h \ 232 252 $(INC)machdefs.h pibwdgx.h pibwdggen.h \ 233 253 piwdgx.h piwdggen.h pimsghandler.h picolist.h picmap.h picmapx.h \ 234 picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigr aphuc.h \235 pi evthandler.h psfile.h pigraphps.h254 picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h \ 255 pilineatt.h pigraphuc.h pievthandler.h psfile.h pigraphps.h 236 256 $(OBJ)piscdrawwdg.o: piscdrawwdg.cc \ 237 257 $(INC)machdefs.h piscdrawwdg.h pisysdep.h \ 238 258 pibwdgx.h pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h picolist.h \ 239 259 picmap.h picmapx.h picmapgen.h pigraphx.h pigraphgen.h pifontx.h \ 240 pifontgen.h pigraphuc.h pievthandler.h psfile.h pigraphps.h \ 241 pistdwdgx.h pistdwdggen.h piwindowx.h piwindowgen.h picontainerx.h \ 242 picontainergen.h pidrawer.h pigratt.h piaxes.h pieldrw.h pidrwtools.h \ 243 pioptmenux.h pioptmenugen.h pimenux.h pimenugen.h piapplx.h \ 244 piapplgen.h pimenubarx.h pimenubargen.h picons.h piaxestools.h 260 pifontgen.h pigrcoord.h pilineatt.h pigraphuc.h pievthandler.h \ 261 psfile.h pigraphps.h pistdwdgx.h pistdwdggen.h piwindowx.h \ 262 piwindowgen.h picontainerx.h picontainergen.h pidrawer.h pigratt.h \ 263 piaxes.h pieldrw.h pidrwtools.h pioptmenux.h pioptmenugen.h pimenux.h \ 264 pimenugen.h piapplx.h piapplgen.h pimenubarx.h pimenubargen.h \ 265 picons.h piaxestools.h 245 266 $(OBJ)pistdwdggen.o: pistdwdggen.cc pistdwdggen.h pisysdep.h \ 246 267 $(INC)machdefs.h piwdgx.h piwdggen.h \ … … 255 276 picolist.h piperiodx.h $(INC)periodic.h \ 256 277 psfile.h pifontgen.h pigraphgen.h picmap.h picmapx.h picmapgen.h \ 257 pifontx.h 278 pifontx.h pigrcoord.h pilineatt.h 258 279 $(OBJ)pisurfdr.o: pisurfdr.cc pisurfdr.h parradapter.h \ 259 280 $(INC)machdefs.h lut.h pi3ddrw.h pisysdep.h \ 260 281 pidrawer.h pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h picolist.h \ 261 282 picmap.h picmapx.h picmapgen.h pigraphx.h pigraphgen.h pifontx.h \ 262 pifontgen.h pigr aphuc.h pievthandler.h psfile.h pigratt.h piaxes.h \263 p ieldrw.h pigraph3d.h pibwdgx.h pigraphps.h283 pifontgen.h pigrcoord.h pilineatt.h pigraphuc.h pievthandler.h \ 284 psfile.h pigratt.h piaxes.h pieldrw.h pigraph3d.h 264 285 $(OBJ)pitherm.o: pitherm.cc pitherm.h pisysdep.h \ 265 286 $(INC)machdefs.h pibwdgx.h pibwdggen.h \ 266 287 piwdgx.h piwdggen.h pimsghandler.h picolist.h picmap.h picmapx.h \ 267 picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigr aphuc.h \268 pi evthandler.h psfile.h pigraphps.h288 picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h \ 289 pilineatt.h pigraphuc.h pievthandler.h psfile.h pigraphps.h 269 290 $(OBJ)piwdggen.o: piwdggen.cc piwdggen.h \ 270 291 $(INC)machdefs.h pimsghandler.h picolist.h \ 271 292 picontainergen.h pisysdep.h piwdgx.h pievthandler.h pigraphx.h \ 272 293 pigraphgen.h picmap.h picmapx.h picmapgen.h pifontx.h pifontgen.h \ 273 p sfile.h294 pigrcoord.h pilineatt.h psfile.h 274 295 $(OBJ)piwdgx.o: piwdgx.cc piwdgx.h piwdggen.h \ 275 296 $(INC)machdefs.h pimsghandler.h picolist.h \ 276 297 picontainerx.h pisysdep.h picontainergen.h pievthandler.h pigraphx.h \ 277 pigraphgen.h picmap.h picmapx.h picmapgen.h pifontx.h pifontgen.h 298 pigraphgen.h picmap.h picmapx.h picmapgen.h pifontx.h pifontgen.h \ 299 pigrcoord.h pilineatt.h 278 300 $(OBJ)piwindowgen.o: piwindowgen.cc piwindowgen.h pisysdep.h \ 279 301 $(INC)machdefs.h picontainerx.h \ 280 302 picontainergen.h piwdgx.h piwdggen.h pimsghandler.h picolist.h \ 281 303 psfile.h pifontgen.h pigraphgen.h picmap.h picmapx.h picmapgen.h \ 282 pifontx.h 304 pifontx.h pigrcoord.h pilineatt.h 283 305 $(OBJ)piwindowx.o: piwindowx.cc piwindowx.h piwindowgen.h pisysdep.h \ 284 306 $(INC)machdefs.h picontainerx.h \ … … 287 309 $(INC)machdefs.h pibwdggen.h piwdgx.h \ 288 310 piwdggen.h pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h \ 289 pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigr aphuc.h \290 pi evthandler.h psfile.h pigraphps.h pixtbase.h311 pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h pilineatt.h \ 312 pigraphuc.h pievthandler.h psfile.h pigraphps.h pixtbase.h 291 313 $(OBJ)piyfxdrw.o: piyfxdrw.cc $(INC)machdefs.h \ 292 314 piyfxdrw.h pisysdep.h parradapter.h lut.h pidrawer.h pibwdggen.h \ 293 315 piwdgx.h piwdggen.h pimsghandler.h picolist.h picmap.h picmapx.h \ 294 picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigr aphuc.h \295 pi evthandler.h psfile.h pigratt.h piaxes.h316 picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h \ 317 pilineatt.h pigraphuc.h pievthandler.h psfile.h pigratt.h piaxes.h 296 318 $(OBJ)psfile.o: psfile.cc psfile.h $(INC)machdefs.h \ 297 319 pisysdep.h pifontgen.h pigraphgen.h piwdgx.h piwdggen.h \ 298 pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h pifontx.h 320 pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h pifontx.h \ 321 pigrcoord.h pilineatt.h -
trunk/SophyaPI/PI/Tests/pit1.cc
r1933 r2138 84 84 { 85 85 PIFontAtt att[4] = { PI_RomanFont, PI_BoldFont, PI_ItalicFont, PI_BoldItalicFont}; 86 PIFontSize fsz[4] = { PI_TinySizeFont, PI_SmallSizeFont, PI_NormalSizeFont, PI_ BigSizeFont};86 PIFontSize fsz[4] = { PI_TinySizeFont, PI_SmallSizeFont, PI_NormalSizeFont, PI_LargeSizeFont}; 87 87 PIMarker pmk[11] = { PI_DotMarker , PI_PlusMarker, PI_CrossMarker, 88 88 PI_CircleMarker, PI_FCircleMarker, -
trunk/SophyaPI/PI/Tests/pitgr.cc
r1908 r2138 26 26 27 27 #include "pisurfdr.h" 28 #include "pi3dwdg.h" 28 29 29 30 -
trunk/SophyaPI/PI/Tests/xp3.cc
r1933 r2138 26 26 #include "piyfxdrw.h" 27 27 28 #include "pi3dwdg.h" 28 29 29 30 // ---------- classe PITApp ----------------------- -
trunk/SophyaPI/PI/objlist.list
r2080 r2138 2 2 parradapter.o 3 3 pi3ddrw.o 4 pi3dwdg.o 4 5 piapplgen.o 5 6 piapplx.o … … 30 31 pigraphx.o 31 32 pigratt.o 33 pigrcoord.o 32 34 piimage.o 33 35 piimgtools.o 36 pilineatt.o 34 37 pilistgen.o 35 38 pilistx.o -
trunk/SophyaPI/PI/pi3ddrw.cc
r1914 r2138 1 1 // Module PI : Peida Interactive PIDrawer3D PIDraw3DWdg 2 // Drawer et DrawWidget 3DR. Ansari 06/982 // Drawer 3D R. Ansari 06/98 3 3 // LAL (Orsay) / IN2P3-CNRS DAPNIA/SPP (Saclay) / CEA 4 4 … … 8 8 9 9 #include "pi3ddrw.h" 10 #include "pidrwtools.h"11 10 12 11 … … 37 36 //++ 38 37 // PIDrawer3D() 39 // Co sntructeur38 // Constructeur 40 39 // void Set3DView_Obs(double xo, double yo, double zo, double teta, double phi, double psi, - 41 40 // double dax, double day, double co, double dco=0.2) … … 222 221 } 223 222 224 // ......................................................................225 // ....................... Classe PIDraw3DWdg ..........................226 // ......................................................................227 228 //++229 // Class PIDraw3DWdg230 // Lib PI231 // include pi3ddrw.h232 //233 // Classe pour la l'affichage et la manipulation d'un ensemble234 // de *Drawer3D* avec la gestion de zoom, rotation, déplacement235 // d'objet.236 // * Bouton-1 : Envoie le message "PIMsg_Active".237 // * Bouton-2 : Permet de faire tourner l'observateur (caméra)238 // autour de l'objet.239 // * Shift-Bouton-2 : Permet de tourner l'objet en maintenant240 // la caméra fixe. Cette fonction peut-être réalisée sans le shift241 // à partir du centre de l'objet, en l'ayant préalablement activée242 // par <Alt>S.243 // * Bouton-3 : Gestion de zoom (On approche/ éloigne la caméra, ou244 // on change l'angle d'ouverture)245 //246 // Gestion du clavier :247 // * <Alt>G : Affichage d'une fenêtre de changement des attributs graphiques248 // * <Alt>O : Action identique a <Alt>G249 // * <Alt>V : Copier/*Coller* Ajout du texte du buffer copier/coller250 // sur l'objet à la position courante de la souris251 // * <Alt>Z : Supprime les textes et signes ajoutés au dessin.252 // * <Alt>A : Active/desactive l'affichage des axes253 // * <Alt>R : Reinitialise la vue 3D (vue par défaut) et rafraichit le dessin.254 // * <Alt>S : Active/desactive le mode de rotation d'objet sans Shift255 //256 //--257 //++258 // Links Parents259 // PIBaseWdg260 //--261 //++262 // Links Voir aussi263 // PIDrawer3D264 //--265 266 //++267 // Titre Constructeur, méthodes268 //--269 //++270 // PIDraw3DWdg(PIContainerGen *par, const char *nom, int sx=100, int sy=100, int px=0, int py=0)271 // Constructeur272 // long kind()273 // Renvoie le type de l'objet ("=PIDraw3DWdg::ClassId")274 // int AddDrawer3D(PIDrawer3D*, bool ad=false)275 // Ajoute un Drawer3D276 //--277 278 /* --Methode-- */279 PIDraw3DWdg::PIDraw3DWdg(PIContainerGen *par, const char *nom, int sx, int sy, int px, int py)280 : PIBaseWdg(par, nom, sx, sy, px, py)281 {282 vfixed = false;283 // SetDefaultDrawRectangle(0.12, 0.12, 0.88, 0.88, true);284 SetDefaultDrawRectangle(0., 0., 1., 1., true);285 mBDrw = new PIElDrawer;286 mBDrw->SetLimits(0.12,0.88, 0.12,0.88, kAxeDirLtoR,kAxeDirDownUp);287 AddDrawer(mBDrw, 0.12, 0.12, 0.88, 0.88, true, false, false);288 mPx = mPy = 0;289 290 lPx = lPy = 0;291 lCol = PI_Black;292 cTeta = cPhi = 0.; cUlen = 1.;293 294 ActivateKeyboard();295 ActivateButton(2); // Pour pouvoir tourner la camera296 ActivateMove(2);297 ActivateButton(3); // Pour deplacer la camera le long de son axe298 ActivateMove(3);299 ActivateButton(1);300 301 mGr3d = new PIGraphic3D(mWGrC, 0, 0, sx, sy);302 rOfg = false;303 axfg = true;304 skcfg = false;305 }306 307 /* --Methode-- */308 PIDraw3DWdg::~PIDraw3DWdg()309 {310 delete mBDrw;311 delete mGr3d;312 }313 314 /* --Methode-- */315 void PIDraw3DWdg::Set3DView_Obs(double xo, double yo, double zo, double teta, double phi, double psi,316 double dax, double day, double co, double dco)317 {318 mGr3d->Set3DCS_Obs(xo, yo, zo, teta, phi, psi, dax, day, co, dco);319 list<int>::iterator it;320 for(it = m3DrIl.begin(); it != m3DrIl.end(); it++)321 #if defined(CC_HAS_RTTI_SUPPORT)322 (dynamic_cast<PIDrawer3D*>(GetDrawerId(*it)))->Set3DView_Obs(xo, yo, zo, teta, phi, psi, dax, day, co, dco);323 #else324 ((PIDrawer3D*)(GetDrawerId(*it)))->Set3DView_Obs(xo, yo, zo, teta, phi, psi, dax, day, co, dco);325 #endif326 vfixed = true;327 }328 329 /* --Methode-- */330 void PIDraw3DWdg::Set3DView(double xc, double yc, double zc, double xo, double yo, double zo,331 double dax, double day, double dco, double psi)332 {333 mGr3d->Set3DCS(xc, yc, zc, xo, yo, zo, dax, day, dco, psi);334 list<int>::iterator it;335 for(it = m3DrIl.begin(); it != m3DrIl.end(); it++)336 #if defined(CC_HAS_RTTI_SUPPORT)337 (dynamic_cast<PIDrawer3D*>(GetDrawerId(*it)))->Set3DView(xc, yc, zc, xo, yo, zo, dax, day, dco, psi);338 #else339 ((PIDrawer3D*)(GetDrawerId(*it)))->Set3DView(xc, yc, zc, xo, yo, zo, dax, day, dco, psi);340 #endif341 vfixed = true;342 }343 344 /* --Methode-- */345 bool PIDraw3DWdg::Get3DView(double& xc, double& yc, double& zc, double& xo, double& yo, double& zo,346 double& teta, double& phi, double& psi, double& dax, double& day, double& co, double& dco)347 {348 return(mGr3d->Get3DCS(xc, yc, zc, xo, yo, zo, teta, phi, psi, dax, day, co, dco));349 }350 351 352 /* --Methode-- */353 void PIDraw3DWdg::Update3DView()354 {355 list<int>::iterator it = m3DrIl.begin();356 if (it == m3DrIl.end()) return;357 #if defined(CC_HAS_RTTI_SUPPORT)358 PIDrawer3D* dr3 = dynamic_cast<PIDrawer3D*>(GetDrawerId(*it));359 #else360 PIDrawer3D* dr3 = (PIDrawer3D*)(GetDrawerId(*it));361 #endif362 if (dr3 == NULL) return;363 dr3->UpdateLimits();364 double xo, yo, zo, xc, yc, zc, teta, phi, psi, dax, day, co, dco;365 bool vobs;366 vobs = dr3->Get3DView(xc, yc, zc, xo, yo, zo, teta, phi, psi, dax, day, co, dco);367 if (vobs) Set3DView_Obs(xo, yo, zo, teta, phi, psi, dax, day, co, dco);368 else Set3DView(xc, yc, zc, xo, yo, zo, dax, day, dco, psi);369 Refresh();370 }371 372 /* --Methode-- */373 int PIDraw3DWdg::DecodeOptionString(vector<string> & opt, bool rmdecopt)374 {375 // AFAIRE - Reza 01/03/2002376 return(0);377 }378 379 380 /* --Methode-- */381 void PIDraw3DWdg::SetDrawers3DView()382 {383 double xc, yc, zc, xo, yo, zo;384 double teta, phi, psi;385 double dax, day, co, dco;386 bool vo;387 vo = mGr3d->Get3DCS( xc, yc, zc, xo, yo, zo, teta, phi, psi, dax, day, co, dco);388 list<int>::iterator it;389 390 #if defined(CC_HAS_RTTI_SUPPORT)391 if (vo) for(it = m3DrIl.begin(); it != m3DrIl.end(); it++)392 (dynamic_cast<PIDrawer3D*>(GetDrawerId(*it)))->Set3DView_Obs(xo, yo, zo, teta, phi, psi, dax, day, co, dco);393 else for(it = m3DrIl.begin(); it != m3DrIl.end(); it++)394 (dynamic_cast<PIDrawer3D*>(GetDrawerId(*it)))->Set3DView(xc, yc, zc, xo, yo, zo, dax, day, dco, psi);395 #else396 if (vo) for(it = m3DrIl.begin(); it != m3DrIl.end(); it++)397 ((PIDrawer3D*)(GetDrawerId(*it)))->Set3DView_Obs(xo, yo, zo, teta, phi, psi, dax, day, co, dco);398 else for(it = m3DrIl.begin(); it != m3DrIl.end(); it++)399 ((PIDrawer3D*)(GetDrawerId(*it)))->Set3DView(xc, yc, zc, xo, yo, zo, dax, day, dco, psi);400 #endif401 402 }403 404 /* --Methode-- */405 int PIDraw3DWdg::AddDrawer3D(PIDrawer3D* dr3, bool ad)406 {407 if (!vfixed) {408 dr3->UpdateLimits();409 double xo, yo, zo, xc, yc, zc, teta, phi, psi, dax, day, co, dco;410 bool vobs;411 vobs = dr3->Get3DView(xc, yc, zc, xo, yo, zo, teta, phi, psi, dax, day, co, dco);412 if (vobs) Set3DView_Obs(xo, yo, zo, teta, phi, psi, dax, day, co, dco);413 else Set3DView(xc, yc, zc, xo, yo, zo, dax, day, dco, psi);414 }415 else {416 double xc, yc, zc, xo, yo, zo, teta, phi, psi, dax, day, co, dco;417 if ( Get3DView(xc, yc, zc, xo, yo, zo, teta, phi, psi, dax, day, co, dco) )418 dr3->Set3DView_Obs(xo, yo, zo, teta, phi, psi, dax, day, co, dco);419 else dr3->Set3DView(xc, yc, zc, xo, yo, zo, dax, day, co, psi);420 }421 int id = AddDrawer(dr3, false, false, ad);422 if (m3DrIl.size() == 0) dr3->SetAxesFlags(kStdAxes);423 else dr3->SetAxesFlags(kAxesNone);424 m3DrIl.push_back(id);425 return(id);426 }427 428 /* --Methode-- */429 void PIDraw3DWdg::RemoveDrawer(int id)430 {431 list<int>::iterator it;432 for(it = m3DrIl.begin(); it != m3DrIl.end(); it++)433 if ( (*it) == id ) { m3DrIl.erase(it); break; }434 PIBaseWdg::RemoveDrawer(id);435 }436 437 /* --Methode-- */438 void PIDraw3DWdg::DeleteDrawers()439 {440 m3DrIl.erase(m3DrIl.begin(), m3DrIl.end());441 PIBaseWdg::DeleteDrawers();442 }443 444 /* --Methode-- */445 void PIDraw3DWdg::Keyboard(int key, PIKeyModifier kmod)446 {447 if (kmod == PIKM_Alt) {448 if (key == 'V' || key == 'v') RequestSelection(); // Pour coller (copier/coller)449 else if (key == 'Z' || key == 'z') { mBDrw->ElDelAll(); Refresh(); } // Pour supprimer tous les signes450 else if (key == 'O' || key == 'o') { // fenetre des options de controle du drawer actif451 PIDrawer* actdrw = GetActiveDrawer();452 if (actdrw != NULL) actdrw->ShowControlWindow(this);453 }454 else if (key == 'G' || key == 'g') // Fenetre des options graphiques de trace455 PIDrwTools::ShowPIDrwTools(this);456 457 else if (key == 'A' || key == 'a') { // On affiche ou on enleve les axes458 axfg = !axfg;459 list<int>::iterator it;460 if (axfg)461 for(it = m3DrIl.begin(); it != m3DrIl.end(); it++)462 GetDrawerId(*it)->SetAxesFlags(kAxesNone);463 else {464 it = m3DrIl.begin();465 if (it != m3DrIl.end()) GetDrawerId(*it)->SetAxesFlags(kStdAxes);466 }467 Refresh();468 }469 // <Alt>S active la sensibilite de la zone centrale pour tourner l'objet470 else if (key == 'S' || key == 's') skcfg = !skcfg;471 else if (key == 'R' || key == 'r') Update3DView();472 }473 }474 475 /* --Methode-- */476 void PIDraw3DWdg::PasteSelection(unsigned int typ, void *pdata, unsigned int l)477 {478 if (typ != PICP_string) return;479 int ll = (l<256) ? l+1 : 256;480 char pc[256];481 strncpy(pc, (char*)pdata, ll-1); pc[ll-1] = '\0';482 // printf("PIDraw3DWdg::PasteSelection() / Debug %s - %d %d -> %g %g \n", pc,483 // mPx, mPy, (double)mPx/(double)XSize(), 1.-(double)mPy/(double)YSize());484 mBDrw->ElAddText((double)mPx/(double)XSize(), 1.-(double)mPy/(double)YSize(), pc );485 mBDrw->Refresh();486 }487 488 /* --Methode-- */489 void PIDraw3DWdg::But2Press(int x, int y)490 {491 mGr3d->SetBaseGraphic(mWGrC, 0, 0, XSize(), YSize());492 double xo, yo, zo;493 double teta, phi, psi;494 double dax, day, co, dco;495 mGr3d->Get3DCS(cXc, cYc, cZc, xo, yo, zo, teta, phi, psi, dax, day, co, dco);496 // puts("\n PIDraw3DWdg::But2Press() ");497 // mGr3d->PrintCS();498 lPx = x; lPy = y;499 500 // Pour savoir si on se trouve ds la zone centrale501 int czx = XSize()/10;502 int czy = YSize()/10;503 PIKeyModifier kmod;504 unsigned long tm;505 GetLastEventInfo(kmod, tm);506 rOfg = false;507 if (kmod == PIKM_Shift) rOfg = true;508 else if (skcfg) {509 int dmix = x-XSize()/2;510 int dmiy = y-YSize()/2;511 if (dmix < 0) dmix = -dmix;512 if (dmiy < 0) dmiy = -dmiy;513 if ((dmix < czx) && (dmiy < czy)) rOfg = true;514 }515 516 cUlen = 0.5*(dax+day)*co*0.3; cDax = dax; cDay = day; clCO = co;517 cTeta = teta; cPhi = phi;518 SelPointerShape(PI_TDLRArrowPointer);519 lCol = mWGrC->GetForeground();520 // mWGrC->SelForeground(GetBackgroundColor());521 mWGrC->SelForeground(PI_Magenta);522 /*523 {524 char buff[256];525 sprintf(buff, "But2Press() C=%g %g %g T,P=%g %g ", xc, yc, zc, cTeta, cPhi);526 mWGrC->DrawOpaqueString(0,20,buff);527 }528 */529 DrawXYZAxes();530 if (rOfg) { czx /= 2; czy /= 2; mWGrC->DrawBox(XSize()/2-czx, YSize()/2-czy, czx*2, czy*2); }531 532 Send(Msg(), PIMsg_Active);533 PIDrwTools::SetCurrentBaseWdg(this);534 }535 536 /* --Methode-- */537 void PIDraw3DWdg::Ptr2Move(int x, int y)538 {539 DrawXYZAxes();540 double teta, phi;541 542 if (rOfg) {543 phi = cPhi + (M_PI*0.25*(double)(x-lPx)/XSize());544 teta = cTeta - (M_PI*0.25*(double)(y-lPy)/YSize());545 mGr3d->RotateObject(teta, phi, false);546 }547 else {548 phi = cPhi - (M_PI*0.5*(double)(x-lPx)/XSize());549 teta = cTeta + (M_PI*0.5*(double)(y-lPy)/YSize());550 mGr3d->RotateObserver(teta, phi, 0., false);551 }552 /* {553 char buff[256];554 sprintf(buff, "Ptr2Move() T,P=%g %g -> %g %g ", cTeta, cPhi, teta, phi);555 mWGrC->DrawOpaqueString(0,20,buff);556 }557 */558 DrawXYZAxes();559 }560 561 562 /* --Methode-- */563 void PIDraw3DWdg::But2Release(int x, int y)564 {565 DrawXYZAxes();566 if (rOfg) {567 int czx = XSize()/20;568 int czy = YSize()/20;569 mWGrC->DrawBox(XSize()/2-czx, YSize()/2-czy, czx*2, czy*2);570 }571 572 // puts("\n PIDraw3DWdg::But2Release()");573 // mGr3d->PrintCS();574 SelPointerShape(PI_ArrowPointer);575 mWGrC->SelForeground(lCol);576 SetDrawers3DView();577 Refresh();578 }579 580 581 /* --Methode-- */582 void PIDraw3DWdg::But3Press(int x, int y)583 {584 double xo, yo, zo;585 double teta, phi, psi;586 double dax, day, co, dco;587 mGr3d->Get3DCS(cXc, cYc, cZc, xo, yo, zo, teta, phi, psi, dax, day, co, dco);588 mGr3d->SetBaseGraphic(mWGrC, 0, 0, XSize(), YSize());589 lPx = x; lPy = y;590 cUlen = 0.5*(dax+day)*co*0.3; cDax = dax; cDay = day; clCO = co;591 cTeta = teta; cPhi = phi;592 SelPointerShape(PI_TDLRArrowPointer);593 lCol = mWGrC->GetForeground();594 // mWGrC->SelForeground(GetBackgroundColor());595 mWGrC->SelForeground(PI_Magenta);596 /*597 {598 char buff[256];599 sprintf(buff, "But3Press() C=%g %g %g O= %g %g %g L= %g ", xc, yc, zc, xo, yo, zo, co);600 mWGrC->DrawOpaqueString(0,20,buff);601 }602 */603 DrawXYZAxes();604 Send(Msg(), PIMsg_Active);605 PIDrwTools::SetCurrentBaseWdg(this);606 }607 608 /* --Methode-- */609 void PIDraw3DWdg::Ptr3Move(int x, int y)610 {611 DrawXYZAxes();612 double rapx = (double)(lPx-x)/XSize();613 if (rapx > 0.) rapx = rapx*2.+1;614 else rapx += 1.;615 if (rapx < 0.3) rapx = 0.3;616 if (rapx > 3.) rapx = 3.;617 double rapy = (double)(y-lPy)/YSize();618 if (rapy > 0.) rapy = rapy*2.+1;619 else rapy += 1.;620 if (rapy < 0.3) rapy = 0.3;621 if (rapy > 3.) rapy = 3.;622 /*623 {624 char buff[256];625 sprintf(buff, "Ptr3Move() Rap=%g %g -> %g %g %g ", rapx, rapy, rapy*clCO, rapx*cDax, rapx*cDay);626 mWGrC->DrawOpaqueString(0,20,buff);627 }628 */629 mGr3d->ZoomInOut(rapy*clCO, rapx*cDax, rapx*cDay, false);630 DrawXYZAxes();631 }632 633 /* --Methode-- */634 void PIDraw3DWdg::But3Release(int x, int y)635 {636 DrawXYZAxes();637 SelPointerShape(PI_ArrowPointer);638 mWGrC->SelForeground(lCol);639 SetDrawers3DView();640 Refresh();641 }642 643 644 /* --Methode-- */645 void PIDraw3DWdg::DrawXYZAxes()646 {647 mWGrC->SelGOMode(PI_GOXOR);648 PIGrCoord x1,y1,z1,x2,y2,z2;649 x1 = cXc; y1 = cYc; z1 = cZc;650 x2 = cXc+cUlen; y2 = cYc; z2 = cZc;651 mGr3d->DrawLine3D(x1, y1, z1, x2, y2, z2);652 x2 = cXc+cUlen*1.1;653 mGr3d->DrawString3D(x2, y2, z2, "X");654 x2 = cXc; y2 = cYc+cUlen; z2 = cZc;655 mGr3d->DrawLine3D(x1, y1, z1, x2, y2, z2);656 y2 = cYc+cUlen*1.1;657 mGr3d->DrawString3D(x2, y2, z2, "Y");658 x2 = cXc; y2 = cYc; z2 = cZc+cUlen;659 mGr3d->DrawLine3D(x1, y1, z1, x2, y2, z2);660 z2 = cZc+cUlen*1.1;661 mGr3d->DrawString3D(x2, y2, z2, "Z");662 // mGr3d->DrawCircle(0., 0., daxO*0.30);663 char buff[256];664 double xc,yc,zc,xo,yo,zo,teta,phi,psi,dax,day,co,dco;665 mGr3d->Get3DCS(xc,yc,zc,xo,yo,zo,teta,phi,psi,dax,day,co,dco);666 sprintf(buff, " C: %g %g %g -> O: %g %g %g (T/P0= %g %g) ", xc,yc,zc, xo, yo, zo, cTeta, cPhi);667 mWGrC->DrawString(0,20,buff);668 sprintf(buff, " T,P= %g %g %g lCO= %g dax= %g %g UL=%g ", teta,phi,psi,co,dax,day,cUlen);669 mWGrC->DrawString(0,40,buff);670 mWGrC->SelGOMode(PI_GOCopy);671 672 }673 674 675 /* --Methode-- */676 void PIDraw3DWdg::But1Press(int x, int y)677 {678 Send(Msg(), PIMsg_Active);679 PIDrwTools::SetCurrentBaseWdg(this);680 mPx = x; mPy = y;681 if ( (x > 50) || ( y > 50) ) return;682 Update3DView();683 }684 685 /* Pour debugger sur bouton-3686 static int isw = 0;687 void PIDraw3DWdg::But3Press(int x, int y)688 x -= XSize()/2;689 y -= YSize()/2;690 691 double fx = (double)x/XSize();692 double fy = (double)y/YSize();693 if ( (fx<0.2) && (fx>-0.2) && (fy<0.2) && (fy>-0.2) ) {694 695 if ((isw%3) == 0) {696 Set3DView(0., 0., 0., 0., 0., -3. , 0.3, 0.3, 2);697 puts("\n Set3DView(0., 0., 0., 0., 0., -3. , 0.3, 0.3, 2)");698 }699 else if ((isw%3) == 1) {700 Set3DView(0., 0., 0., 2., 1., 3. , 0.3, 0.3, 2);701 puts("\n Set3DView(0., 0., 0., 2., 1., 3. , 0.3, 0.3, 2)");702 }703 else if ((isw%3) == 2) {704 Set3DView_Obs(0.,4.,0.,3.14159/2.,-3.14159/2.,0.,0.25,0.25,4.,2.);705 puts("\n Set3DView_Obs(0.,4.,0.,3.14159/2.,3.14159/2.,0.,0.25,0.25,4.,2.)");706 }707 isw++;708 mGr3d->PrintCS();709 double xc,yc,zc,xo,yo,zo,teta,phi,psi,dax,day,co,dco;710 mGr3d->Get3DCS(xc,yc,zc,xo,yo,zo,teta,phi,psi,dax,day,co,dco);711 mGr3d->Set3DCS(xc,yc,zc,xo,yo,zo,dax,day,dco,psi);712 mGr3d->PrintCS();713 mGr3d->Set3DCS_Obs(xo,yo,zo,teta,phi,psi,dax,day,co,dco);714 mGr3d->PrintCS();715 puts(" --------------------- \n");716 Refresh();717 return;718 }719 if ((x > 0) && (y > 0) ) {720 puts(" But3Press()Set3DView(0., 0., 0., 5., 0., 0. , 0.3, 0.3, 2)");721 Set3DView(0., 0., 0., 5., 0., 0. , 0.3, 0.3, 2);722 }723 else if ((x < 0) && (y > 0) ) {724 puts(" But3Press()Set3DView(0., 0., 0., 0., 5., 1. , 0.3, 0.3, 2) ");725 Set3DView(0., 0., 0., 0., 5., 1. , 0.3, 0.3, 2);726 }727 else if ((x < 0) && (y < 0) ) {728 puts(" But3Press()Set3DView(0., 0., 0., 1., 1., 5. , 0.3, 0.3, 2)");729 Set3DView(0., 0., 0., 1., 1., 5. , 0.3, 0.3, 2);730 }731 else {732 puts(" But3Press()Set3DView(0., 0., 0., -3., -3., 3. , 0.3, 0.3, 2)");733 Set3DView(0., 0., 0., -3., -3., 3. , 0.3, 0.3, 2);734 }735 736 Refresh();737 */ -
trunk/SophyaPI/PI/pi3ddrw.h
r1914 r2138 1 1 // This may look like C code, but it is really -*- C++ -*- 2 2 // Module PI : Peida Interactive PIDrawer3D PIDraw3DWdg 3 // Drawer et DrawWidget 3DR. Ansari 06/983 // Drawer 3D R. Ansari 06/98 4 4 // LAL (Orsay) / IN2P3-CNRS DAPNIA/SPP (Saclay) / CEA 5 5 … … 12 12 #include "pigraph3d.h" 13 13 14 #include PIBWDG_H15 14 16 15 … … 57 56 58 57 59 //------------------------------ Classe PIDrawer3D --------------------60 61 class PIDraw3DWdg : public PIBaseWdg {62 public:63 enum {ClassId = 5500};64 65 PIDraw3DWdg(PIContainerGen *par, const char *nom,66 int sx=100, int sy=100, int px=0, int py=0);67 virtual ~PIDraw3DWdg();68 virtual long kind() {return ClassId; }69 70 71 virtual void Set3DView_Obs(double xo, double yo, double zo, double teta, double phi, double psi,72 double dax, double day, double co, double dco=0.2);73 virtual void Set3DView(double xc, double yc, double zc, double xo, double yo, double zo,74 double dax, double day, double dco=0.2, double psi=0.);75 bool Get3DView(double& xc, double& yc, double& zc, double& xo, double& yo, double& zo,76 double& teta, double& phi, double& psi, double& dax, double& day, double& co, double& dco);77 78 virtual void Update3DView(); // Vue 3-D a partir de Drawer No 179 80 inline void SetTitles(const char* tt=NULL, const char* tb=NULL)81 { mBDrw->SetTitles(tt, tb); }82 inline void SetTitles(string const & tt, string const & tb)83 { mBDrw->SetTitles(tt, tb); }84 inline PIElDrawer* BaseDrawer() { return mBDrw; };85 86 // Methode permettant de decoder des options a partir de chaines87 virtual int DecodeOptionString(vector<string> & opt, bool rmdecopt=true);88 89 // Ajoute un Drawer90 int AddDrawer3D(PIDrawer3D*, bool ad=false);91 92 // Pour tenir trace des Drawers-3D qui sont detruits93 virtual void RemoveDrawer(int id);94 virtual void DeleteDrawers();95 96 virtual void But1Press(int x, int y);97 98 virtual void But2Press(int x, int y);99 virtual void But2Release(int x, int y);100 virtual void Ptr2Move(int x, int y);101 102 virtual void But3Press(int x, int y);103 virtual void But3Release(int x, int y);104 virtual void Ptr3Move(int x, int y);105 106 virtual void Keyboard(int key, PIKeyModifier kmod);107 virtual void PasteSelection(unsigned int typ, void *pdata, unsigned int l);108 109 110 protected :111 virtual void SetDrawers3DView();112 virtual void DrawXYZAxes();113 114 PIElDrawer* mBDrw; // Objet traceur d'elements de fond115 int mPx, mPy; // Position pointeur - Bouton-1116 117 bool vfixed; // SetView fait ou pas118 list<int> m3DrIl; // Liste des Id drawers 3D119 PIGraphic3D* mGr3d; // PIGraphic3D courante120 int lPx, lPy; // dernier position pointeur121 PIColors lCol; // Couleur122 double cTeta, cPhi, cUlen; // Pour garder valeurs avant rotation, Unite de longeur123 double cXc, cYc, cZc; // Pour garder position du centre de champ124 double clCO, cDax, cDay; // Pour garder les valeurs avant Zoom In/Out125 bool rOfg; // si Vrai on fait tourner l'objet et pas la camera126 bool axfg; // si Vrai on trace les axes127 bool skcfg; // si Vrai click-2 au centre -> rotation objet128 };129 58 130 59 #endif -
trunk/SophyaPI/PI/piaxes.cc
r2122 r2138 11 11 #include "piaxes.h" 12 12 13 //++ 14 // Class PIAxes 15 // Lib PI 16 // include piaxes.h 17 // 18 // Classe gestionnaire de tracé d'axes. A utiliser dans 19 // un objet PIDrawer. 20 //-- 21 //++ 22 // Links Voir 23 // PIDrawer 24 //-- 25 26 //++ 27 // Titre Constructeurs et méthodes 28 //-- 29 30 13 31 inline void dble_SWAP(double& a,double& b) {double tmp=a; a=b; b=tmp;} 14 32 33 //++ 34 // PIAxes() 35 // Constructeur. 36 //-- 37 15 38 /* --Methode-- */ 16 39 PIAxes::PIAxes() … … 22 45 { 23 46 } 47 48 //++ 49 // void DrawXYAxes(PIGraphicUC* g, PIGraphicAtt& gratt, unsigned int flags, bool afsz) 50 // Trace les axes en utilisant les limites de l'objet PIGraphicUC. 51 // "flags" spécifie les attributs d'axes. Constantes prédéfinies: 52 //| kStdAxes : Axes passant par le centre 53 //| kBoxAxes : Axes entourant le tracé 54 //| kIntTicks, kExtTicks 55 //| kMajTicks, kMinTicks 56 //| kAxesDflt = kStdAxes | kTicks | kLabels 57 //| kGridOn, kAxesNone 58 // Si "afsz == true", la taille de fonte est choisie automatiquement. 59 // void DrawXYAxes(PIGraphicUC* g, PIGraphicAtt& gratt, unsigned int flags, bool afsz, \ 60 // double xmin, double xmax, double ymin, double ymax) 61 // Tracé d'axes avec spécification des limites d'axes. 62 //-- 24 63 25 64 /* --Methode-- */ -
trunk/SophyaPI/PI/pidrwtools.cc
r1936 r2138 8 8 #include <iostream.h> 9 9 #include "piscdrawwdg.h" 10 #include "pi3d drw.h"10 #include "pi3dwdg.h" 11 11 12 12 //++ -
trunk/SophyaPI/PI/pigraphgen.cc
r1899 r2138 8 8 #include <math.h> 9 9 10 //++11 // Class PILineAtt12 // Lib PI13 // include pigraphgen.h14 //--15 16 /* --Methode-- */17 PILineAtt::PILineAtt(PILineTypes ltyp)18 {19 _lwidth = 2*8;20 _ldash=PI_LineSolid;21 _ljoincap = PI_JoinMiter*PI_CapButt*256;22 switch (ltyp) {23 case PI_NotDefLineAtt :24 _lwidth = 0; _ldash=PI_LineSolid;25 break;26 case PI_NormalLine :27 _lwidth = 2*8; _ldash=PI_LineSolid;28 break;29 case PI_ThinLine :30 _lwidth = 8; _ldash=PI_LineSolid;31 break;32 case PI_ThickLine :33 _lwidth = 8*4; _ldash=PI_LineSolid;34 break;35 case PI_DashedLine :36 _lwidth = 2*8; _ldash=PI_LineDashed;37 break;38 case PI_ThinDashedLine :39 _lwidth = 8; _ldash=PI_LineDashed;40 break;41 case PI_ThickDashedLine :42 _lwidth = 8*4; _ldash=PI_LineDashed;43 break;44 case PI_DottedLine :45 _lwidth = 2*8; _ldash=PI_LineDotted;46 break;47 case PI_ThinDottedLine :48 _lwidth = 8; _ldash=PI_LineDotted;49 break;50 case PI_ThickDottedLine :51 _lwidth = 8*4; _ldash=PI_LineDotted;52 break;53 case PI_DashDottedLine :54 _lwidth = 2*8; _ldash=PI_LineDashDotted;55 break;56 case PI_ThinDashDottedLine :57 _lwidth = 8; _ldash=PI_LineDashDotted;58 break;59 case PI_ThickDashDottedLine :60 _lwidth = 8*4; _ldash=PI_LineDashDotted;61 break;62 default :63 _lwidth = 0; _ldash=PI_LineSolid;64 break;65 66 }67 }68 10 69 11 //++ … … 84 26 // Links Voir aussi 85 27 // PIGrCoord 28 // PILineAtt 86 29 // PIFont 87 30 // PIColorMap … … 473 416 // Choix de la taille et du type de signe pour "DrawMarker() / DrawMarkers()" 474 417 //| PI_DotMarker , PI_PlusMarker , PI_CrossMarker 475 //| PI_CircleMarker , PI_FCircleMarker , PI_BoxMarker , PI_FBoxMarker 476 //| PI_TriangleMarker , PI_FTriangleMarker , PI_StarMarker , PI_FStarMarker 418 //| PI_CircleMarker , PI_FCircleMarker 419 //| PI_BoxMarker , PI_FBoxMarker 420 //| PI_TriangleMarker , PI_FTriangleMarker 421 //| PI_StarMarker , PI_FStarMarker 477 422 // (Les "StarMaker" ne sont pas encore implémentés 11/98) 478 423 //-- … … 645 590 646 591 647 648 //++649 // Class PIGrCoord650 // Lib PI651 // include pigraphgen.h652 //653 // Classe utilisé pour la spécifiaction de coordonnées graphique.654 // Des constructeurs et des méthodes de conversion à partir655 // et vers des "int", "float" et "double" sont définis.656 // La valeur entiere d'un objet PIGrCoord construite à partir657 // d'une valeur flottante (ou suite à une affectation) correpond658 // à l'entier le plus proche.659 //660 //| PIGrCoord gco = 3.14;661 //| int ic = gco; // ic -> 3662 //| float fc = gco; // fc -> 3.14663 //| gco = 1.1; // (int)gco -> 1664 //| gco = 1.6; // (int)gco -> 2665 //| gco = -0.4; // (int)gco -> 0666 //| gco = -0.7; // (int)gco -> -1667 //--668 //++669 // Links Voir aussi670 // PIGraphic671 //--672 673 //++674 // Titre Constructeurs675 //--676 //++677 //678 // PIGrCoord()679 // Constructeur par défaut ("intVal=floatVal=0")680 // PIGrCoord(int a)681 // Constructeur à partir de l'entier "a"682 // PIGrCoord(float a)683 // Constructeur à partir de la valeur flottante "a"684 // PIGrCoord(double a)685 // Constructeur à partir de la valeur flottante double précision "a"686 //--687 //++688 // Titre Opérateurs de conversion689 //--690 //++691 // operator int()692 // Conversion en entier "int"693 // operator short()694 // Conversion en entier "short"695 // operator unsigned int()696 // Conversion en entier non signé "unsigned int"697 // operator unsigned short()698 // Conversion en entier non signé "unsigned short"699 // operator float()700 // Conversion en réél "float"701 // operator double()702 // Conversion en réél "double"703 //--704 //++705 // Titre Opérateurs d'affectation706 //--707 //++708 // PIGrCoord& operator= (int a)709 // Affectation à partir de valeur entière "int"710 // PIGrCoord& operator= (float a)711 // Affectation à partir de valeur réélle "float"712 // PIGrCoord& operator= (double a)713 // Affectation à partir de valeur réélle double précision "double"714 //-- -
trunk/SophyaPI/PI/pigraphgen.h
r1899 r2138 14 14 15 15 #include "picolist.h" // enum PIColors 16 #include "pigrcoord.h" // Class PIGrCoord 16 17 17 // Line drawing attributes 18 enum PILineJoin { PI_JoinMiter=0, PI_JoinRound=1, PI_JoinBevel=2}; 19 enum PILineCap { PI_CapButt=0, PI_CapRound=1, PI_CapProjecting=2}; 20 enum PILineDash { PI_LineSolid, PI_LineDashed, PI_LineDotted, 21 PI_LineDashDotted}; 22 // Predefined line types 23 enum PILineTypes { PI_NotDefLineAtt, 24 PI_NormalLine, PI_ThinLine, PI_ThickLine, 25 PI_DashedLine, PI_ThinDashedLine, PI_ThickDashedLine, 26 PI_DottedLine, PI_ThinDottedLine, PI_ThickDottedLine, 27 PI_DashDottedLine, PI_ThinDashDottedLine, PI_ThickDashDottedLine}; 18 #include "pilineatt.h" // Class PILineAtt 19 28 20 29 21 // Marker types … … 63 55 64 56 65 // Classe pour gerer indifferement des coordonnees double ou int66 class PIGrCoord {67 public:68 inline PIGrCoord() { iv = 0; dv = 0.;}69 inline PIGrCoord(int a) { iv = a; dv = (double)a;}70 inline PIGrCoord(float a) { iv = (a>=0.)?(int)(a+0.5):(int)(a-0.5); dv = (double)a;}71 inline PIGrCoord(double a) { iv = (a>=0.)?(int)(a+0.5):(int)(a-0.5); dv = a;}72 inline PIGrCoord(PIGrCoord const & gc) { iv = gc.iv; dv = gc.dv; }73 inline operator int() { return(iv); }74 inline operator short() { return((short)iv); }75 inline operator unsigned int() { return((unsigned int)iv); }76 inline operator unsigned short() { return((unsigned short)iv); }77 inline operator float() { return((float)dv); }78 inline operator double() { return(dv); }79 inline PIGrCoord& operator= (int a) { iv = a; dv = (double)a; return(*this); }80 inline PIGrCoord& operator= (float a)81 { iv = (a>=0.)?(int)(a+0.5):(int)(a-0.5); dv = (double)a; return(*this); }82 inline PIGrCoord& operator= (double a)83 { iv = (a>=0.)?(int)(a+0.5):(int)(a-0.5); dv = a; return(*this); }84 inline PIGrCoord& operator= (PIGrCoord const & gc) { iv = gc.iv; dv = gc.dv; return(*this); }85 protected:86 int iv;87 double dv;88 };89 90 // Classe pour gerer les attributs de lignes91 class PILineAtt {92 public:93 explicit inline PILineAtt(int width=1, PILineDash dash=PI_LineSolid,94 PILineJoin join=PI_JoinMiter, PILineCap cap=PI_CapButt)95 {_lwidth = (width>0)?width*8:8; _ldash=dash; _ljoincap=join+cap*256; }96 explicit inline PILineAtt(double width, PILineDash dash=PI_LineSolid,97 PILineJoin join=PI_JoinMiter, PILineCap cap=PI_CapButt)98 { _lwidth = (width>0)?(unsigned short)(width*8.):8; _ldash=dash; _ljoincap=join+cap*256; }99 inline PILineAtt(PILineAtt const& b)100 { _lwidth=b._lwidth; _ldash=b._ldash; _ljoincap=b._ljoincap; }101 102 PILineAtt(PILineTypes ltyp);103 104 inline ~PILineAtt() {}105 106 inline PILineAtt& operator = (PILineAtt const& b)107 { _lwidth=b._lwidth; _ldash=b._ldash; _ljoincap=b._ljoincap; return(*this); }108 inline PILineAtt& operator = (PILineTypes ltyp)109 { *this=PILineAtt(ltyp); return(*this); }110 111 inline bool operator == (PILineAtt const& b) const112 { return ((_lwidth==b._lwidth)&&(_ldash==b._ldash)&&(_ljoincap==b._ljoincap)); }113 inline bool operator == (PILineTypes ltyp) const114 { return ((*this) == PILineAtt(ltyp)); }115 inline bool operator != (PILineAtt const& b) const116 { return ((_lwidth!=b._lwidth)||(_ldash!=b._ldash)||(_ljoincap!=b._ljoincap)); }117 inline bool operator != (PILineTypes ltyp) const118 { return ((*this) != PILineAtt(ltyp)); }119 120 inline int GetLineWidth() const { return ((_lwidth>0)?_lwidth/8:1); }121 inline int GetLineWidthx8() const { return (_lwidth); }122 inline double GetLineWidthD() const { return ((_lwidth>0)?(double)_lwidth/8.:1.); }123 inline PILineDash GetLineDash() const { return _ldash; }124 inline PILineJoin GetLineJoin() const { return (PILineJoin)(_ljoincap%256); }125 inline PILineCap GetLineCap() const { return (PILineCap)(_ljoincap/256); }126 127 inline void SetLineWidth(int lw) { _lwidth = lw*8; }128 inline void SetLineWidth(double lw) { _lwidth = (unsigned short)(lw*8.); }129 inline void SetLineDash(PILineDash ld) { _ldash = ld; }130 inline void SetLineJoin(PILineJoin lj) { _ljoincap = lj+(_ljoincap&0xFF00); }131 inline void SetLineCap(PILineCap lc) { _ljoincap = lc*256+(_ljoincap&0x00FF); }132 133 protected:134 unsigned short _lwidth; // en 1/8 de pixels (ou points)135 unsigned short _ljoincap;136 PILineDash _ldash;137 };138 57 139 58 // Les differents types de classes PIGraphic -
trunk/SophyaPI/PI/pigratt.cc
r1970 r2138 7 7 #include <stdio.h> 8 8 #include <map> 9 10 //++ 11 // Class PIGraphicAtt 12 // Lib PI 13 // include pigratt.h 14 // 15 // Classe gestionnaire des attributs graphiques. 16 // (couleur, marker, lignes, ...) 17 //-- 18 19 //++ 20 // Titre Constructeurs 21 //-- 22 //++ 23 // PIGraphicAtt() 24 // Constructeur - Initialisation de tous les attributs aux valeurs par défaut. 25 // PIGraphicAtt(PIGraphicAtt const & att) 26 // Constructeur de copie 27 // PIGraphicAtt(vector<string> & att, bool rmdecatt) 28 // Cosntructeur avec décodage des attributs à partir d'un vecteur de string 29 // "att". Si "rmdecatt == true", les attributs décodés sont supprimés du 30 // vecteur de départ. 31 //-- 9 32 10 33 PIGraphicAtt::PIGraphicAtt() … … 33 56 } 34 57 58 //++ 59 // Titre Méthodes 60 //-- 61 //++ 62 // void CopyFrom(PIGraphicAtt const & att) 63 // Copie les attributs à partir de l'objet "att". 64 // bool Compare(PIGraphicAtt const & att) 65 // Comparison de deux objets de type PIGraphicAtt. Renvoie "true" 66 // si attributs identiques. 67 // void SetDefaultAtt() 68 // Initialise les attributs aux valeurs par défaut. 69 // PIGraphicAtt& operator = (PIGraphicAtt const & att) 70 // Opérateur d'affectation. Appelle *CopyFrom()* 71 // bool operator == (PIGraphicAtt const & att) 72 // Opérateur d'égalité. Appelle *Compare()* 73 // bool operator != (PIGraphicAtt const & att) 74 // Opérateur d'inégalité. Appelle *Compare()* 75 // void UpdateFrom(PIGraphicAtt const & att) 76 // Met à jour les attributs initialisés à partir de l'objet "att". 77 // int DecodeAttStrings(vector<string> & att, bool rmdecatt=true) 78 // Décode les attributs à partir du vecteur de string "att". 79 // Si Si "rmdecatt == true", les attributs décodés sont supprimés du 80 // vecteur de départ. 81 //-- 35 82 36 83 void PIGraphicAtt::SetDefaultAtt() -
trunk/SophyaPI/PI/piversion.h
r2119 r2138 2 2 #define PIVERSION_H_SEEN 3 3 4 #define PI_VERSIONNUMBER 3. 754 #define PI_VERSIONNUMBER 3.80 5 5 6 6 #endif
Note:
See TracChangeset
for help on using the changeset viewer.