Browse Source

修改了类文件“RenderEngine.php”、“OpenCL.php”、“Native.php”和“print.php”

master
yuanjiajia 3 years ago
parent
commit
97c4517859
  1. 13
      examples/print.php
  2. 13
      src/scene/Native.php
  3. 30
      src/scene/OpenCL.php
  4. 12
      src/scene/Path.php
  5. 16
      src/scene/RenderEngine.php

13
examples/print.php

@ -5,15 +5,18 @@ namespace Blobt\Luxcore\scene;
include dirname(dirname(__FILE__)) . "/vendor/autoload.php";
$renderEngineType = new RenderEngine();
echo $renderEngineType;
//设置打印渲染引擎的配置参数
$renderEngine = new RenderEngine();
echo $renderEngine;
//设置打印GPU渲染设备的配置参数
$openCL = new OpenCL();
echo $openCL;
$cpuThreadsCount = new Native(['threadsCount' => 64]);
echo $cpuThreadsCount;
//设置打印GPU渲染设备的配置参数
$native = new Native(['threadsCount' => 64]);
echo $native;
?>

13
src/scene/Native.php

@ -6,17 +6,8 @@ class Native extends BaseCfg
{
/**
* @var integer //使用多少线程数
* @var integer //使用多少线程数(取值范围: 1 >= $threadsCount )
*/
protected $threadsCount = 4;
/**
* 在CPU渲染模式下,设置使用多少线程数
* @var integer $setThreadsCount 传入一个控制使用多少CPU线程数的整数
*/
public function setThreadsCount($count)
{
$this->threadsCount = $count;
}
public $threadsCount = 4;
}

30
src/scene/OpenCL.php

@ -13,22 +13,22 @@ class OpenCL extends BaseCfg
/**
* @var integral 是否使用cpu渲染,默认是
*/
protected $cpuUse = self::CLOSE;
public $cpuUse = self::CLOSE;
/**
* @var integral 是否使用gpu渲染,默认否
*/
protected $gpuUse = self::OPEN;
public $gpuUse = self::OPEN;
/**
* @var string 在GPU渲染模式下,使用哪些GPU设备
* @var string 控制使用哪些GPU设备的字符串(取值:是一段能标识系统中一个或多个GPU设备的ID字符串)
*/
protected $devicesSelect = '10';
public $devicesSelect = '10';
/**
* @var integral 在GPU渲染模式下,CPU是否渲染,并以多少线程渲染
* @var integral GPU渲染模式下,设置CPU是否渲染和多少线程渲染(取值范围: 0 >= $threadsCount
*/
protected $nativeThreadsCount = 4;
public $nativeThreadsCount = 4;
/**
@ -50,22 +50,4 @@ class OpenCL extends BaseCfg
}
/**
* 在GPU渲染模式下,设置使用哪些GPU设备
* @var string $gpuIdStr 传入一个控制使用哪些GPU设备的字符串
*/
public function selectDevices($gpuIdStr)
{
$this->devicesSelect = $gpuIdStr;
}
/**
* 在GPU渲染模式下,设置CPU是否渲染,并以多少线程渲染
* @var integer $nativeThreadsCount 传入一个控制CPU是否渲染,并以多少线程渲染的整数
*/
public function setNativeThreadsCount($count)
{
$this->nativeThreadsCount = $count;
}
}

12
src/scene/Path.php

@ -4,6 +4,14 @@ namespace Blobt\Luxcore\scene;
class Path extends BaseCfg
{
public $pathdepth = null;
/**
* @var integer 光线追踪的最的深度
*/
public $pathdepthTotal = 7;
public $pathdepthDiffuse = 5;
public $pathdepthGlossy = 5;
public $pathdepthSpecular = 6;
public $hybridbackforwardEnable = 0;
public $hybridbackforwardPartition = 0;
public $hybridbackforwardGlossinessthreshold = 0.049;
}

16
src/scene/RenderEngine.php

@ -5,18 +5,14 @@ namespace Blobt\Luxcore\scene;
class RenderEngine extends BaseCfg
{
/**
* @var string 使用何种渲染引擎
*/
private $type = 'PATHOCL';
const TYPE_PATHCPU = 'PATHCPU';
const TYPE_PATHGPU = 'PATHGPU';
const TYPE_BIDIRCPU = 'BIDIRCPU';
/**
* 设置渲染引擎类型
* @var string $engineStr 传入一个表示渲染引擎类型的字符串
* @var string 使用何种渲染引擎(可取值是 PATHCPU、PATHGPU、BIDIRCPU 三个字符串之一)
*/
public function setRenderEngineType($engineStr)
{
$this->type = $engineStr;
}
public $type = self::TYPE_PATHGPU;
}
Loading…
Cancel
Save