yuanjiajia
3 years ago
14 changed files with 257 additions and 36 deletions
-
6examples/print.php
-
2src/scene/materials/Disney.php
-
6src/scene/materials/Glossy.php
-
12src/scene/materials/GlossyTranslucent.php
-
18src/scene/materials/MaterialsBase.php
-
2src/scene/materials/emission/Emission.php
-
6src/scene/materials/emission/Visibility.php
-
4src/scene/objects/Objects.php
-
2src/scene/texture/map/ImageMap.php
-
2src/scene/texture/mapping/Triplanar.php
-
13src/scene/volumes/Clear.php
-
72src/scene/volumes/HeteroGeneous.php
-
62src/scene/volumes/HomoGeneous.php
-
86src/scene/volumes/VolumesBase.php
@ -1,9 +1,20 @@ |
|||
<?php |
|||
|
|||
namespace Blobt\Luxcore\scene\volumes; |
|||
use Blobt\Luxcore\core; |
|||
use Blobt\Luxcore\scene\Scene; |
|||
|
|||
class Clear extends VolumesBase |
|||
{ |
|||
{ |
|||
|
|||
const TYPE_CLEAR = 'clear'; |
|||
|
|||
public function __construct($config = []) |
|||
{ |
|||
$this->type = self::TYPE_CLEAR; |
|||
$this->id = Scene::createID(); |
|||
core\Base::__construct($config); |
|||
} |
|||
|
|||
} |
|||
|
|||
|
@ -0,0 +1,72 @@ |
|||
<?php |
|||
|
|||
namespace Blobt\Luxcore\scene\volumes; |
|||
use Blobt\Luxcore\core; |
|||
use Blobt\Luxcore\scene\Scene; |
|||
|
|||
class HomoGeneous extends VolumesBase |
|||
{ |
|||
|
|||
const TYPE_HETEROGENEOUS = 'heterogeneous'; |
|||
|
|||
/** |
|||
* @var string 散射颜色,一个色值或是一个textures(贴图数组)中的某个键名 |
|||
*/ |
|||
public $scattering = '1 1 1'; |
|||
|
|||
/** |
|||
* @var string 非均匀颜色,一个色值或是一个textures(贴图数组)中的某个键名 |
|||
*/ |
|||
public $asymmetry = '0 0 0'; |
|||
|
|||
/** |
|||
* @var bool 多散射,(取值:true或false) |
|||
*/ |
|||
public $multiscattering = false; |
|||
|
|||
/** |
|||
* @var float TODO:步长,具体作用尚未明确,(取值:大于等于0.01的小数) |
|||
*/ |
|||
public $stepsSize = 0.1; |
|||
|
|||
/** |
|||
* @var integer TODO:最大步长,具体作用尚未明确,(取值:大于等于0的整数) |
|||
*/ |
|||
public $stepsMaxcount = 1024; |
|||
|
|||
public function __construct($config = []) |
|||
{ |
|||
$this->type = self::TYPE_HETEROGENEOUS; |
|||
$this->id = Scene::createID(); |
|||
core\Base::__construct($config); |
|||
} |
|||
|
|||
public function setAsymmetry($color) |
|||
{ |
|||
if( is_object($color) ) |
|||
{ |
|||
if( $color->cards != null ) $this->asymmetry = $color->cards; |
|||
else |
|||
{ |
|||
throw new \Exception("You use an unregistered ".$color->getInstanceClassName()." object for the current property"); |
|||
} |
|||
} |
|||
else $this->asymmetry = $color; |
|||
} |
|||
|
|||
public function setScattering($color) |
|||
{ |
|||
if( is_object($color) ) |
|||
{ |
|||
if( $color->cards != null ) $this->scattering = $color->cards; |
|||
else |
|||
{ |
|||
throw new \Exception("You use an unregistered ".$color->getInstanceClassName()." object for the current property"); |
|||
} |
|||
} |
|||
else $this->scattering = $color; |
|||
} |
|||
|
|||
} |
|||
|
|||
?>
|
@ -0,0 +1,62 @@ |
|||
<?php |
|||
|
|||
namespace Blobt\Luxcore\scene\volumes; |
|||
use Blobt\Luxcore\core; |
|||
use Blobt\Luxcore\scene\Scene; |
|||
|
|||
class HomoGeneous extends VolumesBase |
|||
{ |
|||
|
|||
const TYPE_HOMOGENEOUS = 'homogeneous'; |
|||
|
|||
/** |
|||
* @var string 散射颜色,一个色值或是一个textures(贴图数组)中的某个键名 |
|||
*/ |
|||
public $scattering = '1 1 1'; |
|||
|
|||
/** |
|||
* @var string 非均匀颜色,一个色值或是一个textures(贴图数组)中的某个键名 |
|||
*/ |
|||
public $asymmetry = '0 0 0'; |
|||
|
|||
/** |
|||
* @var bool 多散射,(取值:true或false) |
|||
*/ |
|||
public $multiscattering = false; |
|||
|
|||
public function __construct($config = []) |
|||
{ |
|||
$this->type = self::TYPE_HOMOGENEOUS; |
|||
$this->id = Scene::createID(); |
|||
core\Base::__construct($config); |
|||
} |
|||
|
|||
public function setAsymmetry($color) |
|||
{ |
|||
if( is_object($color) ) |
|||
{ |
|||
if( $color->cards != null ) $this->asymmetry = $color->cards; |
|||
else |
|||
{ |
|||
throw new \Exception("You use an unregistered ".$color->getInstanceClassName()." object for the current property"); |
|||
} |
|||
} |
|||
else $this->asymmetry = $color; |
|||
} |
|||
|
|||
public function setScattering($color) |
|||
{ |
|||
if( is_object($color) ) |
|||
{ |
|||
if( $color->cards != null ) $this->scattering = $color->cards; |
|||
else |
|||
{ |
|||
throw new \Exception("You use an unregistered ".$color->getInstanceClassName()." object for the current property"); |
|||
} |
|||
} |
|||
else $this->scattering = $color; |
|||
} |
|||
|
|||
} |
|||
|
|||
?>
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue