diff --git a/examples/print.php b/examples/print.php index 769efd0..874ea5c 100644 --- a/examples/print.php +++ b/examples/print.php @@ -2,15 +2,16 @@ -namespace Blobt\Luxcore\scene\render; -use Blobt\Luxcore\scene\file; +namespace Blobt\Luxcore\scene; +use Blobt\Luxcore\scene\materials\MaterialsBase; +use Blobt\Luxcore\scene\objects\Objects; include dirname(dirname(__FILE__)) . "/vendor/autoload.php"; - +/* //设置打印 渲染引擎 的配置参数 $renderEngine = new RenderEngine(); echo $renderEngine; @@ -55,7 +56,15 @@ $film->outputs[] = new file\ImageSaver(['index' => 5 ]); $film->imagepipelines[5] = [new effect\NoiseReducerOIDN(),new effect\Pretreatment(),new effect\ToneMapLinear(),new effect\AnalogFilmSimulation(),new effect\CammaCorrection()]; echo $film; +*/ + +$scene = new Scene();//创建一个场景, +$scene->objects[0] = new Objects();//在场景中创建一个编号为0的模型, +$scene->materials[7] = new MaterialsBase();//在场景中创建一个编号为7的材质, +$scene->objects[0]->material = 7;//给编号为0的模型,添加编号为7的材质 + +echo $scene; ?> diff --git a/src/scene/Scene.php b/src/scene/Scene.php new file mode 100644 index 0000000..15a00e0 --- /dev/null +++ b/src/scene/Scene.php @@ -0,0 +1,35 @@ + diff --git a/src/scene/materials/Emission.php b/src/scene/materials/Emission.php new file mode 100644 index 0000000..24acc01 --- /dev/null +++ b/src/scene/materials/Emission.php @@ -0,0 +1,61 @@ + diff --git a/src/scene/materials/MaterialsBase.php b/src/scene/materials/MaterialsBase.php new file mode 100644 index 0000000..0c35031 --- /dev/null +++ b/src/scene/materials/MaterialsBase.php @@ -0,0 +1,73 @@ +emission = new Emission(); + $this->visibility = new Visibility(); + Base::__construct($config); + } + +} + +?> diff --git a/src/scene/materials/Visibility.php b/src/scene/materials/Visibility.php new file mode 100644 index 0000000..c960f87 --- /dev/null +++ b/src/scene/materials/Visibility.php @@ -0,0 +1,26 @@ + diff --git a/src/scene/objects/Objects.php b/src/scene/objects/Objects.php new file mode 100644 index 0000000..e95d855 --- /dev/null +++ b/src/scene/objects/Objects.php @@ -0,0 +1,36 @@ +