diff --git a/examples/print.php b/examples/print.php index 095f58a..9d12938 100644 --- a/examples/print.php +++ b/examples/print.php @@ -16,7 +16,7 @@ echo $openCL; //设置打印光线跟踪的配置参数 $path = new Path(); -$path->photonGI = new PhotonGI(); +$path->photonGI = new cache\PhotonGI(); echo $path; //设置打印 采样器 配置参数 @@ -24,8 +24,7 @@ $sampler = new Sampler(); echo $sampler; //设置打印 灯光策略 配置参数 -$lightStrategy = new LightStrategy(); -$lightStrategy->openLightCache(); +$lightStrategy = new cache\LightStrategy(); echo $lightStrategy; //设置打印 文件储存格式 配置参数 diff --git a/src/scene/Film.php b/src/scene/Film.php index 9518384..d9b7b37 100644 --- a/src/scene/Film.php +++ b/src/scene/Film.php @@ -30,7 +30,7 @@ class Film extends BaseCfg /** - * @var object 一个 NoiseEstimation类 的实例对象 + * @var object 一个 NoiseEstimation类 的实例对象,当采样器实设置为“Metropolis ”,此项参数不需要输出 */ public $noiseEstimation; diff --git a/src/scene/LightStrategy.php b/src/scene/LightStrategy.php index 7393532..65c5afb 100644 --- a/src/scene/LightStrategy.php +++ b/src/scene/LightStrategy.php @@ -11,57 +11,10 @@ class LightStrategy extends BaseCfg const TYPE_DLS_CACHE = 'DLS_CACHE'; /** - * @var string 使用何种灯光策略(可取值是 LOG_POWER、POWER、UNIFORM、DLS_CACHE 四个字符串之一,当值是DLS_CACHE时,直接光子缓存配置参数开启) + * @var string 使用何种灯光策略(可取值是 LOG_POWER、POWER、UNIFORM、DLS_CACHE 四个字符串之一,当值是 DLS_CACHE 时,直接光子缓存配置参数开启) */ public $type = self::TYPE_LOG_POWER; - /** - * @var float 光照阈值,(取值:0-1的小数) - */ - public $lightthreshold; - - /** - * @var float 目标缓存比率,(取值:0-1的小数) - */ - public $targetcachehitratio; - - /** - * @var integer 最大深度,(取值:大于等于0的整数) - */ - public $maxdepth; - - /** - * @var integer 最大采样数,(取值:大于等于0的整数,默认1000万) - */ - public $maxsamplescount; - - /** - * @var string 直接光缓存文件的路径用文件名 - */ - public $persistentFile; - - /** - * @var object 储存个Entry类对象 - */ - public $entry; - - public function openLightCache() - { - $this->type = self::TYPE_DLS_CACHE; - $this->maxdepth = 4; - $this->maxsamplescount = 1e+07; - $this->persistentFile = "C:\Users\ADMINI~1\AppData\Local\Temp\Untitled.dlsc"; - $this->entry = new Entry(); - } - - public function closeLightCache() - { - $this->type = self::TYPE_LOG_POWER; - $this->maxdepth = null; - $this->maxsamplescount = null; - $this->persistentFile = null; - $this->entry = null; - } } ?> diff --git a/src/scene/Path.php b/src/scene/Path.php index e03a12a..0f52ed8 100644 --- a/src/scene/Path.php +++ b/src/scene/Path.php @@ -12,10 +12,14 @@ class Path extends BaseCfg public $pathDepth; /** - * @var object 存储一个 HybridBackforWard类 对象 + * @var object 存储一个 HybridBackforWard类 对象,在调试模式下不需要输出这些字符串 */ public $hybridBackforWard; + + + + /** * @var bool 是否限制 单象素光线 最大跟踪数量 */ @@ -37,8 +41,6 @@ class Path extends BaseCfg - - /** * 实例 PathDepth类、HybridBackforWard类的两个对象 */ diff --git a/src/scene/Caustic.php b/src/scene/cache/Caustic.php similarity index 94% rename from src/scene/Caustic.php rename to src/scene/cache/Caustic.php index a784a91..e7b087e 100644 --- a/src/scene/Caustic.php +++ b/src/scene/cache/Caustic.php @@ -1,7 +1,7 @@ type = self::TYPE_DLS_CACHE; + $this->entry = new Entry($config); + Base::__construct($config); + } + +} + +?> diff --git a/src/scene/PhotonGI.php b/src/scene/cache/PhotonGI.php similarity index 88% rename from src/scene/PhotonGI.php rename to src/scene/cache/PhotonGI.php index ab1c4c3..e09c02d 100644 --- a/src/scene/PhotonGI.php +++ b/src/scene/cache/PhotonGI.php @@ -1,6 +1,7 @@