From 72f88c27bacc3c450904b9a736c72008586c01b3 Mon Sep 17 00:00:00 2001 From: yuanjiajia <1139393632@qq.com> Date: Sat, 19 Mar 2022 20:07:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E5=E4=B8=AA=E7=81=AF=E5=85=89?= =?UTF-8?q?=E7=B1=BB=E6=96=87=E4=BB=B6=EF=BC=8CCorlorConst.php=E3=80=81Hdr?= =?UTF-8?q?Image.php=E3=80=81Sky.php=E4=B8=89=E4=B8=AA=E7=B1=BB=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E7=A7=BB=E5=85=A5=E5=88=B0env=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E4=B8=8B=E3=80=82=E5=85=B6=E4=BB=96=E6=9C=89=E5=9B=9B=E4=B8=AA?= =?UTF-8?q?=E7=B1=BB=E6=96=87=E4=BB=B6=E6=9C=89=E4=BF=AE=E6=94=B9=E6=B3=A8?= =?UTF-8?q?=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/scene/lights/DistantStar.php | 73 +++++++++++ src/scene/lights/LightBase.php | 2 +- src/scene/lights/Projection.php | 114 ++++++++++++++++++ src/scene/lights/Sphere.php | 106 ++++++++++++++++ src/scene/lights/Spot.php | 102 ++++++++++++++++ src/scene/lights/Sun.php | 77 ++++++++++++ src/scene/lights/Visibility.php | 2 +- src/scene/lights/{ => env}/CorlorConst.php | 16 ++- src/scene/lights/{ => env}/HdrImage.php | 24 ++-- src/scene/lights/{ => env}/Sky.php | 24 ++-- src/scene/materials/emission/Emission.php | 40 +++--- src/scene/render/cache/VisibilityMapCache.php | 2 +- 12 files changed, 543 insertions(+), 39 deletions(-) create mode 100644 src/scene/lights/DistantStar.php create mode 100644 src/scene/lights/Projection.php create mode 100644 src/scene/lights/Sphere.php create mode 100644 src/scene/lights/Spot.php create mode 100644 src/scene/lights/Sun.php rename src/scene/lights/{ => env}/CorlorConst.php (75%) rename src/scene/lights/{ => env}/HdrImage.php (71%) rename src/scene/lights/{ => env}/Sky.php (76%) diff --git a/src/scene/lights/DistantStar.php b/src/scene/lights/DistantStar.php new file mode 100644 index 0000000..8af8bb4 --- /dev/null +++ b/src/scene/lights/DistantStar.php @@ -0,0 +1,73 @@ +type = self::TYPE_DISTANT; + $this->id = Scene::createID(); + Base::__construct($config); + } +} + +?> diff --git a/src/scene/lights/LightBase.php b/src/scene/lights/LightBase.php index 849756b..a0532d1 100644 --- a/src/scene/lights/LightBase.php +++ b/src/scene/lights/LightBase.php @@ -1,6 +1,6 @@ type = self::TYPE_PROJECTION; + $this->id = Scene::createID(); + Base::__construct($config); + } +} + +?> diff --git a/src/scene/lights/Sphere.php b/src/scene/lights/Sphere.php new file mode 100644 index 0000000..d5377cc --- /dev/null +++ b/src/scene/lights/Sphere.php @@ -0,0 +1,106 @@ +type = self::TYPE_SPHERE; + $this->id = Scene::createID(); + Base::__construct($config); + } +} + +?> diff --git a/src/scene/lights/Spot.php b/src/scene/lights/Spot.php new file mode 100644 index 0000000..4e09133 --- /dev/null +++ b/src/scene/lights/Spot.php @@ -0,0 +1,102 @@ +type = self::TYPE_SPOT; + $this->id = Scene::createID(); + Base::__construct($config); + } +} + +?> diff --git a/src/scene/lights/Sun.php b/src/scene/lights/Sun.php new file mode 100644 index 0000000..f984642 --- /dev/null +++ b/src/scene/lights/Sun.php @@ -0,0 +1,77 @@ +visibility = $visibility; + else $this->visibility = new Visibility(); + $this->type = self::TYPE_SUN; + $this->id = Scene::createID(); + Base::__construct($config); + } +} + +?> diff --git a/src/scene/lights/Visibility.php b/src/scene/lights/Visibility.php index 30c713f..857e393 100644 --- a/src/scene/lights/Visibility.php +++ b/src/scene/lights/Visibility.php @@ -1,6 +1,6 @@ diff --git a/src/scene/render/cache/VisibilityMapCache.php b/src/scene/render/cache/VisibilityMapCache.php index 637bde0..4000549 100644 --- a/src/scene/render/cache/VisibilityMapCache.php +++ b/src/scene/render/cache/VisibilityMapCache.php @@ -50,7 +50,7 @@ class VisibilityMapCache extends BaseCfg public $visibilityTargethitrate = 0.99; /** - * @var integer TODO:具体作用尚未明确(默认取值:0) + * @var integer TODO:可见范围(半径),具体作用尚未明确(默认取值:0) */ public $visibilityRadius = 0;