From 470cf60095eda13e84d55eb01ce8f9d5dae58201 Mon Sep 17 00:00:00 2001 From: yuanjiajia <1139393632@qq.com> Date: Mon, 21 Mar 2022 09:49:28 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=B8=E6=9C=BA=E7=B1=BB=E5=9E=8B=E5=AD=97?= =?UTF-8?q?=E7=AC=A6=E4=B8=B2=E4=B8=8D=E5=B8=B8=E9=87=8F=E7=A7=BB=E5=88=B0?= =?UTF-8?q?=E4=BA=86base=E7=B1=BB=E6=96=87=E4=BB=B6=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/scene/camera/CameraBase.php | 9 ++++++++- src/scene/camera/Environment.php | 7 ------- src/scene/camera/Orthographic.php | 9 +-------- src/scene/camera/Perspective.php | 7 ------- 4 files changed, 9 insertions(+), 23 deletions(-) diff --git a/src/scene/camera/CameraBase.php b/src/scene/camera/CameraBase.php index e83fe11..88e349e 100644 --- a/src/scene/camera/CameraBase.php +++ b/src/scene/camera/CameraBase.php @@ -5,9 +5,16 @@ use Blobt\Luxcore\scene\BaseCfg; class CameraBase extends BaseCfg { + + /** + * 相机类型 + */ + const TYPE_PERSPECTIVE = 'perspective'; //透视相机 + const TYPE_ORTHOGRAPHIC = 'orthographic'; //正交相机 + const TYPE_ENVIRONMENT = 'environment'; //全景相机 /** - * @var string 相机类型 + * @var string 相机类型,取值为一个 相机类型 字符串常量 */ public $type; diff --git a/src/scene/camera/Environment.php b/src/scene/camera/Environment.php index 7820f37..e4cb6a4 100644 --- a/src/scene/camera/Environment.php +++ b/src/scene/camera/Environment.php @@ -6,13 +6,6 @@ use Blobt\Luxcore\core\Base; class Environment extends Camerabase { - /** - * 全景相机 - */ - const TYPE_ENVIRONMENT = 'environment'; - - - /** * @var string 视野中心偏移,视野中心为平面坐标原点O(字母O),前两个数分别代表视野 X轴上的的最左侧和最右侧边缘的位置, * 后两个数分别代表视野 Y轴上最下侧边缘和最上侧边缘的位置 diff --git a/src/scene/camera/Orthographic.php b/src/scene/camera/Orthographic.php index f269d16..e1ce485 100644 --- a/src/scene/camera/Orthographic.php +++ b/src/scene/camera/Orthographic.php @@ -5,14 +5,7 @@ use Blobt\Luxcore\core\Base; class Orthographic extends Camerabase { - - /** - * 正交相机 - */ - const TYPE_ORTHOGRAPHIC = 'orthographic'; - - - + /** * @var string 视野中心偏移,视野中心为平面坐标原点O(字母O),前两个数分别代表视野 X轴上的的最左侧和最右侧边缘的位置, * 后两个数分别代表视野 Y轴上最下侧边缘和最上侧边缘的位置 diff --git a/src/scene/camera/Perspective.php b/src/scene/camera/Perspective.php index 42e9dab..2f50261 100644 --- a/src/scene/camera/Perspective.php +++ b/src/scene/camera/Perspective.php @@ -6,13 +6,6 @@ use Blobt\Luxcore\core\Base; class Perspective extends CameraBase { - /** - * 透视相机 - */ - const TYPE_PERSPECTIVE = 'perspective'; - - - /** * @var float 视野,单位度(取值:0.367-173的小数) */