Changeset 2138 in Sophya


Ignore:
Timestamp:
Jul 29, 2002, 2:04:38 PM (23 years ago)
Author:
ansari
Message:

1/ Classes PILineAtt et PIGrCoord mises dans des fichiers separes

(pigraphgen.h .cc ---> pilineatt.h .cc pigrcoord.h .cc)

2/ Classe PIDraw3DWdg mis ds fichiers separes (pi3dwdg.h .cc)
3/ Mise a jour documentation
4/ Mise a jour programmes test et MAJ Makefile

Reza , 29/7/2002

Location:
trunk/SophyaPI/PI
Files:
6 added
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PI/Makefile

    r2080 r2138  
     1MODULECXXREPNAME := PI
     2MODULEDECCXXFLAGS := -msg_quiet
    13include ../Mgr/Makefile.h
    24 
    35all: $(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))
    98ifeq ($(CXX),cxx)
    109        $(CXX) $? $(CPPFLAGS) $(CXXFLAGS) -o $(OBJ)xx.x -Hf
     10endif
     11 
     12clean:
     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
     14ifeq ($(CXX),cxx)
     15        cd $(REPM); rm -f *.o
    1116endif
    1217 
     
    1722 $(INC)machdefs.h pidrawer.h pibwdggen.h \
    1823 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
    2536$(OBJ)piapplgen.o: piapplgen.cc piapplgen.h pimsghandler.h \
    2637 $(INC)machdefs.h pisysdep.h picontainerx.h \
     
    2839 pimenubargen.h pimenux.h pimenugen.h picons.h pistdwdgx.h \
    2940 pistdwdggen.h pibwdgx.h pibwdggen.h picmap.h picmapx.h picmapgen.h \
    30  pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigraphuc.h \
    31  pievthandler.h psfile.h pigraphps.h
     41 pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h pilineatt.h \
     42 pigraphuc.h pievthandler.h psfile.h pigraphps.h
    3243$(OBJ)piapplx.o: piapplx.cc piapplx.h piapplgen.h pimsghandler.h \
    3344 $(INC)machdefs.h pisysdep.h picontainerx.h \
     
    3546 pimenubargen.h pimenux.h pimenugen.h picons.h pistdwdgx.h \
    3647 pistdwdggen.h pibwdgx.h pibwdggen.h picmap.h picmapx.h picmapgen.h \
    37  pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigraphuc.h \
    38  pievthandler.h psfile.h pigraphps.h
     48 pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h pilineatt.h \
     49 pigraphuc.h pievthandler.h psfile.h pigraphps.h
    3950$(OBJ)piaxes.o: piaxes.cc $(INC)machdefs.h piaxes.h \
    4051 pigraphuc.h pisysdep.h pigraphgen.h piwdgx.h piwdggen.h \
    4152 pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h pifontx.h \
    42  pifontgen.h pigratt.h
     53 pifontgen.h pigrcoord.h pilineatt.h pigratt.h
    4354$(OBJ)piaxestools.o: piaxestools.cc piaxes.h pigraphuc.h pisysdep.h \
    4455 $(INC)machdefs.h pigraphgen.h piwdgx.h \
    4556 piwdggen.h pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h \
    46  pifontx.h pifontgen.h pigratt.h piaxestools.h pistdwdgx.h \
    47  pistdwdggen.h pioptmenux.h pioptmenugen.h pimenux.h pimenugen.h \
    48  piwindowx.h piwindowgen.h picontainerx.h picontainergen.h piapplx.h \
    49  piapplgen.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 \
    5061 pibwdggen.h pigraphx.h pievthandler.h psfile.h pigraphps.h \
    5162 piscdrawwdg.h pidrawer.h pieldrw.h
     
    5364 $(INC)machdefs.h piwdgx.h piwdggen.h \
    5465 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
    6072$(OBJ)pibwdgx.o: pibwdgx.cc pixtbaseP.h pibwdgx.h pisysdep.h \
    6173 $(INC)machdefs.h pibwdggen.h piwdgx.h \
    6274 piwdggen.h pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h \
    63  pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigraphuc.h \
    64  pievthandler.h psfile.h pigraphps.h pixtbase.h
     75 pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h pilineatt.h \
     76 pigraphuc.h pievthandler.h psfile.h pigraphps.h pixtbase.h
    6577$(OBJ)picmap.o: picmap.cc picmap.h pisysdep.h \
    6678 $(INC)machdefs.h picmapx.h picmapgen.h
     
    7082 $(INC)machdefs.h pibwdgx.h pibwdggen.h \
    7183 piwdgx.h piwdggen.h pimsghandler.h picolist.h picmap.h picmapx.h \
    72  picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigraphuc.h \
    73  pievthandler.h psfile.h pigraphps.h
     84 picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h \
     85 pilineatt.h pigraphuc.h pievthandler.h psfile.h pigraphps.h
    7486$(OBJ)picmapx.o: picmapx.cc piwdgx.h piwdggen.h \
    7587 $(INC)machdefs.h pimsghandler.h picolist.h \
     
    8092 pistdwdggen.h picontainerx.h picontainergen.h pibwdgx.h pibwdggen.h \
    8193 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
    8396$(OBJ)picontainergen.o: picontainergen.cc picontainergen.h pisysdep.h \
    8497 $(INC)machdefs.h piwdgx.h piwdggen.h \
     
    90103 pidrawer.h pibwdggen.h pisysdep.h piwdgx.h piwdggen.h pimsghandler.h \
    91104 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
    97111$(OBJ)pidrawwin.o: pidrawwin.cc pidrawwin.h pisysdep.h \
    98112 $(INC)machdefs.h piwindowx.h piwindowgen.h \
    99113 picontainerx.h picontainergen.h piwdgx.h piwdggen.h pimsghandler.h \
    100114 picolist.h piscdrawwdg.h pibwdgx.h pibwdggen.h picmap.h picmapx.h \
    101  picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigraphuc.h \
    102  pievthandler.h psfile.h pigraphps.h pistdwdgx.h pistdwdggen.h \
    103  pidrawer.h pigratt.h piaxes.h pieldrw.h
     115 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
    104118$(OBJ)pidrwtools.o: pidrwtools.cc pidrwtools.h pisysdep.h \
    105119 $(INC)machdefs.h pistdwdgx.h pistdwdggen.h \
     
    108122 picontainerx.h picontainergen.h piapplx.h piapplgen.h pimenubarx.h \
    109123 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
    113128$(OBJ)pieldrw.o: pieldrw.cc $(INC)machdefs.h \
    114129 pieldrw.h pidrawer.h pibwdggen.h pisysdep.h piwdgx.h piwdggen.h \
    115130 pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h pigraphx.h \
    116  pigraphgen.h pifontx.h pifontgen.h pigraphuc.h pievthandler.h \
    117  psfile.h pigratt.h piaxes.h
     131 pigraphgen.h pifontx.h pifontgen.h pigrcoord.h pilineatt.h \
     132 pigraphuc.h pievthandler.h psfile.h pigratt.h piaxes.h
    118133$(OBJ)pievthandler.o: pievthandler.cc pievthandler.h pisysdep.h \
    119134 $(INC)machdefs.h pimsghandler.h piwdgx.h \
    120135 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
    122137$(OBJ)pifilechogen.o: pifilechogen.cc pifilechogen.h pisysdep.h \
    123138 $(INC)machdefs.h piwdgx.h piwdggen.h \
     
    128143 picolist.h pimenubarx.h pimenubargen.h pimenux.h pimenugen.h picons.h \
    129144 pistdwdgx.h pistdwdggen.h pibwdgx.h pibwdggen.h picmap.h picmapx.h \
    130  picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigraphuc.h \
    131  pievthandler.h psfile.h pigraphps.h pifilechox.h pifilechogen.h \
    132  piwindowx.h piwindowgen.h
     145 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
    133148$(OBJ)pifontgen.o: pifontgen.cc pigraphgen.h pisysdep.h \
    134149 $(INC)machdefs.h piwdgx.h piwdggen.h \
    135150 pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h pifontx.h \
    136  pifontgen.h
     151 pifontgen.h pigrcoord.h pilineatt.h
    137152$(OBJ)pifontx.o: pifontx.cc pisysdep.h \
    138153 $(INC)machdefs.h pifontx.h pifontgen.h \
     
    141156 $(INC)machdefs.h pigraphuc.h pigraphgen.h \
    142157 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
    144159$(OBJ)pigraphgen.o: pigraphgen.cc pigraphgen.h pisysdep.h \
    145160 $(INC)machdefs.h piwdgx.h piwdggen.h \
    146161 pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h pifontx.h \
    147  pifontgen.h
     162 pifontgen.h pigrcoord.h pilineatt.h
    148163$(OBJ)pigraphps.o: pigraphps.cc pigraphps.h pisysdep.h \
    149164 $(INC)machdefs.h pigraphgen.h piwdgx.h \
    150165 piwdggen.h pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h \
    151  pifontx.h pifontgen.h psfile.h
     166 pifontx.h pifontgen.h pigrcoord.h pilineatt.h psfile.h
    152167$(OBJ)pigraphuc.o: pigraphuc.cc $(INC)machdefs.h \
    153168 pigraphuc.h pisysdep.h pigraphgen.h piwdgx.h piwdggen.h \
    154169 pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h pifontx.h \
    155  pifontgen.h ucckprot.h
     170 pifontgen.h pigrcoord.h pilineatt.h ucckprot.h
    156171$(OBJ)pigraphx.o: pigraphx.cc pigraphx.h pisysdep.h \
    157172 $(INC)machdefs.h pigraphgen.h piwdgx.h \
    158173 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
    160175$(OBJ)pigratt.o: pigratt.cc pigratt.h pisysdep.h \
    161176 $(INC)machdefs.h pigraphgen.h piwdgx.h \
    162177 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
    164181$(OBJ)piimage.o: piimage.cc piimage.h parradapter.h \
    165182 $(INC)machdefs.h lut.h pisysdep.h pieldrw.h \
    166183 pidrawer.h pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h picolist.h \
    167184 picmap.h picmapx.h picmapgen.h pigraphx.h pigraphgen.h pifontx.h \
    168  pifontgen.h pigraphuc.h pievthandler.h psfile.h pigratt.h piaxes.h \
    169  pipixmapx.h pipixmapgen.h pibwdgx.h pigraphps.h pistdwdgx.h \
    170  pistdwdggen.h piwindowx.h piwindowgen.h picontainerx.h \
    171  picontainergen.h picmapview.h piimgtools.h pioptmenux.h \
    172  pioptmenugen.h pimenux.h pimenugen.h piapplx.h piapplgen.h \
    173  pimenubarx.h pimenubargen.h picons.h pidrwtools.h piscdrawwdg.h \
    174  piyfxdrw.h
     185 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
    175192$(OBJ)piimgtools.o: piimgtools.cc piimgtools.h pisysdep.h \
    176193 $(INC)machdefs.h pistdwdgx.h pistdwdggen.h \
     
    179196 picontainerx.h picontainergen.h piapplx.h piapplgen.h pimenubarx.h \
    180197 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
    185204$(OBJ)pilistgen.o: pilistgen.cc pilistgen.h pisysdep.h \
    186205 $(INC)machdefs.h piwdgx.h piwdggen.h \
     
    194213 picontainerx.h picontainergen.h pimenubarx.h picons.h pistdwdgx.h \
    195214 pistdwdggen.h pibwdgx.h pibwdggen.h picmap.h picmapx.h picmapgen.h \
    196  pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigraphuc.h \
    197  pievthandler.h psfile.h pigraphps.h
     215 pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h pilineatt.h \
     216 pigraphuc.h pievthandler.h psfile.h pigraphps.h
    198217$(OBJ)pimenubarx.o: pimenubarx.cc pimenubarx.h pimenubargen.h pisysdep.h \
    199218 $(INC)machdefs.h pimenux.h pimenugen.h \
     
    201220 picontainerx.h picontainergen.h picons.h pistdwdgx.h pistdwdggen.h \
    202221 pibwdgx.h pibwdggen.h picmap.h picmapx.h picmapgen.h pigraphx.h \
    203  pigraphgen.h pifontx.h pifontgen.h pigraphuc.h pievthandler.h \
    204  psfile.h pigraphps.h
     222 pigraphgen.h pifontx.h pifontgen.h pigrcoord.h pilineatt.h \
     223 pigraphuc.h pievthandler.h psfile.h pigraphps.h
    205224$(OBJ)pimenugen.o: pimenugen.cc pimenugen.h pisysdep.h \
    206225 $(INC)machdefs.h piwdgx.h piwdggen.h \
     
    220239 picontainergen.h pimenubarx.h pimenubargen.h picons.h pibwdgx.h \
    221240 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
    223243$(OBJ)piperiodx.o: piperiodx.cc piwdgx.h piwdggen.h \
    224244 $(INC)machdefs.h pimsghandler.h picolist.h \
     
    227247 $(INC)machdefs.h pibwdgx.h pibwdggen.h \
    228248 piwdgx.h piwdggen.h pimsghandler.h picolist.h picmap.h picmapx.h \
    229  picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigraphuc.h \
    230  pievthandler.h psfile.h pigraphps.h
     249 picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h \
     250 pilineatt.h pigraphuc.h pievthandler.h psfile.h pigraphps.h
    231251$(OBJ)pipixmapx.o: pipixmapx.cc pipixmapx.h pipixmapgen.h pisysdep.h \
    232252 $(INC)machdefs.h pibwdgx.h pibwdggen.h \
    233253 piwdgx.h piwdggen.h pimsghandler.h picolist.h picmap.h picmapx.h \
    234  picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigraphuc.h \
    235  pievthandler.h psfile.h pigraphps.h
     254 picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h \
     255 pilineatt.h pigraphuc.h pievthandler.h psfile.h pigraphps.h
    236256$(OBJ)piscdrawwdg.o: piscdrawwdg.cc \
    237257 $(INC)machdefs.h piscdrawwdg.h pisysdep.h \
    238258 pibwdgx.h pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h picolist.h \
    239259 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
    245266$(OBJ)pistdwdggen.o: pistdwdggen.cc pistdwdggen.h pisysdep.h \
    246267 $(INC)machdefs.h piwdgx.h piwdggen.h \
     
    255276 picolist.h piperiodx.h $(INC)periodic.h \
    256277 psfile.h pifontgen.h pigraphgen.h picmap.h picmapx.h picmapgen.h \
    257  pifontx.h
     278 pifontx.h pigrcoord.h pilineatt.h
    258279$(OBJ)pisurfdr.o: pisurfdr.cc pisurfdr.h parradapter.h \
    259280 $(INC)machdefs.h lut.h pi3ddrw.h pisysdep.h \
    260281 pidrawer.h pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h picolist.h \
    261282 picmap.h picmapx.h picmapgen.h pigraphx.h pigraphgen.h pifontx.h \
    262  pifontgen.h pigraphuc.h pievthandler.h psfile.h pigratt.h piaxes.h \
    263  pieldrw.h pigraph3d.h pibwdgx.h pigraphps.h
     283 pifontgen.h pigrcoord.h pilineatt.h pigraphuc.h pievthandler.h \
     284 psfile.h pigratt.h piaxes.h pieldrw.h pigraph3d.h
    264285$(OBJ)pitherm.o: pitherm.cc pitherm.h pisysdep.h \
    265286 $(INC)machdefs.h pibwdgx.h pibwdggen.h \
    266287 piwdgx.h piwdggen.h pimsghandler.h picolist.h picmap.h picmapx.h \
    267  picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigraphuc.h \
    268  pievthandler.h psfile.h pigraphps.h
     288 picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h \
     289 pilineatt.h pigraphuc.h pievthandler.h psfile.h pigraphps.h
    269290$(OBJ)piwdggen.o: piwdggen.cc piwdggen.h \
    270291 $(INC)machdefs.h pimsghandler.h picolist.h \
    271292 picontainergen.h pisysdep.h piwdgx.h pievthandler.h pigraphx.h \
    272293 pigraphgen.h picmap.h picmapx.h picmapgen.h pifontx.h pifontgen.h \
    273  psfile.h
     294 pigrcoord.h pilineatt.h psfile.h
    274295$(OBJ)piwdgx.o: piwdgx.cc piwdgx.h piwdggen.h \
    275296 $(INC)machdefs.h pimsghandler.h picolist.h \
    276297 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
    278300$(OBJ)piwindowgen.o: piwindowgen.cc piwindowgen.h pisysdep.h \
    279301 $(INC)machdefs.h picontainerx.h \
    280302 picontainergen.h piwdgx.h piwdggen.h pimsghandler.h picolist.h \
    281303 psfile.h pifontgen.h pigraphgen.h picmap.h picmapx.h picmapgen.h \
    282  pifontx.h
     304 pifontx.h pigrcoord.h pilineatt.h
    283305$(OBJ)piwindowx.o: piwindowx.cc piwindowx.h piwindowgen.h pisysdep.h \
    284306 $(INC)machdefs.h picontainerx.h \
     
    287309 $(INC)machdefs.h pibwdggen.h piwdgx.h \
    288310 piwdggen.h pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h \
    289  pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigraphuc.h \
    290  pievthandler.h psfile.h pigraphps.h pixtbase.h
     311 pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h pilineatt.h \
     312 pigraphuc.h pievthandler.h psfile.h pigraphps.h pixtbase.h
    291313$(OBJ)piyfxdrw.o: piyfxdrw.cc $(INC)machdefs.h \
    292314 piyfxdrw.h pisysdep.h parradapter.h lut.h pidrawer.h pibwdggen.h \
    293315 piwdgx.h piwdggen.h pimsghandler.h picolist.h picmap.h picmapx.h \
    294  picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigraphuc.h \
    295  pievthandler.h psfile.h pigratt.h piaxes.h
     316 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
    296318$(OBJ)psfile.o: psfile.cc psfile.h $(INC)machdefs.h \
    297319 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  
    8484{
    8585PIFontAtt att[4] = { PI_RomanFont, PI_BoldFont, PI_ItalicFont, PI_BoldItalicFont};
    86 PIFontSize fsz[4] = { PI_TinySizeFont, PI_SmallSizeFont, PI_NormalSizeFont, PI_BigSizeFont};
     86PIFontSize fsz[4] = { PI_TinySizeFont, PI_SmallSizeFont, PI_NormalSizeFont, PI_LargeSizeFont};
    8787PIMarker  pmk[11] = { PI_DotMarker , PI_PlusMarker, PI_CrossMarker, 
    8888                 PI_CircleMarker, PI_FCircleMarker,
  • trunk/SophyaPI/PI/Tests/pitgr.cc

    r1908 r2138  
    2626
    2727#include "pisurfdr.h"
     28#include "pi3dwdg.h"
    2829
    2930
  • trunk/SophyaPI/PI/Tests/xp3.cc

    r1933 r2138  
    2626#include "piyfxdrw.h"
    2727
     28#include "pi3dwdg.h"
    2829
    2930//  ---------- classe PITApp -----------------------
  • trunk/SophyaPI/PI/objlist.list

    r2080 r2138  
    22parradapter.o
    33pi3ddrw.o
     4pi3dwdg.o
    45piapplgen.o
    56piapplx.o
     
    3031pigraphx.o
    3132pigratt.o
     33pigrcoord.o
    3234piimage.o
    3335piimgtools.o
     36pilineatt.o
    3437pilistgen.o
    3538pilistx.o
  • trunk/SophyaPI/PI/pi3ddrw.cc

    r1914 r2138  
    11// Module PI : Peida Interactive PIDrawer3D PIDraw3DWdg
    2 // Drawer et DrawWidget 3D       R. Ansari 06/98
     2// Drawer  3D                    R. Ansari 06/98
    33// LAL (Orsay) / IN2P3-CNRS  DAPNIA/SPP (Saclay) / CEA
    44
     
    88
    99#include "pi3ddrw.h"
    10 #include "pidrwtools.h"
    1110
    1211
     
    3736//++
    3837// PIDrawer3D()
    39 //      Cosntructeur
     38//      Constructeur
    4039// void Set3DView_Obs(double xo, double yo, double zo, double teta, double phi, double psi, -
    4140//               double dax, double day, double co, double dco=0.2)
     
    222221}
    223222
    224 // ......................................................................
    225 // .......................  Classe PIDraw3DWdg ..........................
    226 // ......................................................................
    227 
    228 //++
    229 // Class        PIDraw3DWdg
    230 // Lib          PI
    231 // include      pi3ddrw.h
    232 //
    233 //      Classe pour la l'affichage et la manipulation d'un ensemble
    234 //      de *Drawer3D* avec la gestion de zoom, rotation, déplacement
    235 //      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 maintenant
    240 //      la caméra fixe. Cette fonction peut-être réalisée sans le shift
    241 //      à partir du centre de l'objet, en l'ayant préalablement activée
    242 //      par <Alt>S.
    243 //      * Bouton-3 : Gestion de zoom (On approche/ éloigne la caméra, ou
    244 //      on change l'angle d'ouverture)
    245 //
    246 //      Gestion du clavier :
    247 //      * <Alt>G : Affichage d'une fenêtre de changement des attributs graphiques
    248 //      * <Alt>O : Action identique a <Alt>G
    249 //      * <Alt>V : Copier/*Coller* Ajout du texte du buffer copier/coller
    250 //      sur l'objet à la position courante de la souris
    251 //      * <Alt>Z : Supprime les textes et signes ajoutés au dessin.
    252 //      * <Alt>A : Active/desactive l'affichage des axes
    253 //      * <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 Shift
    255 //
    256 //--
    257 //++
    258 // Links        Parents
    259 // PIBaseWdg
    260 //--
    261 //++
    262 // Links        Voir aussi
    263 // PIDrawer3D
    264 //--
    265 
    266 //++
    267 // Titre        Constructeur, méthodes
    268 //--
    269 //++
    270 // PIDraw3DWdg(PIContainerGen *par, const char *nom, int sx=100, int sy=100, int px=0, int py=0)
    271 //      Constructeur
    272 // long  kind()
    273 //      Renvoie le type de l'objet ("=PIDraw3DWdg::ClassId")
    274 // int AddDrawer3D(PIDrawer3D*, bool ad=false)
    275 //      Ajoute un Drawer3D
    276 //--
    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 camera
    296   ActivateMove(2);     
    297   ActivateButton(3);    //  Pour deplacer la camera le long de son axe
    298   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 #else
    324     ((PIDrawer3D*)(GetDrawerId(*it)))->Set3DView_Obs(xo, yo, zo, teta, phi, psi, dax, day, co, dco);
    325 #endif
    326   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 #else
    339     ((PIDrawer3D*)(GetDrawerId(*it)))->Set3DView(xc, yc, zc, xo, yo, zo, dax, day, dco, psi);
    340 #endif
    341   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 #else
    360   PIDrawer3D* dr3 = (PIDrawer3D*)(GetDrawerId(*it));
    361 #endif
    362   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/2002
    376   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 #else
    396   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 #endif
    401 
    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 signes
    450   else if (key == 'O' || key == 'o') { // fenetre des options de controle du drawer actif
    451     PIDrawer* actdrw = GetActiveDrawer();
    452     if (actdrw != NULL) actdrw->ShowControlWindow(this);
    453   }
    454   else if (key == 'G' || key == 'g') // Fenetre des options graphiques de trace
    455     PIDrwTools::ShowPIDrwTools(this);   
    456 
    457   else if (key == 'A' || key == 'a')  {    // On affiche ou on enleve les axes
    458     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'objet
    470   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 centrale   
    501   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-3
    686 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  
    11// This may look like C code, but it is really -*- C++ -*-
    22// Module PI : Peida Interactive PIDrawer3D PIDraw3DWdg
    3 // Drawer et DrawWidget 3D       R. Ansari 06/98
     3// Drawer  3D                R. Ansari 06/98
    44// LAL (Orsay) / IN2P3-CNRS  DAPNIA/SPP (Saclay) / CEA
    55
     
    1212#include "pigraph3d.h"
    1313
    14 #include PIBWDG_H
    1514
    1615
     
    5756
    5857
    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 1
    79 
    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 chaines
    87   virtual int           DecodeOptionString(vector<string> & opt, bool rmdecopt=true);
    88 
    89 // Ajoute un Drawer
    90   int                   AddDrawer3D(PIDrawer3D*, bool ad=false);   
    91 
    92 //  Pour tenir trace des Drawers-3D qui sont detruits
    93   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 fond
    115   int mPx, mPy;        // Position pointeur - Bouton-1
    116  
    117   bool vfixed;       // SetView fait ou pas
    118   list<int> m3DrIl;  // Liste des Id drawers 3D
    119   PIGraphic3D* mGr3d;   // PIGraphic3D courante
    120   int lPx, lPy;         // dernier position pointeur
    121   PIColors lCol;        // Couleur
    122   double cTeta, cPhi, cUlen;    // Pour garder valeurs avant rotation, Unite de longeur
    123   double cXc, cYc, cZc;         // Pour garder position du centre de champ
    124   double clCO, cDax, cDay;      // Pour garder les valeurs avant Zoom In/Out
    125   bool  rOfg;                  // si Vrai  on fait tourner l'objet et pas la camera
    126   bool  axfg;                  // si Vrai on trace les axes
    127   bool  skcfg;                 // si Vrai click-2 au centre -> rotation objet
    128 };
    12958
    13059#endif
  • trunk/SophyaPI/PI/piaxes.cc

    r2122 r2138  
    1111#include "piaxes.h"
    1212
     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
    1331inline void dble_SWAP(double& a,double& b) {double tmp=a; a=b; b=tmp;}
    1432
     33//++
     34// PIAxes()
     35//      Constructeur.
     36//--
     37
    1538/* --Methode-- */
    1639PIAxes::PIAxes()
     
    2245{
    2346}
     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//--
    2463
    2564/* --Methode-- */
  • trunk/SophyaPI/PI/pidrwtools.cc

    r1936 r2138  
    88#include <iostream.h>
    99#include "piscdrawwdg.h"
    10 #include "pi3ddrw.h"
     10#include "pi3dwdg.h"
    1111
    1212//++
  • trunk/SophyaPI/PI/pigraphgen.cc

    r1899 r2138  
    88#include <math.h>
    99
    10 //++
    11 // Class        PILineAtt
    12 // Lib          PI
    13 // include      pigraphgen.h
    14 //--
    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 }
    6810
    6911//++
     
    8426// Links        Voir aussi
    8527// PIGrCoord
     28// PILineAtt
    8629// PIFont
    8730// PIColorMap
     
    473416//      Choix de la taille et du type de signe pour "DrawMarker() / DrawMarkers()"
    474417//|     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
    477422//      (Les "StarMaker" ne sont pas encore implémentés  11/98)
    478423//--
     
    645590
    646591
    647 
    648 //++
    649 // Class        PIGrCoord
    650 // Lib          PI
    651 // include      pigraphgen.h
    652 //
    653 //      Classe utilisé pour la spécifiaction de coordonnées graphique.
    654 //      Des constructeurs et des méthodes de conversion à partir
    655 //      et vers des "int", "float" et "double" sont définis.
    656 //      La valeur entiere d'un objet PIGrCoord construite à partir
    657 //      d'une valeur flottante (ou suite à une affectation) correpond
    658 //      à l'entier le plus proche.
    659 //
    660 //|     PIGrCoord gco = 3.14;
    661 //|     int ic = gco;     // ic -> 3
    662 //|     float fc = gco;   // fc -> 3.14
    663 //|     gco = 1.1;        // (int)gco -> 1
    664 //|     gco = 1.6;        // (int)gco -> 2
    665 //|     gco = -0.4;       // (int)gco -> 0
    666 //|     gco = -0.7;       // (int)gco -> -1
    667 //--
    668 //++
    669 // Links        Voir aussi
    670 // PIGraphic
    671 //--
    672 
    673 //++
    674 // Titre        Constructeurs
    675 //--
    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 conversion
    689 //--
    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'affectation
    706 //--
    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  
    1414
    1515#include "picolist.h"  // enum PIColors
     16#include "pigrcoord.h"  // Class PIGrCoord
    1617
    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
    2820
    2921// Marker types
     
    6355
    6456
    65 //  Classe pour gerer indifferement des coordonnees double ou int
    66 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 lignes
    91 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) const
    112   { return ((_lwidth==b._lwidth)&&(_ldash==b._ldash)&&(_ljoincap==b._ljoincap)); }
    113   inline bool operator == (PILineTypes ltyp) const
    114   { return ((*this) == PILineAtt(ltyp)); }
    115   inline bool operator != (PILineAtt const& b) const
    116   { return ((_lwidth!=b._lwidth)||(_ldash!=b._ldash)||(_ljoincap!=b._ljoincap)); }
    117   inline bool operator != (PILineTypes ltyp) const
    118   { 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 };
    13857
    13958// Les differents types de classes PIGraphic
  • trunk/SophyaPI/PI/pigratt.cc

    r1970 r2138  
    77#include <stdio.h>
    88#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//--
    932
    1033PIGraphicAtt::PIGraphicAtt()
     
    3356}
    3457
     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//--
    3582
    3683void PIGraphicAtt::SetDefaultAtt()
  • trunk/SophyaPI/PI/piversion.h

    r2119 r2138  
    22#define PIVERSION_H_SEEN
    33
    4 #define PI_VERSIONNUMBER  3.75
     4#define PI_VERSIONNUMBER  3.80
    55
    66#endif
Note: See TracChangeset for help on using the changeset viewer.