JPBRT 0.5

org.jpbrt.core
Class Sample

java.lang.Object
  extended by org.jpbrt.core.CameraSample
      extended by org.jpbrt.core.Sample
All Implemented Interfaces:
java.lang.Cloneable

public class Sample
extends CameraSample
implements java.lang.Cloneable

Holds a sample generated by a Sampler.

References:
M. Pharr, G. Humphreys. (2004). Physically Based Rendering. Morgan Kaufmann.
Seciton 7.2, page 299.

Version:
$Id: Sample.java 15 2010-09-28 21:22:19Z rawcoder $
Author:
Werner Randelshofer

Field Summary
 java.util.ArrayList<float[]> oneD
          Fields for use by the integrator.
 java.util.ArrayList<float[]> twoD
           
 
Fields inherited from class org.jpbrt.core.CameraSample
imageX, imageY, lensU, lensV, time
 
Constructor Summary
Sample(Sampler sampler, SurfaceIntegrator surf, VolumeIntegrator vol, Scene scene)
           
 
Method Summary
 int add1D(int num)
          Records the numbers of samples asked for in an array and returns an index that the integrator can later use to access the desired sample values in the sample.
 int add2D(int num)
          Records the numbers of samples asked for in an array and returns an index that the integrator can later use to access the desired sample values in the sample.
protected  Sample clone()
           
 Sample[] duplicate(int count)
           
 int n1D(int num)
          Returns the number of samples in oneD.
 int n2D(int num)
          Returns the number of samples in twoD.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

oneD

public java.util.ArrayList<float[]> oneD
Fields for use by the integrator.


twoD

public java.util.ArrayList<float[]> twoD
Constructor Detail

Sample

public Sample(Sampler sampler,
              SurfaceIntegrator surf,
              VolumeIntegrator vol,
              Scene scene)
Method Detail

add1D

public int add1D(int num)
Records the numbers of samples asked for in an array and returns an index that the integrator can later use to access the desired sample values in the sample.

Parameters:
num - Number of samples.
Returns:
array index.

add2D

public int add2D(int num)
Records the numbers of samples asked for in an array and returns an index that the integrator can later use to access the desired sample values in the sample.

Parameters:
num - Number of samples.
Returns:
array index.

n1D

public int n1D(int num)
Returns the number of samples in oneD.


n2D

public int n2D(int num)
Returns the number of samples in twoD.


clone

protected Sample clone()
Overrides:
clone in class java.lang.Object

duplicate

public Sample[] duplicate(int count)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Copyright 2010 © by the authors and contributors of the JPBRT project.
Some rights reserved.