Squeak Class Documentation category index | class index  
 
B3DLightSource
  category: Balloon3D-Lights
  superclass: Object
  subclasses: B3DPositionalLight B3DAmbientLight B3DDirectionalLight

No comment. Sorry.

instance methods
  accessing
  direction
hotSpotDeltaCosine
hotSpotMaxCosine
hotSpotMinCosine
lightColor
lightColor:
spotExponent

  converting
  asPrimitiveLight
transformedBy:

  private
  setColor:

  shading
  computeAttenuationFor:
computeDirectionTo:
computeSpotFactor:
shadeVertexBuffer:with:into:

  testing
  hasAmbientPart
hasDiffusePart
hasSpecularPart
hasSpot
isAttenuated

class methods
  instance creation
  color:

instance methods
  accessing top  
 

direction

If the light is directional, return the NORMALIZED direction of the light


 

hotSpotDeltaCosine

Return the cosine value of the delta radius of a spot light (the fall off region)


 

hotSpotMaxCosine

Return the cosine value of the outer radius of a spot light (the unlit region)


 

hotSpotMinCosine

Return the cosine value of the inner radius of a spot light (the fully lit region)


 

lightColor


 

lightColor:


 

spotExponent

Return the exponent to be used for the spot fall off computation


  converting top  
 

asPrimitiveLight

Convert the receiver into a B3DPrimitiveLight that can be handled by the shader primitive directly. Light sources that cannot be represented as primitive should return nil. This will result in the callback of #shadeVertexBuffer from the shader.


 

transformedBy:


  private top  
 

setColor:


  shading top  
 

computeAttenuationFor:


 

computeDirectionTo:


 

computeSpotFactor:

Compute the spot factor for a spot light


 

shadeVertexBuffer:with:into:

This is the generic shading function similar to the primitive.
Subclasses may implement optimized versions but should evaluate
exactly to the same value as in here if they are to be converted into
B3DPrimitiveLights.


  testing top  
 

hasAmbientPart

Return true if the receiver contains an ambient part in its color


 

hasDiffusePart

Return true if the receiver contains a diffuse part in its color


 

hasSpecularPart

Return true if the receiver contains a specular part in its color


 

hasSpot

Return true if the receiver has a hot spot.


 

isAttenuated

Return true if the receiver contains an attenuation.
If so, #computeAttenuationFor: must return the attenuation for the given distance.


class methods
  instance creation top  
 

color: