%% syntaxe : solid str writedisttable -> -
%% syntaxe : solid str bool writedisttable -> -
%% syntaxe : solid str k bool writedisttable -> -
%% syntaxe : solid str k writedisttable -> -
/writedisttable {
6 dict begin
dup isbool {
/bool exch def
} {
/bool true def
} ifelse
dup isnum {
/num exch def
} {
/num 0 def
} ifelse
/str exch def
/solid exch def
solid issolid not {
(Error : mauvais type d argument dans writedisttable) ==
quit
} if
/F solid solidgetfaces def
str (-dist.dat) append (w) file /lefichier exch def
0 1 F length 1 sub {
/i exch def
solid i solidcentreface
GetCamPos
distance3d num add
dup lefichier exch chaine cvs writestring
bool {
lefichier 32 write %% space
lefichier i chaine cvs writestring
} if
lefichier 10 write %% CR
} for
lefichier closefile
end
} def
%% %% syntaxe : solid str writedisttable -> -
%% /writedisttable {
%% 5 dict begin
%% /str exch def
%% /solid exch def
%% solid issolid not {
%% (Error : mauvais type d argument dans writedisttable) ==
%% quit
%% } if
%% /F solid solidgetfaces def
%% str (w) file /lefichier exch def
%% 0 1 F length 1 sub {
%% /i exch def
%% solid i solidcentreface
%% GetCamPos
%% distance3d 1000 add
%% dup lefichier exch chaine cvs writestring
%% lefichier 10 write %% CR
%% } for
%% lefichier closefile
%% end
%% } def
|