photonstore.java
来自「Sunflow是一个照片级的渲染系统」· Java 代码 · 共 62 行
JAVA
62 行
package org.sunflow.core;
import org.sunflow.image.Color;
import org.sunflow.math.BoundingBox;
import org.sunflow.math.Vector3;
/**
* Describes an object which can store photons.
*/
public interface PhotonStore {
/**
* Number of photons to emit from this surface.
*
* @return number of photons
*/
int numEmit();
/**
* Initialize this object for the specified scene size.
*
* @param sceneBounds scene bounding box
*/
void prepare(BoundingBox sceneBounds);
/**
* Store the specified photon.
*
* @param state shading state
* @param dir photon direction
* @param power photon power
* @param diffuse diffuse color at the hit point
*/
void store(ShadingState state, Vector3 dir, Color power, Color diffuse);
/**
* Initialize the map after all photons have been stored. This can be used
* to balance a kd-tree based photon map for example.
*/
void init();
/**
* Allow photons reflected diffusely?
*
* @return <code>true</code> if diffuse bounces should be traced
*/
boolean allowDiffuseBounced();
/**
* Allow specularly reflected photons?
*
* @return <code>true</code> if specular reflection bounces should be
* traced
*/
boolean allowReflectionBounced();
/**
* Allow refracted photons?
*
* @return <code>true</code> if refracted bounces should be traced
*/
boolean allowRefractionBounced();
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?