[ Contact ] [ Links ] [ Previous : 7 / 23 : Point Lights ] [ Up ] [ Next : 9 / 23 : Spot Lights ]

Point Light Attenuation

Point light rays are attenuated:

brightness =

lightIntensity
constant + linear*distance + quadratic*distance2

 

Method Default
void setPosition( Point3f pos ) 
0.0, 0.0, 0.0 
void setAttenuation( Point3f atten )
 1.0, 0.0, 0.0 


TransformGroup group = new TransformGroup( );
. . .
PointLight light = new PointLight( );
light.setEnable( true );
light.setColor( new Color3f( 1.0f, 1.0f, 1.0f ) );
light.setPosition( new Point3f( 0.0f, 1.0f, 0.0f ) );
light.setAttenuation( new Point3f( 1.0f, 0.0f, 0.0f ) );

. . .
light.setInfluencingBounds( bounds );
group.addChild( light );

 


See the "Links" link above to find out the sources of the proposed informations
Pascal Vuylsteker / eScience / Computer Science / ANU
Last modified: 20/4/2004
TOC - Print
Send your comments at :
<Hugh.Fisher@anu.edu.au>