/usr/share/savi/tcl/geomview.tcl is in savi 1.4.6-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | #
######################################################
#
# SaVi by Lloyd Wood (lloydwood@users.sourceforge.net),
# Patrick Worfolk (worfolk@alum.mit.edu) and
# Robert Thurman.
#
# Copyright (c) 1997 by The Geometry Center.
# Also Copyright (c) 2013 by Lloyd Wood.
#
# This file is part of SaVi. SaVi is free software;
# you can redistribute it and/or modify it only under
# the terms given in the file COPYRIGHT which you should
# have received along with this file. SaVi may be
# obtained from:
# http://savi.sourceforge.net/
# http://www.geom.uiuc.edu/locate/SaVi
#
######################################################
#
# geomview.tcl
#
# $Id: geomview.tcl,v 1.16 2013/05/05 05:19:26 lloydwood Exp $
proc geomview(new_camera) {} {
geomview(puts) "(new-camera Camera)"
}
proc geomview(camera_north_pole) {} {
geomview(camera_position) 0 0 3
}
proc geomview(camera_south_pole) {} {
geomview(camera_position) 0 0 -3
}
proc geomview(camera_position) {x y z} {
geomview(begin)
geomview(puts) "(geometry A { QUAD 0 0 0 0 0 0 0 0 0 0 0 0 })"
geomview(puts) "(geometry B { QUAD 0 0 0 0 0 0 0 0 0 0 0 0 })"
geomview(puts) "(transform A g0 g0 translate $x $y $z)"
geomview(puts) "(position-at c0 A)"
geomview(puts) "(position-at c0 A)"
geomview(puts) "(look-toward B c0)"
geomview(puts) "(delete A)"
geomview(puts) "(delete B)"
geomview(end)
}
proc geomview(choose_background_color) {} {
global COLOR
set color [tk_chooseColor -initialcolor $COLOR(geomview) -parent .main \
-title "SaVi: background color in Geomview"]
if {($color == "") || ($color == $COLOR(geomview))} return
set COLOR(geomview) $color
geomview(set_background_color)
}
proc geomview(set_background_color) {} {
global COLOR
set value [string range $COLOR(geomview) 1 6]
set GEOM [expr 0x$value]
set GEOMB [expr $GEOM % 256]
set GEOMG [expr ($GEOM - $GEOMB)/256 % 256]
set GEOMR [expr ($GEOM - $GEOMB - $GEOMG * 256) / 65536]
set geomb [expr $GEOMB / 255.0]
set geomg [expr $GEOMG / 255.0]
set geomr [expr $GEOMR / 255.0]
geomview(puts) "(backcolor focus $geomr $geomg $geomb)"
}
proc geomview(reset_texture) {} {
global earth_flag
# recreate the Earth
set earth_flag 0
set earth_flag 1
}
proc geomview(wait) {} {
satellites GV_WAIT
}
proc geomview(begin) {} {
satellites GV_BEGIN
}
proc geomview(end) {} {
satellites GV_END
}
proc geomview(puts) v {
satellites GV_SEND $v
}
|