tracer
Class Sampler2D

java.lang.Object
  extended by tracer.Sampler2D
Direct Known Subclasses:
DebugSampler, NearestSampler

public abstract class Sampler2D
extends java.lang.Object


Field Summary
protected  float signalMin
           
protected  float signalRange
           
(package private)  int[] source
           
(package private)  int sourceHeight
           
(package private)  int sourceWidth
           
 
Constructor Summary
Sampler2D()
           
Sampler2D(java.lang.String filename)
           
 
Method Summary
protected  int[] rawRead(int x, int y)
           
protected  Vec3 rawReadVec(float x, float y)
          later zelf geschreven om de array om te vormen naar een vector
abstract  Vec3 sample(float u, float v)
           
protected  float scaleOutput(int b)
           
protected  float scaleU(float u)
           
protected  float scaleV(float v)
           
 void setOutputRange(float min, float max)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

source

int[] source

sourceWidth

int sourceWidth

sourceHeight

int sourceHeight

signalMin

protected float signalMin

signalRange

protected float signalRange
Constructor Detail

Sampler2D

Sampler2D()

Sampler2D

Sampler2D(java.lang.String filename)
Method Detail

sample

public abstract Vec3 sample(float u,
                            float v)

rawRead

protected int[] rawRead(int x,
                        int y)

rawReadVec

protected Vec3 rawReadVec(float x,
                          float y)
later zelf geschreven om de array om te vormen naar een vector


setOutputRange

public void setOutputRange(float min,
                           float max)

scaleOutput

protected float scaleOutput(int b)

scaleU

protected float scaleU(float u)

scaleV

protected float scaleV(float v)