diff --git a/examples/print.php b/examples/print.php index 43098d1..cf206de 100644 --- a/examples/print.php +++ b/examples/print.php @@ -4,8 +4,6 @@ namespace Blobt\Luxcore\scene; include dirname(dirname(__FILE__)) . "/vendor/autoload.php"; -use Blobt\Luxcore\file; -use Blobt\Luxcore\effect; //设置打印 渲染引擎 的配置参数 diff --git a/src/scene/BaseCfg.php b/src/scene/BaseCfg.php index 18fa600..10f413f 100644 --- a/src/scene/BaseCfg.php +++ b/src/scene/BaseCfg.php @@ -53,7 +53,8 @@ class BaseCfg extends Base $value = $item->getValue($this); if (is_string($value)) { - if( count(explode(" ", $value)) != 3 || in_array(false,array_map('is_numeric',explode(" ", $value))) ) + if( count(explode(" ", $value)) != 3 + || in_array(false,array_map('is_numeric',explode(" ", $value))) ) { $ret .= "{$className}.{$name} = \"{$value}\"\n"; } diff --git a/src/scene/Caustic.php b/src/scene/Caustic.php new file mode 100644 index 0000000..a784a91 --- /dev/null +++ b/src/scene/Caustic.php @@ -0,0 +1,46 @@ + diff --git a/src/scene/Film.php b/src/scene/Film.php index e93eb13..9518384 100644 --- a/src/scene/Film.php +++ b/src/scene/Film.php @@ -2,8 +2,6 @@ namespace Blobt\Luxcore\scene; use Blobt\Luxcore\core\Base; -use Blobt\Luxcore\file; -use Blobt\Luxcore\effect; class Film extends BaseCfg { diff --git a/src/scene/Indirect.php b/src/scene/Indirect.php new file mode 100644 index 0000000..18b99c6 --- /dev/null +++ b/src/scene/Indirect.php @@ -0,0 +1,41 @@ + diff --git a/src/scene/Path.php b/src/scene/Path.php index 5cb6cd0..a156993 100644 --- a/src/scene/Path.php +++ b/src/scene/Path.php @@ -16,6 +16,11 @@ class Path extends BaseCfg */ public $hybridBackforWard; + /** + * @var object 存储一个 GhotonGI类 对象 + */ + public $photonGI; + @@ -30,6 +35,9 @@ class Path extends BaseCfg public $clampingVarianceMaxvalue = 1000; + + + /** * 实例 PathDepth类、HybridBackforWard类的两个对象 */ diff --git a/src/scene/PhotonGI.php b/src/scene/PhotonGI.php new file mode 100644 index 0000000..ab1c4c3 --- /dev/null +++ b/src/scene/PhotonGI.php @@ -0,0 +1,51 @@ +indirect = new Indirect($config); + $this->caustic = new Caustic($config); + Base::__construct($config); + } + +} + +?> diff --git a/src/effect/AnalogFilmSimulation.php b/src/scene/effect/AnalogFilmSimulation.php similarity index 98% rename from src/effect/AnalogFilmSimulation.php rename to src/scene/effect/AnalogFilmSimulation.php index c8ee527..91a4f0e 100644 --- a/src/effect/AnalogFilmSimulation.php +++ b/src/scene/effect/AnalogFilmSimulation.php @@ -1,6 +1,6 @@ diff --git a/src/effect/Mist.php b/src/scene/effect/Mist.php similarity index 92% rename from src/effect/Mist.php rename to src/scene/effect/Mist.php index 301576a..3e864e0 100644 --- a/src/effect/Mist.php +++ b/src/scene/effect/Mist.php @@ -1,13 +1,13 @@