Squeak Class Documentation category index | class index  
 
B3DLightAttenuation
  category: Balloon3D-Lights
  superclass: B3DFloatArray
  subclasses:

I represent the attenuation for any given light source, e.g., how the intensity of the light is reduced with increasing distance from the object. I consist of three parts, a constant part, a linear part and a squared part. The resulting intensity for any given distance d is computed by:

intensity _ 1.0 / (constantPart + (distance * linearPart) + (distance^2 * squaredPart)).

instance methods
  accessing
  constantPart
constantPart:
linearPart
linearPart:
squaredPart
squaredPart:

  initialize
  constant:linear:squared:

  lighting
  computeAttenuationFor:

  testing
  isIdentity

class methods
  instance creation
  constant:linear:squared:
numElements

instance methods
  accessing top  
 

constantPart


 

constantPart:


 

linearPart


 

linearPart:


 

squaredPart


 

squaredPart:


  initialize top  
 

constant:linear:squared:


  lighting top  
 

computeAttenuationFor:

Compute the light attenuation for the given distance


  testing top  
 

isIdentity

Return true if the attenuation results in a constant lighting


class methods
  instance creation top  
 

constant:linear:squared:


 

numElements