painter
Class TexturePainter

java.lang.Object
  extended by painter.TexturePainter
All Implemented Interfaces:
IPainter

public class TexturePainter
extends java.lang.Object
implements IPainter


Constructor Summary
TexturePainter(java.io.File sFile, double scale)
          constructor
 
Method Summary
 RGBColor getColor(IntersectionInfo intersection)
           
 IPainter getCopy()
           
 int getHeight()
           
 int getWidth()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TexturePainter

public TexturePainter(java.io.File sFile,
                      double scale)
constructor

Parameters:
sFile - the file to load
scale - multiply the colors by this value
Method Detail

getColor

public RGBColor getColor(IntersectionInfo intersection)
Specified by:
getColor in interface IPainter
Returns:
the computed color as an RGBColor

getCopy

public IPainter getCopy()
Specified by:
getCopy in interface IPainter
Returns:
a copy of the painter

getWidth

public int getWidth()
Returns:
the width of the texture

getHeight

public int getHeight()
Returns:
the height of the texture