jpview.transforms
Class LocalLightOp

java.lang.Object
  extended by jpview.transforms.LocalLightOp
All Implemented Interfaces:
PixelTransformOp

public class LocalLightOp
extends java.lang.Object
implements PixelTransformOp

The local operator simulates a point light that is a configurable distance from the PTM

Author:
clyon

Constructor Summary
LocalLightOp()
           
 
Method Summary
 void clearCache()
          Not implemented for this class
 void createLengthLookup()
          Creates a cache of lenght lookups for computing the lighting effect at each pixel
 void forceUpdate()
          Not implemented for this class
 void release()
          Releases all resources associated with this object
 void setFlashlight(boolean b)
          Turn the flashlight effect on if true; otherwise off.
 void transformPixels(int[] pixels, PTM ptm)
          Transforms pixels using the default mouse location
 void transformPixels(int[] pixels, PTM ptm, int mouseX, int mouseY)
          Transforms pixels using the given mouse location.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalLightOp

public LocalLightOp()
Method Detail

setFlashlight

public void setFlashlight(boolean b)
Turn the flashlight effect on if true; otherwise off.

Parameters:
b - flag - if true, flashlight effect is on

createLengthLookup

public void createLengthLookup()
Creates a cache of lenght lookups for computing the lighting effect at each pixel


transformPixels

public void transformPixels(int[] pixels,
                            PTM ptm,
                            int mouseX,
                            int mouseY)
Transforms pixels using the given mouse location.

Specified by:
transformPixels in interface PixelTransformOp
Parameters:
pixels - the pixel buffer
ptm - the source ptm
mouseX - x mouse offset
mouseY - y mouse offset

transformPixels

public void transformPixels(int[] pixels,
                            PTM ptm)
Transforms pixels using the default mouse location

Specified by:
transformPixels in interface PixelTransformOp
Parameters:
pixels - the pixel buffer
ptm - the source ptm

release

public void release()
Releases all resources associated with this object

Specified by:
release in interface PixelTransformOp

forceUpdate

public void forceUpdate()
Not implemented for this class

Specified by:
forceUpdate in interface PixelTransformOp

clearCache

public void clearCache()
Not implemented for this class

Specified by:
clearCache in interface PixelTransformOp