This is the code of the pbrt plugin. Note that the code cannot be used as-is 
with the pbrt since it requires some modifications to the pbrt core. 

Feel free to send any questions to thachisu at cs_ucsd_edu, but I perhaps
cannot answer to very detailed questions since it's been a while since 
I wrote the code.