⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 photonstore.java

📁 Sunflow是一个照片级的渲染系统
💻 JAVA
字号:
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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -