jpview.transforms
Class SpecularOp

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

public final class SpecularOp
extends java.lang.Object
implements PixelTransformOp

Uses Phong lighting to simulate a shiny metallic surface

Author:
clyon

Field Summary
 Vec3f[] normals
          A reference to the array of normals used for lighting calculations
 
Constructor Summary
SpecularOp()
           
 
Method Summary
 void clearCache()
          Clears the mouse location cache and piecewise approximation of the specular term
 void forceUpdate()
          Bypasses optimizations and forces a complete update
 void release()
          Releases all resources associated with this object
 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
 

Field Detail

normals

public Vec3f[] normals
A reference to the array of normals used for lighting calculations

Constructor Detail

SpecularOp

public SpecularOp()
Method Detail

forceUpdate

public void forceUpdate()
Bypasses optimizations and forces a complete update

Specified by:
forceUpdate in interface PixelTransformOp

clearCache

public void clearCache()
Clears the mouse location cache and piecewise approximation of the specular term

Specified by:
clearCache in interface PixelTransformOp

release

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

Specified by:
release in interface PixelTransformOp

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