JPBRT 0.5

org.jpbrt.core
Class BxDF

java.lang.Object
  extended by org.jpbrt.core.BxDF
Direct Known Subclasses:
BTDF, Lambertian, Microfacet, OrenNayar

public abstract class BxDF
extends java.lang.Object

BxDF defines the basic interface of BRDF and BTDF classes.

References:
M. Pharr, G. Humphreys. (2004). Physically Based Rendering. Morgan Kaufmann.
Section 9.1, Page 414.

Version:
1.0 2010-09-12 Created.
Author:
Werner Randelshofer

Field Summary
 int type
           
 
Constructor Summary
BxDF(int bxDFType)
           
 
Method Summary
abstract  Spectrum f(Vector wo, Vector wi)
          Returns the value of the distribution function for a given pair of directions.
 boolean matchesFlags(int bxDFTypeFlags)
           
 float pdf(Vector wo, Vector wi)
           
 Spectrum rho(int nSamples, float[] samples1, float[] samples2)
           
 Spectrum rho(Vector w, int nSamples, float[] samples)
           
 Spectrum sample_f(Vector wo, Vector wi, float u1, float u2, float[] pdf)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

public final int type
Constructor Detail

BxDF

public BxDF(int bxDFType)
Method Detail

matchesFlags

public boolean matchesFlags(int bxDFTypeFlags)

f

public abstract Spectrum f(Vector wo,
                           Vector wi)
Returns the value of the distribution function for a given pair of directions.

Only BxDF functions which are not specular can be evaluated with this method. For specular BxDF's use sample_f(org.jpbrt.core.Vector, org.jpbrt.core.Vector, float, float, float[]).

Parameters:
wo - Outgoing viewing direction.
wi - Incident light direction.

sample_f

public Spectrum sample_f(Vector wo,
                         Vector wi,
                         float u1,
                         float u2,
                         float[] pdf)

rho

public Spectrum rho(Vector w,
                    int nSamples,
                    float[] samples)

rho

public Spectrum rho(int nSamples,
                    float[] samples1,
                    float[] samples2)

pdf

public float pdf(Vector wo,
                 Vector wi)

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