6 changed files with 39 additions and 143 deletions
-
14examples/print.php
-
6src/scene/Native.php
-
42src/scene/OpenCL.php
-
46src/scene/RenderDevices.php
-
40src/scene/RenderEngine.php
-
34src/scene/TrackerEngine.php
@ -1,46 +0,0 @@ |
|||||
<?php |
|
||||
|
|
||||
namespace Blobt\Luxcore\scene; |
|
||||
|
|
||||
class RenderDevices extends BaseCfg |
|
||||
{ |
|
||||
|
|
||||
public function __toString() |
|
||||
{ |
|
||||
return "错误,不能返回当前类的属性。\n"; |
|
||||
} |
|
||||
|
|
||||
//打开或关闭
|
|
||||
const OPEN = 1; |
|
||||
const CLOSE = 0; |
|
||||
|
|
||||
/** |
|
||||
* @var integral 是否使用cpu渲染,默认是 |
|
||||
*/ |
|
||||
public static $cpuSwitch = self::OPEN; |
|
||||
|
|
||||
/** |
|
||||
* @var integral 是否使用gpu渲染,默认否 |
|
||||
*/ |
|
||||
public static $gpuSwitch = self::CLOSE; |
|
||||
|
|
||||
|
|
||||
/** |
|
||||
* 使用cpu渲染 |
|
||||
*/ |
|
||||
public function useCpu() |
|
||||
{ |
|
||||
self::$cpuSwitch = self::OPEN; |
|
||||
self::$gpuSwitch = self::CLOSE; |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 使用gpu渲染 |
|
||||
*/ |
|
||||
public function useGpu() |
|
||||
{ |
|
||||
self::$cpuSwitch = self::CLOSE; |
|
||||
self::$gpuSwitch = self::OPEN; |
|
||||
} |
|
||||
|
|
||||
} |
|
@ -1,34 +0,0 @@ |
|||||
<?php |
|
||||
|
|
||||
namespace Blobt\Luxcore\scene; |
|
||||
|
|
||||
class TrackerEngine extends BaseCfg |
|
||||
{ |
|
||||
|
|
||||
public function __toString() |
|
||||
{ |
|
||||
return "错误,不能返回当前类的属性。\n"; |
|
||||
} |
|
||||
|
|
||||
|
|
||||
/** |
|
||||
* @var integral 使用何种光线跟踪引擎 |
|
||||
*/ |
|
||||
public static $Engine = 'PATH'; |
|
||||
|
|
||||
|
|
||||
/** |
|
||||
* 设置使用 “PATH” 光线跟踪引擎 |
|
||||
*/ |
|
||||
public function usePath(){ |
|
||||
self::$Engine = 'PATH'; |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 设置使用 “BIDIR” 光线跟踪引擎 |
|
||||
*/ |
|
||||
public function usePidir(){ |
|
||||
self::$Engine = 'BIDIR'; |
|
||||
} |
|
||||
|
|
||||
} |
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue