Light Exposure
Nicolas Lassabe <[email protected]> Wed, 17 Nov 2004 13:40:37 +0100
| Newsgroups | gmane.comp.breve |
|---|---|
| Message-ID | <[email protected]> |
I would like to use LightExposure function in my simulations. The function always returns 0. I use enable-light-exposure-detection <http://www.spiderland.org/breve/breve_docs/classes/Control.html#enable-light-exposure-detection> and get-light-exposure. If an object is in the shadow of anothre one, the ligth exposure will be less ??? Thanks, Nicolas* * _______________________________________________ breve mailing list [email protected] http://lists.spiderland.org/mailman/listinfo/breve
Exposure.tz
(text/plain, 834 B)
@use Stationary.
@use PhysicalControl.
@use Mobile.
Controller Exposure.
PhysicalControl : Exposure {
+ variables:
floor (object).
floorShape (object).
+ to init:
self enable-shadow-volumes.
self point-camera at (0, 0, 0) from (19, 30, 34).
floorShape = (new Shape init-with-cube size (1000,1,1000) ).
floor = new Stationary.
floor register with-shape floorShape at-location (0, 0, 0).
#floor set-color to (1, 1, 1).
self enable-lighting.
self enable-light-exposure-detection.
self set-light-exposure-source to (0,50,0).
self drop-cube.
+ to drop-Cube:
new Cube.
}
Mobile : Cube {
+ to init:
self set-shape to (new Cube init-with size (10,10,10)).
self set-color to (1, 0, 1).
self move to (0,40,0).
self enable-physics.
+ to iterate:
print (self get-light-exposure).
}