aboutsummaryrefslogtreecommitdiffstats
path: root/solid.scm
diff options
context:
space:
mode:
authorThomas Bushnell, BSG <tb@debian.org>2008-02-04 20:29:13 -0500
committerBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:41 -0800
commit71dab84adaa579f9386dd8ee09006d3cac625723 (patch)
tree8022514642d25edffdb4bdd130020674b0efd844 /solid.scm
parent897451458bd8eec628c7bbfaccba0dd069830f0f (diff)
parent4684239efa63dc1b2c1cbe37ef7d3062029f5532 (diff)
downloadslib-71dab84adaa579f9386dd8ee09006d3cac625723.tar.gz
slib-71dab84adaa579f9386dd8ee09006d3cac625723.zip
Import Debian changes 3b1-1debian/3b1-1
slib (3b1-1) unstable; urgency=low * New upstream release. * guile.init (library-vicinity): Repeat change from 3a4-2. * slib.texi (Library Catalogs): Repeat change from 3a3-3. * slib.sh: Repeat change from 3a5-3. * slib.1: Repeat change from 3a5-4. * Makefile: Repeat change from 3a2-1.
Diffstat (limited to 'solid.scm')
-rw-r--r--solid.scm37
1 files changed, 25 insertions, 12 deletions
diff --git a/solid.scm b/solid.scm
index 8f99d83..990fa3d 100644
--- a/solid.scm
+++ b/solid.scm
@@ -487,15 +487,25 @@
(define nargs (length args))
(let ((color (and (>= nargs 1) (color->vrml-field (car args))))
(intensity (and (>= nargs 2) (cadr args)))
- (attenuation (and (>= nargs 3) (cadr (caddr args))))
- (radius (and (>= nargs 3) (caddr (caddr args)))))
+ (beamwidth (and (>= nargs 3) (car (caddr args))))
+ (cutoffangle (and (>= nargs 3) (cadr (caddr args))))
+ (attenuation (and (>= nargs 3) (caddr (caddr args))))
+ (radius (and (>= nargs 3) (cadddr (caddr args)))))
(replicate-for-strength
(or intensity 1)
(lambda (inten)
(sprintf #f
- "PointLight {location %s color %s intensity %g attenuation %s radius %g}\\n"
+ "PointLight {location %s color %s intensity %g%s}\\n"
(coordinates3string location)
- color intensity attenuation radius)))))
+ color
+ inten
+ (if attenuation
+ (sprintf #f
+ "\\n
+ attenuation %s radius %g"
+ attenuation
+ radius)
+ ""))))))
;;@args location direction color intensity beam
;;@args location direction color intensity
@@ -535,17 +545,20 @@
(or intensity 1)
(lambda (inten)
(sprintf #f
- "SpotLight {\\n
- location %s direction %s beamWidth %g cutOffAngle %g\\n
- color %s intensity %s attenuation %s radius %g}\\n"
+ "SpotLight {location %s direction %s color %s intensity %g%s}\\n"
(coordinates3string location)
direction
color
- intensity
- (and beamwidth (* pi/180 beamwidth))
- (and cutoffangle (* pi/180 cutoffangle))
- attenuation
- radius)))))
+ inten
+ (if beamwidth
+ (sprintf #f
+ "\\n
+ beamWidth %g cutOffAngle %g attenuation %s radius %g"
+ (* pi/180 beamwidth)
+ (* pi/180 cutoffangle)
+ attenuation
+ radius)
+ ""))))))
;;@subheading Object Primitives