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的小数) */