yuanjiajia
3 years ago
14 changed files with 428 additions and 24 deletions
-
17examples/print.php
-
12src/scene/Scene.php
-
86src/scene/materials/Disney.php
-
2src/scene/materials/Emission.php
-
57src/scene/materials/Glass.php
-
62src/scene/materials/Glossy.php
-
17src/scene/materials/MaterialsBase.php
-
31src/scene/materials/Metal.php
-
15src/scene/materials/Mix.php
-
15src/scene/materials/NullMaterial.php
-
25src/scene/materials/Roughmatte.php
-
54src/scene/texture/ImageMap.php
-
17src/scene/texture/TextureBase.php
-
42src/scene/texture/mapping/Mapping.php
@ -0,0 +1,54 @@ |
|||
<?php |
|||
|
|||
namespace Blobt\Luxcore\scene\texture; |
|||
use Blobt\Luxcore\scene\Scene; |
|||
use Blobt\Luxcore\core\Base; |
|||
use Blobt\Luxcore\scene\texture\mapping; |
|||
|
|||
class ImageMap extends TextureBase |
|||
{ |
|||
|
|||
const TYPE_IMAGEMAP = 'imagemap'; |
|||
|
|||
/** |
|||
* @var string 光域网文件名及路径,如果为空,则表示不使用光域网 |
|||
*/ |
|||
public $file; |
|||
|
|||
|
|||
/** |
|||
* @var string 亮度增益,当发光强度单位是 artistic 类型时,或是 坎德拉类型且坎德拉参数下勾选为(每平方米时),可以设置此参数,分别 |
|||
* 控制自发光颜色RGB三个通道的放大倍数;否则固定为 1 1 1 |
|||
*/ |
|||
public $gain = "1 1 1"; |
|||
|
|||
/** |
|||
* @var float 校正光域网文件的gamma值,(固定取值:1) |
|||
*/ |
|||
public $gamma; |
|||
|
|||
/** |
|||
* @var bool 是否随机重复 |
|||
*/ |
|||
public $randomizedtilingEnable = false; |
|||
|
|||
/** |
|||
* @var object 铺贴参数,一个Mapping类对象 |
|||
*/ |
|||
public $mapping; |
|||
|
|||
/** |
|||
* @var string 输出图片储存方式 |
|||
*/ |
|||
public $storage = 'byte'; |
|||
|
|||
public function __construct($config = []) |
|||
{ |
|||
$this->id = Scene::createID(); |
|||
$this->mapping = new mapping\Mapping(); |
|||
Base::__construct($config); |
|||
} |
|||
|
|||
} |
|||
|
|||
?>
|
@ -0,0 +1,42 @@ |
|||
<?php |
|||
|
|||
namespace Blobt\Luxcore\scene\texture\mapping; |
|||
use Blobt\Luxcore\scene\BaseCfg; |
|||
|
|||
|
|||
class Mapping extends BaseCfg |
|||
{ |
|||
|
|||
/** |
|||
* @var string 铺贴类型 |
|||
*/ |
|||
public $type; |
|||
|
|||
/** |
|||
* @var integer 当前贴图的ID号(取值:大于0的整数) |
|||
*/ |
|||
public $id; |
|||
|
|||
/** |
|||
* @var string 贴图缩放参数 |
|||
*/ |
|||
public $uvscale = '1 -1'; |
|||
|
|||
/** |
|||
* @var string 贴图偏移参数 |
|||
*/ |
|||
public $uvdelta = '0 1'; |
|||
|
|||
/** |
|||
* @var float 贴图旋转参数 |
|||
*/ |
|||
public $rotation = 0; |
|||
|
|||
/** |
|||
* @var integer UV通道 |
|||
*/ |
|||
public $uvindex = 0; |
|||
|
|||
} |
|||
|
|||
?>
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue