From a9e3eb7d59299bde391cfcb0a82b2db0559a0e78 Mon Sep 17 00:00:00 2001 From: yuanjiajia <1139393632@qq.com> Date: Wed, 16 Mar 2022 09:17:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=B8=80=E4=B8=AA=E5=90=88?= =?UTF-8?q?=E6=88=90=E7=BA=B9=E7=90=86=E7=B1=BB=E6=96=87=E4=BB=B6=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86printScene.php=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/PrintScene.php | 4 +- src/scene/texture/composite/Remap.php | 95 +++++++++++++++++++++++++++ 2 files changed, 97 insertions(+), 2 deletions(-) create mode 100644 src/scene/texture/composite/Remap.php diff --git a/examples/PrintScene.php b/examples/PrintScene.php index e0bf3d6..6245106 100644 --- a/examples/PrintScene.php +++ b/examples/PrintScene.php @@ -13,13 +13,13 @@ $scene = new Scene(); $obj = new objects\Objects( [ 'ply' => 'mesh-10086.ply','appliedtransformation' => '1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1' ] ); //创建一个的模型 -$cloudsMap = new texture\procedural\Clouds(); //创建一个 Clouds类的贴图对象 +$cloudsMap = new texture\procedural\BlenderClouds(); //创建一个 Clouds类的贴图对象 $scene->registerTexture($cloudsMap); //将这个对象注册到 Scene $imageMap = new texture\procedural\ImageMap(); //创建一个 ImageMap类的贴图对象 $scene->registerTexture($imageMap); //将这个对象注册到 Scene -$blend = new texture\procedural\Blend(); //创建一个 Blend类的贴图对象 +$blend = new texture\procedural\BlenderBlend(); //创建一个 Blend类的贴图对象 $scene->registerTexture($blend); //将这个对象注册到 Scene diff --git a/src/scene/texture/composite/Remap.php b/src/scene/texture/composite/Remap.php new file mode 100644 index 0000000..c851d6c --- /dev/null +++ b/src/scene/texture/composite/Remap.php @@ -0,0 +1,95 @@ +type = self::TYPE_REMAP; + $this->id = Scene::createID(); + Base::__construct($config); + } + + /** + * @param object $color 接收一个贴图对象或小数形式的色值,设置颜色通道(输入源) + */ + public function setTexture($color) + { + $this->value = Scene::testAbnormal($color); + } + + /** + * @param object $color 接收一个贴图对象或小数形式的色值,设置源最小色值 + */ + public function setSourcemin($color) + { + $this->sourcemin = Scene::testAbnormal($color); + } + + /** + * @param object $color 接收一个贴图对象或小数形式的色值,设置源最大色值 + */ + public function setSourcemax($color) + { + $this->sourcemax = Scene::testAbnormal($color); + } + + /** + * @param object $color 接收一个贴图对象或小数形式的色值,设置目标最小色值 + */ + public function setTargetmin($color) + { + $this->targetmin = Scene::testAbnormal($color); + } + + /** + * @param object $color 接收一个贴图对象或小数形式的色值,设置目标最大色值 + */ + public function setTargetmax($color) + { + $this->targetmax = Scene::testAbnormal($color); + } + +} + +?>