Browse Source

新增三个发光纹理类文件,至此,材质、纹理功能的类文件已经完成;Scene类中testAbnormal()涵数更名为judgeAttribute(),并移入到材质、纹理Base类中,其相应的set函数对该函数的调用也做了修改,examples目录中的文件名首字母已改为小写

master
yuanjiajia 3 years ago
parent
commit
7b55d1bc42
  1. 0
      examples/printRender.php
  2. 0
      examples/printScene.php
  3. 58
      src/scene/Scene.php
  4. 24
      src/scene/materials/CarPaint.php
  5. 8
      src/scene/materials/Cloth.php
  6. 28
      src/scene/materials/Disney.php
  7. 12
      src/scene/materials/Glass.php
  8. 10
      src/scene/materials/GlassArch.php
  9. 14
      src/scene/materials/GlassRough.php
  10. 14
      src/scene/materials/Glossy.php
  11. 12
      src/scene/materials/GlossyCoating.php
  12. 28
      src/scene/materials/GlossyTranslucent.php
  13. 35
      src/scene/materials/MaterialsBase.php
  14. 2
      src/scene/materials/Matte.php
  15. 4
      src/scene/materials/MatteRough.php
  16. 4
      src/scene/materials/MatteTranslucent.php
  17. 6
      src/scene/materials/Metal.php
  18. 2
      src/scene/materials/Mirror.php
  19. 6
      src/scene/materials/Mix.php
  20. 4
      src/scene/materials/TwoSided.php
  21. 10
      src/scene/materials/Velvet.php
  22. 25
      src/scene/objects/Objects.php
  23. 23
      src/scene/texture/TextureBase.php
  24. 2
      src/scene/texture/composite/Absolute.php
  25. 4
      src/scene/texture/composite/Add.php
  26. 2
      src/scene/texture/composite/Clamp.php
  27. 4
      src/scene/texture/composite/Divide.php
  28. 4
      src/scene/texture/composite/Dotproduct.php
  29. 4
      src/scene/texture/composite/GreaterThan.php
  30. 4
      src/scene/texture/composite/LessThan.php
  31. 6
      src/scene/texture/composite/MakeFloat3.php
  32. 6
      src/scene/texture/composite/Mix.php
  33. 4
      src/scene/texture/composite/Modulo.php
  34. 4
      src/scene/texture/composite/Power.php
  35. 10
      src/scene/texture/composite/Remap.php
  36. 4
      src/scene/texture/composite/Rounding.php
  37. 4
      src/scene/texture/composite/Scale.php
  38. 2
      src/scene/texture/composite/SplitFloat3.php
  39. 4
      src/scene/texture/composite/Subtract.php
  40. 4
      src/scene/texture/deformation/Distort.php
  41. 45
      src/scene/texture/luminous/BlackBody.php
  42. 50
      src/scene/texture/luminous/IrregularData.php
  43. 174
      src/scene/texture/luminous/PresetLamp.php
  44. 6
      src/scene/texture/procedural/Brick.php
  45. 4
      src/scene/texture/procedural/Checkerboard2d.php
  46. 4
      src/scene/texture/procedural/Checkerboard3d.php
  47. 2
      src/scene/texture/procedural/Fresnelcolor.php
  48. 4
      src/scene/texture/procedural/Fresnelconst.php
  49. 2
      src/scene/texture/procedural/Random.php
  50. 6
      src/scene/texture/tint/BrightContrast.php
  51. 8
      src/scene/texture/tint/Hsv.php
  52. 4
      src/scene/texture/tint/Subtract.php
  53. 4
      src/scene/volumes/HeteroGeneous.php
  54. 4
      src/scene/volumes/HomoGeneous.php
  55. 32
      src/scene/volumes/VolumesBase.php

examples/PrintRender.php → examples/printRender.php

examples/PrintScene.php → examples/printScene.php

58
src/scene/Scene.php

@ -47,36 +47,14 @@ class Scene extends BaseCfg
return $num; return $num;
} }
/**
* @param object $value 接收的是一个 由模型、材质、体积、纹理、灯光、相机类set函数 所接收到的值,本函数可以被这些类set函数调用,
* 并判断set函数接收到值是否合法,合法则返回$value,否则抛出一个异常
*/
public static function testAbnormal($value)
{
if( is_object($value) )
{
if( $value->registerId != null )
{
return $value->registerId;
}
else
{
throw new \Exception("You use an unregistered ".$value->getInstanceClassName()." object for the current property");
}
}
else
{
return $value;
}
}
/** /**
* @param object $obj 接收一个模型类对象,为其颁发一个注册信息,并将其存到Scene * @param object $obj 接收一个模型类对象,为其颁发一个注册信息,并将其存到Scene
*/ */
public function registerObjects(&$obj) public function registerObjects(&$obj)
{ {
$temp = sprintf("%014d",$obj->id);
$obj->registerId = $temp;
$id = sprintf("%014d",$obj->id);
$obj->registerId = $id;
if($obj->material == null) if($obj->material == null)
{ {
if( !array_key_exists('__default',$this->materials ) ) if( !array_key_exists('__default',$this->materials ) )
@ -85,7 +63,7 @@ class Scene extends BaseCfg
} }
$obj->material = '__default'; $obj->material = '__default';
} }
$this->objects[$temp] = $obj;
$this->objects[$id] = $obj;
} }
/** /**
@ -93,9 +71,9 @@ class Scene extends BaseCfg
*/ */
public function registerMaterial(&$material) public function registerMaterial(&$material)
{ {
$temp = $material->type.'_'.sprintf("%014d",$material->id);
$material->registerId = $temp;
$this->materials[$temp] = $material;
$id = $material->type.'_'.sprintf("%014d",$material->id);
$material->registerId = $id;
$this->materials[$id] = $material;
} }
/** /**
@ -103,9 +81,9 @@ class Scene extends BaseCfg
*/ */
public function registerTexture(&$texture) public function registerTexture(&$texture)
{ {
$temp = $texture->type.'_'.sprintf("%014d",$texture->id);
$texture->registerId = $temp;
$this->textures[$temp] = $texture;
$id = $texture->type.'_'.sprintf("%014d",$texture->id);
$texture->registerId = $id;
$this->textures[$id] = $texture;
} }
/** /**
@ -113,9 +91,9 @@ class Scene extends BaseCfg
*/ */
public function registerVolume(&$volume) public function registerVolume(&$volume)
{ {
$temp = $volume->type.'_'.sprintf("%014d",$volume->id);
$volume->registerId = $temp;
$this->volumes[$temp] = $volume;
$id = $volume->type.'_'.sprintf("%014d",$volume->id);
$volume->registerId = $id;
$this->volumes[$id] = $volume;
} }
/** /**
@ -123,9 +101,9 @@ class Scene extends BaseCfg
*/ */
public function registerLight(&$light) public function registerLight(&$light)
{ {
$temp = $light->type.'_'.sprintf("%014d",$light->id);
$light->registerId = $temp;
$this->lights[$temp] = $light;
$id = $light->type.'_'.sprintf("%014d",$light->id);
$light->registerId = $id;
$this->lights[$id] = $light;
} }
/** /**
@ -133,9 +111,9 @@ class Scene extends BaseCfg
*/ */
public function registerCamera(&$camera) public function registerCamera(&$camera)
{ {
$temp = $camera->type.'_'.sprintf("%014d",$camera->id);
$camera->registerId = $temp;
$this->cameras[$temp] = $camera;
$id = $camera->type.'_'.sprintf("%014d",$camera->id);
$camera->registerId = $id;
$this->cameras[$id] = $camera;
} }
} }

24
src/scene/materials/CarPaint.php

@ -88,7 +88,7 @@ class CarPaint extends MaterialsBase
*/ */
public function setBaseColor($color) public function setBaseColor($color)
{ {
$this->kd = Scene::testAbnormal($color);
$this->kd = $this->judgeAttribute($color);
} }
/** /**
@ -96,7 +96,7 @@ class CarPaint extends MaterialsBase
*/ */
public function setSpecular1($color) public function setSpecular1($color)
{ {
$this->ks1 = Scene::testAbnormal($color);
$this->ks1 = $this->judgeAttribute($color);
} }
/** /**
@ -104,7 +104,7 @@ class CarPaint extends MaterialsBase
*/ */
public function setSpecular2($color) public function setSpecular2($color)
{ {
$this->ks2 = Scene::testAbnormal($color);
$this->ks2 = $this->judgeAttribute($color);
} }
/** /**
@ -112,7 +112,7 @@ class CarPaint extends MaterialsBase
*/ */
public function setSpecular3($color) public function setSpecular3($color)
{ {
$this->ks3 = Scene::testAbnormal($color);
$this->ks3 = $this->judgeAttribute($color);
} }
/** /**
@ -120,7 +120,7 @@ class CarPaint extends MaterialsBase
*/ */
public function setMicrofacetRoughness1($color) public function setMicrofacetRoughness1($color)
{ {
$this->m1 = Scene::testAbnormal($color);
$this->m1 = $this->judgeAttribute($color);
} }
/** /**
@ -128,7 +128,7 @@ class CarPaint extends MaterialsBase
*/ */
public function setMicrofacetRoughness2($color) public function setMicrofacetRoughness2($color)
{ {
$this->m2 = Scene::testAbnormal($color);
$this->m2 = $this->judgeAttribute($color);
} }
/** /**
@ -136,7 +136,7 @@ class CarPaint extends MaterialsBase
*/ */
public function setMicrofacetRoughness3($color) public function setMicrofacetRoughness3($color)
{ {
$this->m3 = Scene::testAbnormal($color);
$this->m3 = $this->judgeAttribute($color);
} }
/** /**
@ -144,7 +144,7 @@ class CarPaint extends MaterialsBase
*/ */
public function setGlossy1($color) public function setGlossy1($color)
{ {
$this->r1 = Scene::testAbnormal($color);
$this->r1 = $this->judgeAttribute($color);
} }
/** /**
@ -152,7 +152,7 @@ class CarPaint extends MaterialsBase
*/ */
public function setGlossy2($color) public function setGlossy2($color)
{ {
$this->r2 = Scene::testAbnormal($color);
$this->r2 = $this->judgeAttribute($color);
} }
/** /**
@ -160,7 +160,7 @@ class CarPaint extends MaterialsBase
*/ */
public function setGlossy3($color) public function setGlossy3($color)
{ {
$this->r3 = Scene::testAbnormal($color);
$this->r3 = $this->judgeAttribute($color);
} }
/** /**
@ -169,7 +169,7 @@ class CarPaint extends MaterialsBase
*/ */
public function setAbsorption($color) public function setAbsorption($color)
{ {
$this->ka = Scene::testAbnormal($color);
$this->ka = $this->judgeAttribute($color);
} }
/** /**
@ -177,7 +177,7 @@ class CarPaint extends MaterialsBase
*/ */
public function setAbsorptionDepht($color) public function setAbsorptionDepht($color)
{ {
$this->d = Scene::testAbnormal($color);
$this->d = $this->judgeAttribute($color);
} }
} }

8
src/scene/materials/Cloth.php

@ -71,7 +71,7 @@ class Cloth extends MaterialsBase
*/ */
public function setWarpBaseColor($color) public function setWarpBaseColor($color)
{ {
$this->warp_kd = Scene::testAbnormal($color);
$this->warp_kd = $this->judgeAttribute($color);
} }
/** /**
@ -79,7 +79,7 @@ class Cloth extends MaterialsBase
*/ */
public function setWeftBaseColor($color) public function setWeftBaseColor($color)
{ {
$this->weft_kd = Scene::testAbnormal($color);
$this->weft_kd = $this->judgeAttribute($color);
} }
/** /**
@ -87,7 +87,7 @@ class Cloth extends MaterialsBase
*/ */
public function setWarpSpecular($color) public function setWarpSpecular($color)
{ {
$this->warp_ks = Scene::testAbnormal($color);
$this->warp_ks = $this->judgeAttribute($color);
} }
/** /**
@ -95,7 +95,7 @@ class Cloth extends MaterialsBase
*/ */
public function setWeftSpecular($color) public function setWeftSpecular($color)
{ {
$this->weft_ks = Scene::testAbnormal($color);
$this->weft_ks = $this->judgeAttribute($color);
} }
} }

28
src/scene/materials/Disney.php

@ -98,7 +98,7 @@ class Disney extends MaterialsBase
*/ */
public function setBaseColor($color) public function setBaseColor($color)
{ {
$this->basecolor = Scene::testAbnormal($color);
$this->basecolor = $this->judgeAttribute($color);
} }
/** /**
@ -106,7 +106,7 @@ class Disney extends MaterialsBase
*/ */
public function setSubsurface($color) public function setSubsurface($color)
{ {
$this->subsurface = Scene::testAbnormal($color);
$this->subsurface = $this->judgeAttribute($color);
} }
/** /**
@ -114,7 +114,7 @@ class Disney extends MaterialsBase
*/ */
public function setMetallic($color) public function setMetallic($color)
{ {
$this->metallic = Scene::testAbnormal($color);
$this->metallic = $this->judgeAttribute($color);
} }
/** /**
@ -122,7 +122,7 @@ class Disney extends MaterialsBase
*/ */
public function setSpecular($color) public function setSpecular($color)
{ {
$this->specular = Scene::testAbnormal($color);
$this->specular = $this->judgeAttribute($color);
} }
/** /**
@ -130,7 +130,7 @@ class Disney extends MaterialsBase
*/ */
public function setSpeculartint($color) public function setSpeculartint($color)
{ {
$this->speculartint = Scene::testAbnormal($color);
$this->speculartint = $this->judgeAttribute($color);
} }
/** /**
@ -138,7 +138,7 @@ class Disney extends MaterialsBase
*/ */
public function setRoughness($color) public function setRoughness($color)
{ {
$this->roughness = Scene::testAbnormal($color);
$this->roughness = $this->judgeAttribute($color);
} }
/** /**
@ -146,7 +146,7 @@ class Disney extends MaterialsBase
*/ */
public function setAnisotropic($color) public function setAnisotropic($color)
{ {
$this->anisotropic = Scene::testAbnormal($color);
$this->anisotropic = $this->judgeAttribute($color);
} }
/** /**
@ -154,7 +154,7 @@ class Disney extends MaterialsBase
*/ */
public function setSheen($color) public function setSheen($color)
{ {
$this->sheen = Scene::testAbnormal($color);
$this->sheen = $this->judgeAttribute($color);
} }
/** /**
@ -162,7 +162,7 @@ class Disney extends MaterialsBase
*/ */
public function setSheentint($color) public function setSheentint($color)
{ {
$this->sheentint = Scene::testAbnormal($color);
$this->sheentint = $this->judgeAttribute($color);
} }
/** /**
@ -170,7 +170,7 @@ class Disney extends MaterialsBase
*/ */
public function setClearcoat($color) public function setClearcoat($color)
{ {
$this->clearcoat = Scene::testAbnormal($color);
$this->clearcoat = $this->judgeAttribute($color);
} }
/** /**
@ -178,7 +178,7 @@ class Disney extends MaterialsBase
*/ */
public function setClearcoatgloss($color) public function setClearcoatgloss($color)
{ {
$this->clearcoatgloss = Scene::testAbnormal($color);
$this->clearcoatgloss = $this->judgeAttribute($color);
} }
/** /**
@ -186,7 +186,7 @@ class Disney extends MaterialsBase
*/ */
public function setFilmamount($color) public function setFilmamount($color)
{ {
$this->filmamount = Scene::testAbnormal($color);
$this->filmamount = $this->judgeAttribute($color);
} }
/** /**
@ -194,7 +194,7 @@ class Disney extends MaterialsBase
*/ */
public function setFilmthickness($color) public function setFilmthickness($color)
{ {
$this->filmthickness = Scene::testAbnormal($color);
$this->filmthickness = $this->judgeAttribute($color);
} }
/** /**
@ -202,7 +202,7 @@ class Disney extends MaterialsBase
*/ */
public function setFilmior($color) public function setFilmior($color)
{ {
$this->filmior = Scene::testAbnormal($color);
$this->filmior = $this->judgeAttribute($color);
} }
} }

12
src/scene/materials/Glass.php

@ -59,7 +59,7 @@ class Glass extends MaterialsBase
*/ */
public function setFilmthickness($color) public function setFilmthickness($color)
{ {
$this->filmthickness = Scene::testAbnormal($color);
$this->filmthickness = $this->judgeAttribute($color);
} }
/** /**
@ -67,7 +67,7 @@ class Glass extends MaterialsBase
*/ */
public function setFilmior($color) public function setFilmior($color)
{ {
$this->filmior = Scene::testAbnormal($color);
$this->filmior = $this->judgeAttribute($color);
} }
/** /**
@ -75,7 +75,7 @@ class Glass extends MaterialsBase
*/ */
public function setTransmission($color) public function setTransmission($color)
{ {
$this->kt = Scene::testAbnormal($color);
$this->kt = $this->judgeAttribute($color);
} }
/** /**
@ -83,7 +83,7 @@ class Glass extends MaterialsBase
*/ */
public function setRefraction($color) public function setRefraction($color)
{ {
$this->kr = Scene::testAbnormal($color);
$this->kr = $this->judgeAttribute($color);
} }
/** /**
@ -91,7 +91,7 @@ class Glass extends MaterialsBase
*/ */
public function setInteriorIor($color) public function setInteriorIor($color)
{ {
$this->interiorior = Scene::testAbnormal($color);
$this->interiorior = $this->judgeAttribute($color);
} }
/** /**
@ -99,7 +99,7 @@ class Glass extends MaterialsBase
*/ */
public function setCauchyb($color) public function setCauchyb($color)
{ {
$this->cauchyb = Scene::testAbnormal($color);
$this->cauchyb = $this->judgeAttribute($color);
} }
} }

10
src/scene/materials/GlassArch.php

@ -56,7 +56,7 @@ class GlassArch extends MaterialsBase
*/ */
public function setFilmthickness($color) public function setFilmthickness($color)
{ {
$this->filmthickness = Scene::testAbnormal($color);
$this->filmthickness = $this->judgeAttribute($color);
} }
/** /**
@ -64,7 +64,7 @@ class GlassArch extends MaterialsBase
*/ */
public function setFilmior($color) public function setFilmior($color)
{ {
$this->filmior = Scene::testAbnormal($color);
$this->filmior = $this->judgeAttribute($color);
} }
/** /**
@ -72,7 +72,7 @@ class GlassArch extends MaterialsBase
*/ */
public function setTransmission($color) public function setTransmission($color)
{ {
$this->kt = Scene::testAbnormal($color);
$this->kt = $this->judgeAttribute($color);
} }
/** /**
@ -80,7 +80,7 @@ class GlassArch extends MaterialsBase
*/ */
public function setRefraction($color) public function setRefraction($color)
{ {
$this->kr = Scene::testAbnormal($color);
$this->kr = $this->judgeAttribute($color);
} }
/** /**
@ -88,7 +88,7 @@ class GlassArch extends MaterialsBase
*/ */
public function setInteriorIor($color) public function setInteriorIor($color)
{ {
$this->interiorior = Scene::testAbnormal($color);
$this->interiorior = $this->judgeAttribute($color);
} }
} }

14
src/scene/materials/GlassRough.php

@ -64,7 +64,7 @@ class GlassRough extends MaterialsBase
*/ */
public function setUroughness($color) public function setUroughness($color)
{ {
$this->uroughness = Scene::testAbnormal($color);
$this->uroughness = $this->judgeAttribute($color);
} }
/** /**
@ -72,7 +72,7 @@ class GlassRough extends MaterialsBase
*/ */
public function setVroughness($color) public function setVroughness($color)
{ {
$this->vroughness = Scene::testAbnormal($color);
$this->vroughness = $this->judgeAttribute($color);
} }
/** /**
@ -80,7 +80,7 @@ class GlassRough extends MaterialsBase
*/ */
public function setFilmthickness($color) public function setFilmthickness($color)
{ {
$this->filmthickness = Scene::testAbnormal($color);
$this->filmthickness = $this->judgeAttribute($color);
} }
/** /**
@ -88,7 +88,7 @@ class GlassRough extends MaterialsBase
*/ */
public function setFilmior($color) public function setFilmior($color)
{ {
$this->filmior = Scene::testAbnormal($color);
$this->filmior = $this->judgeAttribute($color);
} }
/** /**
@ -96,7 +96,7 @@ class GlassRough extends MaterialsBase
*/ */
public function setTransmission($color) public function setTransmission($color)
{ {
$this->kt = Scene::testAbnormal($color);
$this->kt = $this->judgeAttribute($color);
} }
/** /**
@ -104,7 +104,7 @@ class GlassRough extends MaterialsBase
*/ */
public function setRefraction($color) public function setRefraction($color)
{ {
$this->kr = Scene::testAbnormal($color);
$this->kr = $this->judgeAttribute($color);
} }
/** /**
@ -112,7 +112,7 @@ class GlassRough extends MaterialsBase
*/ */
public function setInteriorIor($color) public function setInteriorIor($color)
{ {
$this->interiorior = Scene::testAbnormal($color);
$this->interiorior = $this->judgeAttribute($color);
} }
} }

14
src/scene/materials/Glossy.php

@ -68,7 +68,7 @@ class Glossy extends MaterialsBase
*/ */
public function setUroughness($color) public function setUroughness($color)
{ {
$this->uroughness = Scene::testAbnormal($color);
$this->uroughness = $this->judgeAttribute($color);
} }
/** /**
@ -76,7 +76,7 @@ class Glossy extends MaterialsBase
*/ */
public function setVroughness($color) public function setVroughness($color)
{ {
$this->vroughness = Scene::testAbnormal($color);
$this->vroughness = $this->judgeAttribute($color);
} }
/** /**
@ -84,7 +84,7 @@ class Glossy extends MaterialsBase
*/ */
public function setBaseColor($color) public function setBaseColor($color)
{ {
$this->kd = Scene::testAbnormal($color);
$this->kd = $this->judgeAttribute($color);
} }
/** /**
@ -92,7 +92,7 @@ class Glossy extends MaterialsBase
*/ */
public function setSpecular($color) public function setSpecular($color)
{ {
$this->ks = Scene::testAbnormal($color);
$this->ks = $this->judgeAttribute($color);
} }
/** /**
@ -101,7 +101,7 @@ class Glossy extends MaterialsBase
*/ */
public function setAbsorption($color) public function setAbsorption($color)
{ {
$this->ka = Scene::testAbnormal($color);
$this->ka = $this->judgeAttribute($color);
} }
/** /**
@ -109,7 +109,7 @@ class Glossy extends MaterialsBase
*/ */
public function setAbsorptionDepht($color) public function setAbsorptionDepht($color)
{ {
$this->d = Scene::testAbnormal($color);
$this->d = $this->judgeAttribute($color);
} }
/** /**
@ -117,7 +117,7 @@ class Glossy extends MaterialsBase
*/ */
public function setIor($color) public function setIor($color)
{ {
$this->index = Scene::testAbnormal($color);
$this->index = $this->judgeAttribute($color);
} }
} }

12
src/scene/materials/GlossyCoating.php

@ -69,7 +69,7 @@ class GlossyCoating extends MaterialsBase
*/ */
public function setUroughness($color) public function setUroughness($color)
{ {
$this->uroughness = Scene::testAbnormal($color);
$this->uroughness = $this->judgeAttribute($color);
} }
/** /**
@ -77,7 +77,7 @@ class GlossyCoating extends MaterialsBase
*/ */
public function setVroughness($color) public function setVroughness($color)
{ {
$this->vroughness = Scene::testAbnormal($color);
$this->vroughness = $this->judgeAttribute($color);
} }
/** /**
@ -93,7 +93,7 @@ class GlossyCoating extends MaterialsBase
*/ */
public function setSpecular($color) public function setSpecular($color)
{ {
$this->ks = Scene::testAbnormal($color);
$this->ks = $this->judgeAttribute($color);
} }
/** /**
@ -102,7 +102,7 @@ class GlossyCoating extends MaterialsBase
*/ */
public function setAbsorption($color) public function setAbsorption($color)
{ {
$this->ka = Scene::testAbnormal($color);
$this->ka = $this->judgeAttribute($color);
} }
/** /**
@ -110,7 +110,7 @@ class GlossyCoating extends MaterialsBase
*/ */
public function setAbsorptionDepht($color) public function setAbsorptionDepht($color)
{ {
$this->d = Scene::testAbnormal($color);
$this->d = $this->judgeAttribute($color);
} }
/** /**
@ -118,7 +118,7 @@ class GlossyCoating extends MaterialsBase
*/ */
public function setIor($color) public function setIor($color)
{ {
$this->index = Scene::testAbnormal($color);
$this->index = $this->judgeAttribute($color);
} }
} }

28
src/scene/materials/GlossyTranslucent.php

@ -113,7 +113,7 @@ class GlossyTranslucent extends MaterialsBase
*/ */
public function setUroughness($color) public function setUroughness($color)
{ {
$this->uroughness = Scene::testAbnormal($color);
$this->uroughness = $this->judgeAttribute($color);
} }
/** /**
@ -121,7 +121,7 @@ class GlossyTranslucent extends MaterialsBase
*/ */
public function setVroughness($color) public function setVroughness($color)
{ {
$this->vroughness = Scene::testAbnormal($color);
$this->vroughness = $this->judgeAttribute($color);
} }
/** /**
@ -129,7 +129,7 @@ class GlossyTranslucent extends MaterialsBase
*/ */
public function setBaseColor($color) public function setBaseColor($color)
{ {
$this->kd = Scene::testAbnormal($color);
$this->kd = $this->judgeAttribute($color);
} }
/** /**
@ -137,7 +137,7 @@ class GlossyTranslucent extends MaterialsBase
*/ */
public function setSpecular($color) public function setSpecular($color)
{ {
$this->ks = Scene::testAbnormal($color);
$this->ks = $this->judgeAttribute($color);
} }
/** /**
@ -145,7 +145,7 @@ class GlossyTranslucent extends MaterialsBase
*/ */
public function setTransmission($color) public function setTransmission($color)
{ {
$this->kt = Scene::testAbnormal($color);
$this->kt = $this->judgeAttribute($color);
} }
/** /**
@ -154,7 +154,7 @@ class GlossyTranslucent extends MaterialsBase
*/ */
public function setAbsorption($color) public function setAbsorption($color)
{ {
$this->ka = Scene::testAbnormal($color);
$this->ka = $this->judgeAttribute($color);
} }
/** /**
@ -162,7 +162,7 @@ class GlossyTranslucent extends MaterialsBase
*/ */
public function setAbsorptionDepht($color) public function setAbsorptionDepht($color)
{ {
$this->d = Scene::testAbnormal($color);
$this->d = $this->judgeAttribute($color);
} }
/** /**
@ -170,7 +170,7 @@ class GlossyTranslucent extends MaterialsBase
*/ */
public function setIor($color) public function setIor($color)
{ {
$this->index = Scene::testAbnormal($color);
$this->index = $this->judgeAttribute($color);
} }
@ -182,7 +182,7 @@ class GlossyTranslucent extends MaterialsBase
*/ */
public function setUroughness_BF($color) public function setUroughness_BF($color)
{ {
$this->uroughness_bf = Scene::testAbnormal($color);
$this->uroughness_bf = $this->judgeAttribute($color);
} }
/** /**
@ -190,7 +190,7 @@ class GlossyTranslucent extends MaterialsBase
*/ */
public function setVroughness_BF($color) public function setVroughness_BF($color)
{ {
$this->vroughness_bf = Scene::testAbnormal($color);
$this->vroughness_bf = $this->judgeAttribute($color);
} }
/** /**
@ -198,7 +198,7 @@ class GlossyTranslucent extends MaterialsBase
*/ */
public function setSpecular_BF($color) public function setSpecular_BF($color)
{ {
$this->ks_bf = Scene::testAbnormal($color);
$this->ks_bf = $this->judgeAttribute($color);
} }
/** /**
@ -207,7 +207,7 @@ class GlossyTranslucent extends MaterialsBase
*/ */
public function setAbsorption_BF($color) public function setAbsorption_BF($color)
{ {
$this->ka_bf = Scene::testAbnormal($color);
$this->ka_bf = $this->judgeAttribute($color);
} }
/** /**
@ -215,7 +215,7 @@ class GlossyTranslucent extends MaterialsBase
*/ */
public function setAbsorptionDepht_BF($color) public function setAbsorptionDepht_BF($color)
{ {
$this->d_bf = Scene::testAbnormal($color);
$this->d_bf = $this->judgeAttribute($color);
} }
/** /**
@ -223,7 +223,7 @@ class GlossyTranslucent extends MaterialsBase
*/ */
public function setIor_BF($color) public function setIor_BF($color)
{ {
$this->index_bf = Scene::testAbnormal($color);
$this->index_bf = $this->judgeAttribute($color);
} }
} }

35
src/scene/materials/MaterialsBase.php

@ -110,7 +110,7 @@ class MaterialsBase extends BaseCfg
*/ */
public function setTransparencyFront($color) public function setTransparencyFront($color)
{ {
$this->transparencyFront = Scene::testAbnormal($color);
$this->transparencyFront = $this->judgeAttribute($color);
} }
/** /**
@ -118,7 +118,7 @@ class MaterialsBase extends BaseCfg
*/ */
public function setTransparencyBack($color) public function setTransparencyBack($color)
{ {
$this->transparencyBack = Scene::testAbnormal($color);
$this->transparencyBack = $this->judgeAttribute($color);
} }
/** /**
@ -126,7 +126,7 @@ class MaterialsBase extends BaseCfg
*/ */
public function setBumptex($color) public function setBumptex($color)
{ {
$this->bumptex = Scene::testAbnormal($color);
$this->bumptex = $this->judgeAttribute($color);
} }
/** /**
@ -134,7 +134,7 @@ class MaterialsBase extends BaseCfg
*/ */
public function setEmission($color,Emission $emissionCfg = null,Visibility $visibility = null) public function setEmission($color,Emission $emissionCfg = null,Visibility $visibility = null)
{ {
$this->emission = Scene::testAbnormal($color);
$this->emission = $this->judgeAttribute($color);
if( $emissionCfg != null ) $this->emissionCfg = $emissionCfg; if( $emissionCfg != null ) $this->emissionCfg = $emissionCfg;
else $this->emissionCfg = new Emission(); else $this->emissionCfg = new Emission();
@ -147,7 +147,7 @@ class MaterialsBase extends BaseCfg
*/ */
public function setVolumeInterior($volumeInterior) public function setVolumeInterior($volumeInterior)
{ {
$this->volumeInterior = Scene::testAbnormal($volumeInterior);
$this->volumeInterior = $this->judgeAttribute($volumeInterior);
} }
/** /**
@ -155,9 +155,32 @@ class MaterialsBase extends BaseCfg
*/ */
public function setVolumeExterior($volumeExterior) public function setVolumeExterior($volumeExterior)
{ {
$this->volumeExterior = Scene::testAbnormal($volumeExterior);
$this->volumeExterior = $this->judgeAttribute($volumeExterior);
} }
/**
* @param object $value 接收的是一个 由自身set函数 所接收到的值,本函数可以被这些类set函数调用,
* 并判断set函数接收到值是否合法,合法则返回$value,否则抛出一个异常
*/
protected static function judgeAttribute($value)
{
if( is_object($value) )
{
if( $value->registerId != null )
{
return $value->registerId;
}
else
{
throw new \Exception("You use an unregistered ".$value->getInstanceClassName()." object for the current property");
}
}
else
{
return $value;
}
}
} }
?> ?>

2
src/scene/materials/Matte.php

@ -32,7 +32,7 @@ class Matte extends MaterialsBase
*/ */
public function setBaseColor($color) public function setBaseColor($color)
{ {
$this->kd = Scene::testAbnormal($color);
$this->kd = $this->judgeAttribute($color);
} }
} }

4
src/scene/materials/MatteRough.php

@ -37,7 +37,7 @@ class MatteRough extends MaterialsBase
*/ */
public function setBaseColor($color) public function setBaseColor($color)
{ {
$this->kd = Scene::testAbnormal($color);
$this->kd = $this->judgeAttribute($color);
} }
/** /**
@ -45,7 +45,7 @@ class MatteRough extends MaterialsBase
*/ */
public function setSigma($color) public function setSigma($color)
{ {
$this->sigma = Scene::testAbnormal($color);
$this->sigma = $this->judgeAttribute($color);
} }
} }

4
src/scene/materials/MatteTranslucent.php

@ -37,7 +37,7 @@ class Roughmatte extends MaterialsBase
*/ */
public function setRefraction($color) public function setRefraction($color)
{ {
$this->kr = Scene::testAbnormal($color);
$this->kr = $this->judgeAttribute($color);
} }
/** /**
@ -45,7 +45,7 @@ class Roughmatte extends MaterialsBase
*/ */
public function setTransmission($color) public function setTransmission($color)
{ {
$this->kt = Scene::testAbnormal($color);
$this->kt = $this->judgeAttribute($color);
} }
} }

6
src/scene/materials/Metal.php

@ -44,7 +44,7 @@ class Metal extends MaterialsBase
*/ */
public function setFresnel($color) public function setFresnel($color)
{ {
$this->fresnel = Scene::testAbnormal($color);
$this->fresnel = $this->judgeAttribute($color);
} }
@ -53,7 +53,7 @@ class Metal extends MaterialsBase
*/ */
public function setUroughness($color) public function setUroughness($color)
{ {
$this->uroughness = Scene::testAbnormal($color);
$this->uroughness = $this->judgeAttribute($color);
} }
/** /**
@ -61,7 +61,7 @@ class Metal extends MaterialsBase
*/ */
public function setVroughness($color) public function setVroughness($color)
{ {
$this->vroughness = Scene::testAbnormal($color);
$this->vroughness = $this->judgeAttribute($color);
} }
} }

2
src/scene/materials/Mirror.php

@ -32,7 +32,7 @@ class Mirror extends MaterialsBase
*/ */
public function setRefraction($color) public function setRefraction($color)
{ {
$this->kr = Scene::testAbnormal($color);
$this->kr = $this->judgeAttribute($color);
} }
} }

6
src/scene/materials/Mix.php

@ -41,7 +41,7 @@ class Mix extends MaterialsBase
*/ */
public function setMaterial1($material) public function setMaterial1($material)
{ {
$this->material1 = Scene::testAbnormal($material);
$this->material1 = $this->judgeAttribute($material);
} }
/** /**
@ -49,7 +49,7 @@ class Mix extends MaterialsBase
*/ */
public function setMaterial2($material) public function setMaterial2($material)
{ {
$this->material2 = Scene::testAbnormal($material);
$this->material2 = $this->judgeAttribute($material);
} }
/** /**
@ -57,7 +57,7 @@ class Mix extends MaterialsBase
*/ */
public function setAmount($color) public function setAmount($color)
{ {
$this->amount = Scene::testAbnormal($color);
$this->amount = $this->judgeAttribute($color);
} }
} }

4
src/scene/materials/TwoSided.php

@ -37,7 +37,7 @@ class TwoSided extends MaterialsBase
*/ */
public function setMaterial1($material) public function setMaterial1($material)
{ {
$this->frontmaterial = Scene::testAbnormal($material);
$this->frontmaterial = $this->judgeAttribute($material);
} }
/** /**
@ -45,7 +45,7 @@ class TwoSided extends MaterialsBase
*/ */
public function setMaterial2($material) public function setMaterial2($material)
{ {
$this->backmaterial = Scene::testAbnormal($material);
$this->backmaterial = $this->judgeAttribute($material);
} }
} }

10
src/scene/materials/Velvet.php

@ -51,7 +51,7 @@ class Velvet extends MaterialsBase
*/ */
public function setBaseColor($color) public function setBaseColor($color)
{ {
$this->kd = Scene::testAbnormal($color);
$this->kd = $this->judgeAttribute($color);
} }
/** /**
@ -59,7 +59,7 @@ class Velvet extends MaterialsBase
*/ */
public function setP1($color) public function setP1($color)
{ {
$this->p1 = Scene::testAbnormal($color);
$this->p1 = $this->judgeAttribute($color);
} }
/** /**
@ -67,7 +67,7 @@ class Velvet extends MaterialsBase
*/ */
public function setP2($color) public function setP2($color)
{ {
$this->p2 = Scene::testAbnormal($color);
$this->p2 = $this->judgeAttribute($color);
} }
/** /**
@ -75,7 +75,7 @@ class Velvet extends MaterialsBase
*/ */
public function setP3($color) public function setP3($color)
{ {
$this->p3 = Scene::testAbnormal($color);
$this->p3 = $this->judgeAttribute($color);
} }
/** /**
@ -83,7 +83,7 @@ class Velvet extends MaterialsBase
*/ */
public function setThickness($color) public function setThickness($color)
{ {
$this->thickness = Scene::testAbnormal($color);
$this->thickness = $this->judgeAttribute($color);
} }
} }

25
src/scene/objects/Objects.php

@ -52,7 +52,30 @@ class Objects extends BaseCfg
*/ */
public function setMaterial($material) public function setMaterial($material)
{ {
$this->material = Scene::testAbnormal($material);
$this->material = $this->judgeAttribute($material);
}
/**
* @param object $value 接收的是一个 由自身set函数 所接收到的值,本函数可以被这些类set函数调用,
* 并判断set函数接收到值是否合法,合法则返回$value,否则抛出一个异常
*/
protected static function judgeAttribute($value)
{
if( is_object($value) )
{
if( $value->registerId != null )
{
return $value->registerId;
}
else
{
throw new \Exception("You use an unregistered ".$value->getInstanceClassName()." object for the current property");
}
}
else
{
return $value;
}
} }
} }

23
src/scene/texture/TextureBase.php

@ -21,6 +21,29 @@ class TextureBase extends BaseCfg
* @var string TODO:储存个由Scene类颁发的注册信息,后期会屏敝此参数的输出 * @var string TODO:储存个由Scene类颁发的注册信息,后期会屏敝此参数的输出
*/ */
public $registerId; public $registerId;
/**
* @param object $value 接收的是一个 由自身set函数 所接收到的值,本函数可以被这些类set函数调用,
* 并判断set函数接收到值是否合法,合法则返回$value,否则抛出一个异常
*/
protected static function judgeAttribute($value)
{
if( is_object($value) )
{
if( $value->registerId != null )
{
return $value->registerId;
}
else
{
throw new \Exception("You use an unregistered ".$value->getInstanceClassName()." object for the current property");
}
}
else
{
return $value;
}
}
} }

2
src/scene/texture/composite/Absolute.php

@ -35,7 +35,7 @@ class Absolute extends TextureBase
*/ */
public function setTexture($color) public function setTexture($color)
{ {
$this->texture = Scene::testAbnormal($color);
$this->texture = $this->judgeAttribute($color);
} }
} }

4
src/scene/texture/composite/Add.php

@ -40,7 +40,7 @@ class Add extends TextureBase
*/ */
public function setTexture1($color) public function setTexture1($color)
{ {
$this->texture1 = Scene::testAbnormal($color);
$this->texture1 = $this->judgeAttribute($color);
} }
/** /**
@ -48,7 +48,7 @@ class Add extends TextureBase
*/ */
public function setTexture2($color) public function setTexture2($color)
{ {
$this->texture2 = Scene::testAbnormal($color);
$this->texture2 = $this->judgeAttribute($color);
} }
} }

2
src/scene/texture/composite/Clamp.php

@ -44,7 +44,7 @@ class Clamp extends TextureBase
*/ */
public function setTexture($color) public function setTexture($color)
{ {
$this->texture = Scene::testAbnormal($color);
$this->texture = $this->judgeAttribute($color);
} }
} }

4
src/scene/texture/composite/Divide.php

@ -40,7 +40,7 @@ class Divide extends TextureBase
*/ */
public function setTexture1($color) public function setTexture1($color)
{ {
$this->texture1 = Scene::testAbnormal($color);
$this->texture1 = $this->judgeAttribute($color);
} }
/** /**
@ -48,7 +48,7 @@ class Divide extends TextureBase
*/ */
public function setTexture2($color) public function setTexture2($color)
{ {
$this->texture2 = Scene::testAbnormal($color);
$this->texture2 = $this->judgeAttribute($color);
} }
} }

4
src/scene/texture/composite/Dotproduct.php

@ -40,7 +40,7 @@ class Dotproduct extends TextureBase
*/ */
public function setTexture1($color) public function setTexture1($color)
{ {
$this->texture1 = Scene::testAbnormal($color);
$this->texture1 = $this->judgeAttribute($color);
} }
/** /**
@ -48,7 +48,7 @@ class Dotproduct extends TextureBase
*/ */
public function setTexture2($color) public function setTexture2($color)
{ {
$this->texture2 = Scene::testAbnormal($color);
$this->texture2 = $this->judgeAttribute($color);
} }
} }

4
src/scene/texture/composite/GreaterThan.php

@ -39,7 +39,7 @@ class GreaterThan extends TextureBase
*/ */
public function setTexture1($color) public function setTexture1($color)
{ {
$this->texture1 = Scene::testAbnormal($color);
$this->texture1 = $this->judgeAttribute($color);
} }
/** /**
@ -47,7 +47,7 @@ class GreaterThan extends TextureBase
*/ */
public function setTexture2($color) public function setTexture2($color)
{ {
$this->texture2 = Scene::testAbnormal($color);
$this->texture2 = $this->judgeAttribute($color);
} }
} }

4
src/scene/texture/composite/LessThan.php

@ -39,7 +39,7 @@ class LessThan extends TextureBase
*/ */
public function setTexture1($color) public function setTexture1($color)
{ {
$this->texture1 = Scene::testAbnormal($color);
$this->texture1 = $this->judgeAttribute($color);
} }
/** /**
@ -47,7 +47,7 @@ class LessThan extends TextureBase
*/ */
public function setTexture2($color) public function setTexture2($color)
{ {
$this->texture2 = Scene::testAbnormal($color);
$this->texture2 = $this->judgeAttribute($color);
} }
} }

6
src/scene/texture/composite/MakeFloat3.php

@ -44,7 +44,7 @@ class MakeFloat3 extends TextureBase
*/ */
public function setTexture1($color) public function setTexture1($color)
{ {
$this->texture1 = Scene::testAbnormal($color);
$this->texture1 = $this->judgeAttribute($color);
} }
/** /**
@ -52,7 +52,7 @@ class MakeFloat3 extends TextureBase
*/ */
public function setTexture2($color) public function setTexture2($color)
{ {
$this->texture2 = Scene::testAbnormal($color);
$this->texture2 = $this->judgeAttribute($color);
} }
/** /**
@ -60,7 +60,7 @@ class MakeFloat3 extends TextureBase
*/ */
public function setTexture3($color) public function setTexture3($color)
{ {
$this->texture3 = Scene::testAbnormal($color);
$this->texture3 = $this->judgeAttribute($color);
} }
} }

6
src/scene/texture/composite/Mix.php

@ -44,7 +44,7 @@ class Mix extends TextureBase
*/ */
public function setTexture1($color) public function setTexture1($color)
{ {
$this->texture1 = Scene::testAbnormal($color);
$this->texture1 = $this->judgeAttribute($color);
} }
/** /**
@ -52,7 +52,7 @@ class Mix extends TextureBase
*/ */
public function setTexture2($color) public function setTexture2($color)
{ {
$this->texture2 = Scene::testAbnormal($color);
$this->texture2 = $this->judgeAttribute($color);
} }
/** /**
@ -60,7 +60,7 @@ class Mix extends TextureBase
*/ */
public function setAmount($color) public function setAmount($color)
{ {
$this->amount = Scene::testAbnormal($color);
$this->amount = $this->judgeAttribute($color);
} }
} }

4
src/scene/texture/composite/Modulo.php

@ -39,7 +39,7 @@ class Modulo extends TextureBase
*/ */
public function setTexture1($color) public function setTexture1($color)
{ {
$this->texture1 = Scene::testAbnormal($color);
$this->texture1 = $this->judgeAttribute($color);
} }
/** /**
@ -47,7 +47,7 @@ class Modulo extends TextureBase
*/ */
public function setTexture2($color) public function setTexture2($color)
{ {
$this->texture2 = Scene::testAbnormal($color);
$this->texture2 = $this->judgeAttribute($color);
} }
} }

4
src/scene/texture/composite/Power.php

@ -39,7 +39,7 @@ class Power extends TextureBase
*/ */
public function setTexture1($color) public function setTexture1($color)
{ {
$this->texture1 = Scene::testAbnormal($color);
$this->texture1 = $this->judgeAttribute($color);
} }
/** /**
@ -47,7 +47,7 @@ class Power extends TextureBase
*/ */
public function setTexture2($color) public function setTexture2($color)
{ {
$this->texture2 = Scene::testAbnormal($color);
$this->texture2 = $this->judgeAttribute($color);
} }
} }

10
src/scene/texture/composite/Remap.php

@ -55,7 +55,7 @@ class Remap extends TextureBase
*/ */
public function setTexture($color) public function setTexture($color)
{ {
$this->value = Scene::testAbnormal($color);
$this->value = $this->judgeAttribute($color);
} }
/** /**
@ -63,7 +63,7 @@ class Remap extends TextureBase
*/ */
public function setSourcemin($color) public function setSourcemin($color)
{ {
$this->sourcemin = Scene::testAbnormal($color);
$this->sourcemin = $this->judgeAttribute($color);
} }
/** /**
@ -71,7 +71,7 @@ class Remap extends TextureBase
*/ */
public function setSourcemax($color) public function setSourcemax($color)
{ {
$this->sourcemax = Scene::testAbnormal($color);
$this->sourcemax = $this->judgeAttribute($color);
} }
/** /**
@ -79,7 +79,7 @@ class Remap extends TextureBase
*/ */
public function setTargetmin($color) public function setTargetmin($color)
{ {
$this->targetmin = Scene::testAbnormal($color);
$this->targetmin = $this->judgeAttribute($color);
} }
/** /**
@ -87,7 +87,7 @@ class Remap extends TextureBase
*/ */
public function setTargetmax($color) public function setTargetmax($color)
{ {
$this->targetmax = Scene::testAbnormal($color);
$this->targetmax = $this->judgeAttribute($color);
} }
} }

4
src/scene/texture/composite/Rounding.php

@ -39,7 +39,7 @@ class Rounding extends TextureBase
*/ */
public function setTexture($color) public function setTexture($color)
{ {
$this->texture = Scene::testAbnormal($color);
$this->texture = $this->judgeAttribute($color);
} }
/** /**
@ -47,7 +47,7 @@ class Rounding extends TextureBase
*/ */
public function setIncrement($color) public function setIncrement($color)
{ {
$this->increment = Scene::testAbnormal($color);
$this->increment = $this->judgeAttribute($color);
} }
} }

4
src/scene/texture/composite/Scale.php

@ -39,7 +39,7 @@ class Scale extends TextureBase
*/ */
public function setTexture1($color) public function setTexture1($color)
{ {
$this->texture1 = Scene::testAbnormal($color);
$this->texture1 = $this->judgeAttribute($color);
} }
/** /**
@ -47,7 +47,7 @@ class Scale extends TextureBase
*/ */
public function setTexture2($color) public function setTexture2($color)
{ {
$this->texture2 = Scene::testAbnormal($color);
$this->texture2 = $this->judgeAttribute($color);
} }
} }

2
src/scene/texture/composite/SplitFloat3.php

@ -45,7 +45,7 @@ class SplitFloat3 extends TextureBase
*/ */
public function setTexture($color) public function setTexture($color)
{ {
$this->texture = Scene::testAbnormal($color);
$this->texture = $this->judgeAttribute($color);
} }
} }

4
src/scene/texture/composite/Subtract.php

@ -39,7 +39,7 @@ class Subtract extends TextureBase
*/ */
public function setTexture1($color) public function setTexture1($color)
{ {
$this->texture1 = Scene::testAbnormal($color);
$this->texture1 = $this->judgeAttribute($color);
} }
/** /**
@ -47,7 +47,7 @@ class Subtract extends TextureBase
*/ */
public function setTexture2($color) public function setTexture2($color)
{ {
$this->texture2 = Scene::testAbnormal($color);
$this->texture2 = $this->judgeAttribute($color);
} }
} }

4
src/scene/texture/deformation/Distort.php

@ -45,7 +45,7 @@ class Distort extends TextureBase
*/ */
public function setSource($color) public function setSource($color)
{ {
$this->texture = Scene::testAbnormal($color);
$this->texture = $this->judgeAttribute($color);
} }
/** /**
@ -53,7 +53,7 @@ class Distort extends TextureBase
*/ */
public function setOffset($color) public function setOffset($color)
{ {
$this->offset = Scene::testAbnormal($color);
$this->offset = $this->judgeAttribute($color);
} }
} }

45
src/scene/texture/luminous/BlackBody.php

@ -0,0 +1,45 @@
<?php
namespace Blobt\Luxcore\scene\texture\luminous;
use Blobt\Luxcore\scene\texture\TextureBase;
use Blobt\Luxcore\scene\Scene;
use Blobt\Luxcore\core\Base;
class IrregularData extends TextureBase
{
/**
* 光源
*/
const TYPE_BLACKBODY = 'blackbody';
/**
* 预设的光源
*/
const TYPE_PARAFFIN_CANDLE_FLAME = 1020; //石蜡蜡烛火焰
const TYPE_GENERIC_7W_INCANDESCENT_LAMP = 2750; //通用的7瓦白炽灯
const TYPE_PHILIPS_ARGENTA_200W_INCANDESCENT_LAMP = 2900; //飞利浦[Argenta]200W白炽灯
/**
* @var float 色温,(取值:0-13000的小数,也可以是 预设光源 常量)
*/
public $temperature = 6500;
/**
* @var bool 是否规格化,(固定取值:false)
*/
public $normalize = self::OPEN;
/**
* @param array $config 接收一个数组,可以初始化当前实例化对象的各种属性
*/
public function __construct($config = [])
{
$this->type = self::TYPE_BLACKBODY;
$this->id = Scene::createID();
Base::__construct($config);
}
}
?>

50
src/scene/texture/luminous/IrregularData.php

@ -0,0 +1,50 @@
<?php
namespace Blobt\Luxcore\scene\texture\luminous;
use Blobt\Luxcore\scene\texture\TextureBase;
use Blobt\Luxcore\scene\Scene;
use Blobt\Luxcore\core\Base;
class IrregularData extends TextureBase
{
/**
* 灯泡型谱
*/
const TYPE_IRREGULARDATA = 'irregulardata';
/**
* @var string 不规则波长
*/
public $wavelengths = PresetLamp::TYPE_WAVELENGTHS;
/**
* @var string 不规则波长
*/
public $data = PresetLamp::TYPE_NATURAL_DAYLIGHT;
/**
* @var float 分辨率
*/
public $resolution = 0.1;
/**
* @var bool 是否自发光(固定取值:true)
*/
public $emission = self::OPEN;
/**
* @param array $config 接收一个数组,可以初始化当前实例化对象的各种属性
*/
public function __construct($config = [])
{
$this->type = self::TYPE_IRREGULARDATA;
$this->id = Scene::createID();
Base::__construct($config);
}
}
?>

174
src/scene/texture/luminous/PresetLamp.php

@ -0,0 +1,174 @@
<?php
namespace Blobt\Luxcore\scene\texture\luminous;
class PresetLamp
{
/**
* 不规则自然光波长
*/
const TYPE_WAVELENGTHS = "404.757 404.901 405.055 405.221 405.398 405.585 405.782 405.99 406.208 406.436 406.674 406.921 407.177 407.443 407.717 408 408.292 408.592 408.901 409.218 409.542 409.875 410.215 410.563 410.918 411.28 411.65 412.026 412.409 412.799 413.195 413.597 414.006 414.421 414.842 415.269 415.702 416.14 416.584 417.033 417.487 417.947 418.412 418.882 419.356 419.836 420.32 420.809 421.302 421.8 422.302 422.809 423.319 423.834 424.353 424.876 425.402 425.933 426.467 427.005 427.547 428.092 428.641 429.194 429.75 430.309 430.872 431.438 432.007 432.579 433.155 433.734 434.316 434.901 435.49 436.081 436.676 437.274 437.874 438.478 439.085 439.695 440.307 440.923 441.542 442.164 442.789 443.417 444.048 444.683 445.32 445.96 446.604 447.251 447.901 448.554 449.21 449.87 450.533 451.2 451.87 452.543 453.22 453.901 454.585 455.273 455.965 456.66 457.359 458.063 458.77 459.481 460.197 460.916 461.64 462.369 463.102 463.839 464.581 465.328 466.08 466.836 467.598 468.365 469.137 469.914 470.697 471.485 472.279 473.079 473.885 474.697 475.515 476.339 477.17 478.008 478.852 479.703 480.56 481.425 482.298 483.177 484.064 484.959 485.862 486.773 487.692 488.62 489.555 490.5 491.453 492.416 493.388 494.369 495.359 496.36 497.37 498.391 499.421 500.463 501.515 502.578 503.652 504.737 505.834 506.943 508.063 509.196 510.341 511.499 512.669 513.853 515.049 516.26 517.484 518.722 519.974 521.24 522.522 523.818 525.129 526.456 527.798 529.157 530.531 531.922 533.33 534.755 536.197 537.656 539.133 540.629 542.142 543.675 545.226 546.796 548.386 549.995 551.625 553.275 554.946 556.637 558.35 560.084 561.841 563.619 565.42 567.244 569.091 570.961 572.855 574.773 576.716 578.683 580.676 582.694 584.737 586.807 588.903 591.026 593.176 595.354 597.559 599.793 602.055 604.347 606.667 609.017 611.398 613.808 616.25 618.722 621.226 623.762 626.33 628.931 631.565 634.233 636.934 639.67 642.44 645.246 648.086 650.963 653.876 656.826 659.813 662.837 665.899 669";
//Natural(自然光)
/**
* 预设的自然光
*/
const TYPE_NATURAL_DAYLIGHT = "0.134691 0.128708 0.126999 0.12916 0.136752 0.146405 0.159176 0.16717 0.172951 0.182805 0.195525 0.202765 0.20734 0.214781 0.22182 0.237557 0.25083 0.264253 0.283057 0.295927 0.305983 0.318954 0.325189 0.33459 0.342233 0.351131 0.362846 0.373655 0.377828 0.385822 0.395374 0.405379 0.411614 0.411413 0.424585 0.432629 0.447311 0.455305 0.464555 0.472952 0.478733 0.488487 0.50176 0.503368 0.502715 0.508999 0.519708 0.529814 0.536501 0.538009 0.536651 0.53826 0.54007 0.541377 0.541679 0.539869 0.540975 0.540874 0.546304 0.539115 0.527903 0.52916 0.539165 0.548617 0.553896 0.554952 0.554349 0.552187 0.550628 0.557114 0.565259 0.570085 0.57094 0.569834 0.565862 0.567421 0.570437 0.573454 0.578733 0.584867 0.590246 0.593564 0.597788 0.599648 0.602513 0.604524 0.606385 0.606536 0.607843 0.608346 0.615787 0.614932 0.619356 0.624686 0.632177 0.635697 0.638211 0.63992 0.635797 0.640322 0.641177 0.645953 0.651986 0.656411 0.657818 0.662142 0.666265 0.655355 0.658572 0.651785 0.650126 0.638512 0.635345 0.624484 0.613574 0.601257 0.602815 0.592508 0.591704 0.584112 0.594017 0.58914 0.579135 0.577928 0.591604 0.58552 0.588537 0.581297 0.582805 0.579738 0.583358 0.580291 0.586073 0.584263 0.586576 0.583962 0.587933 0.591201 0.589592 0.58366 0.575063 0.570035 0.572499 0.581649 0.587933 0.586777 0.600452 0.599497 0.599044 0.602061 0.60729 0.608496 0.611915 0.613524 0.607239 0.603318 0.597586 0.585168 0.584867 0.591453 0.59462 0.596782 0.594419 0.596581 0.59633 0.598391 0.600804 0.602363 0.603469 0.603418 0.592659 0.59829 0.602212 0.605027 0.604022 0.600704 0.596279 0.592911 0.589844 0.589844 0.588889 0.584766 0.577526 0.568175 0.556863 0.550779 0.529361 0.521417 0.508748 0.490196 0.473002 0.463248 0.458924 0.456511 0.453595 0.452087 0.453897 0.453696 0.453796 0.453444 0.456813 0.457818 0.472801 0.47275 0.475817 0.478331 0.465209 0.454098 0.441679 0.4274 0.415535 0.404977 0.404474 0.406435 0.416842 0.422674 0.438512 0.460584 0.47456 0.482906 0.477728 0.483912 0.503469 0.520261 0.524635 0.536299 0.545249 0.562192 0.565259 0.576119 0.582101 0.584716 0.575314 0.571242 0.567924 0.567622 0.566818 0.564455 0.559024 0.55093 0.54555 0.540171 0.531573 0.523579 0.509552 0.488185 0.446154 0.386827 0.317597 0.287179";
//Incandescent(白炽灯)
/**
* 威尔士巴赫气体地幔(现代,不含钍)
*/
const TYPE_WELSBACH_GAS_MANTLE = "0.0156863 0.0156863 0.0128708 0.0124686 0.00955254 0.00703871 0.00703871 0.00532931 0.00402212 0.00442433 0.00804424 0.00804424 0.00809452 0.0081448 0.00819507 0.00804424 0.00819507 0.00844646 0.00945199 0.00904977 0.00824535 0.00784314 0.00784314 0.00824535 0.00904977 0.00945199 0.00769231 0.00734037 0.00688788 0.00653595 0.00653595 0.00688788 0.00734037 0.00769231 0.00623429 0.00623429 0.00623429 0.00623429 0.00623429 0.00623429 0.00623429 0.00623429 0.00623429 0.00693816 0.00849673 0.00839618 0.0111614 0.0120664 0.0125189 0.0124183 0.0225239 0.0243339 0.0291101 0.0352439 0.0420312 0.049271 0.0570136 0.0609855 0.0813977 0.0941679 0.106536 0.119859 0.137858 0.160633 0.185923 0.210558 0.224887 0.24369 0.262695 0.292961 0.324485 0.356662 0.3819 0.410709 0.445852 0.46913 0.48361 0.50543 0.528507 0.538863 0.544042 0.5456 0.546958 0.550528 0.557768 0.562896 0.564153 0.567471 0.577577 0.58361 0.590648 0.593866 0.603368 0.608999 0.612971 0.619356 0.626043 0.625742 0.634389 0.635646 0.640473 0.651635 0.660986 0.662042 0.664153 0.657416 0.649724 0.641579 0.639065 0.626495 0.619407 0.608597 0.604826 0.594067 0.594419 0.592358 0.596983 0.591704 0.590095 0.582101 0.585922 0.57813 0.578331 0.573403 0.582252 0.582504 0.582051 0.581699 0.583057 0.57999 0.582051 0.583861 0.589693 0.590246 0.596028 0.59462 0.601659 0.604675 0.602061 0.603519 0.605832 0.607541 0.607139 0.606737 0.604726 0.601307 0.602463 0.60181 0.605329 0.609602 0.614881 0.619255 0.615736 0.614479 0.622876 0.623329 0.61825 0.614881 0.613122 0.613021 0.616339 0.619055 0.616842 0.62011 0.623429 0.626144 0.6273 0.626898 0.624334 0.623076 0.632781 0.63258 0.630569 0.628558 0.624786 0.624484 0.620462 0.618602 0.613172 0.610306 0.606536 0.601558 0.59462 0.586978 0.577275 0.571744 0.555002 0.554349 0.554198 0.546606 0.534489 0.52373 0.522323 0.51634 0.502966 0.502916 0.509653 0.50181 0.494922 0.491604 0.489442 0.464757 0.429462 0.434439 0.455154 0.459075 0.450981 0.444445 0.447461 0.452439 0.447763 0.451383 0.452338 0.453847 0.449322 0.443691 0.431724 0.421066 0.422373 0.437607 0.436099 0.446607 0.461639 0.475717 0.476923 0.490347 0.486325 0.489945 0.495375 0.510206 0.533685 0.548416 0.555656 0.567219 0.582051 0.596229 0.604474 0.612016 0.623529 0.623479 0.622624 0.620563 0.611312 0.597989 0.586928 0.565761 0.517898 0.458874 0.396682 0.370287";
/**
* 白炽防虫灯
*/
const TYPE_INCANDESCENT_ANTI_INSECT_LAMP = "0.00361991 0.00442433 0.00487682 0.00452489 0.00432378 0.00417295 0.00382102 0.00382102 0.00397185 0.00377074 0.0034188 0.00326797 0.00301659 0.00271493 0.00276521 0.00326797 0.00412267 0.00472599 0.00553042 0.00462544 0.00402212 0.00377074 0.00377074 0.00452489 0.00452489 0.00487682 0.00412267 0.00382102 0.00437406 0.00402212 0.00377074 0.00346908 0.00382102 0.00512821 0.00382102 0.00487682 0.00527903 0.00487682 0.00372046 0.0034188 0.00397185 0.00512821 0.00382102 0.00437406 0.00502765 0.00452489 0.00548014 0.00633484 0.00527903 0.0049271 0.00417295 0.00452489 0.00512821 0.00487682 0.00487682 0.00482655 0.00422323 0.00422323 0.00467572 0.00507793 0.00558069 0.00532931 0.00482655 0.00537959 0.00593263 0.0074912 0.00537959 0.0042735 0.00452489 0.00542986 0.00668678 0.00693816 0.00573152 0.00467572 0.00553042 0.00537959 0.00618401 0.00693816 0.00713927 0.00794369 0.00950226 0.0107089 0.0108597 0.010357 0.0110106 0.0115133 0.0113625 0.011463 0.013273 0.016541 0.0121669 0.0134741 0.0149321 0.0145299 0.0154349 0.0164907 0.0168929 0.0165913 0.0203117 0.0209653 0.020362 0.021267 0.0225742 0.0252388 0.0260433 0.0251886 0.0299648 0.0296632 0.0303168 0.0328809 0.035093 0.0361488 0.0399196 0.0418804 0.0459528 0.0466063 0.0511815 0.0543992 0.054902 0.056913 0.0600302 0.0608849 0.0631976 0.0629965 0.0693313 0.0737557 0.0739568 0.0758673 0.0778281 0.0755154 0.0777778 0.0873303 0.088537 0.0927602 0.0995978 0.105229 0.11086 0.109402 0.110558 0.120865 0.117748 0.116139 0.12006 0.125591 0.124887 0.12911 0.131523 0.13449 0.135646 0.136099 0.139115 0.14173 0.144997 0.154399 0.151383 0.145299 0.15264 0.155405 0.159125 0.16189 0.174208 0.191554 0.211363 0.230367 0.252539 0.272851 0.29462 0.319507 0.343439 0.360634 0.382805 0.397335 0.415938 0.435646 0.45626 0.471393 0.485219 0.493012 0.50176 0.511111 0.51277 0.516038 0.522222 0.514731 0.512267 0.504927 0.499598 0.497788 0.491252 0.476722 0.46546 0.464002 0.4545 0.4545 0.455154 0.453545 0.452238 0.450176 0.451785 0.45445 0.454802 0.456008 0.466064 0.469885 0.464354 0.460533 0.448969 0.435646 0.428708 0.420814 0.416189 0.40905 0.414228 0.424937 0.431473 0.439618 0.456008 0.467773 0.486777 0.494922 0.513625 0.529713 0.54007 0.546355 0.55465 0.564153 0.571242 0.571242 0.580492 0.590196 0.593514 0.59995 0.602463 0.604223 0.60196 0.599849 0.594922 0.593162 0.596933 0.600804 0.595475 0.598743 0.59819 0.58914 0.565309 0.517647 0.462846 0.383912 0.324937 0.269231";
//Fluorescent(荧光)
/**
* 飞利浦ITL-D 30W/55 普通日光荧光灯
*/
const TYPE_PHILIPS_TLD_30W55_REGULAR_DAYLIGHT_FLUORESCENT = "0.167019 0.15264 0.19452 0.280442 0.436199 0.504223 0.526847 0.593665 0.649522 0.511865 0.296531 0.239316 0.267019 0.274661 0.351835 0.397034 0.44173 0.439467 0.36541 0.31815 0.321518 0.340925 0.355455 0.381096 0.39276 0.39819 0.420664 0.431523 0.454601 0.472801 0.481197 0.486375 0.506134 0.516139 0.517999 0.520965 0.526596 0.533132 0.53469 0.531724 0.534439 0.53464 0.534992 0.54007 0.546304 0.542785 0.550729 0.557265 0.556259 0.560734 0.562896 0.567018 0.568828 0.571543 0.57647 0.578683 0.582956 0.583358 0.590095 0.595123 0.592257 0.592458 0.603217 0.602312 0.607994 0.613474 0.616792 0.617395 0.619407 0.626496 0.632378 0.629864 0.624384 0.613072 0.717044 0.901358 0.982403 0.97818 0.913575 0.784565 0.641931 0.62901 0.661991 0.663248 0.664606 0.663851 0.669985 0.670739 0.672449 0.674963 0.676873 0.674862 0.676169 0.679588 0.679437 0.679739 0.683862 0.687482 0.686627 0.69437 0.700403 0.705078 0.709905 0.711413 0.70905 0.705631 0.6909 0.690045 0.672298 0.654651 0.640976 0.624384 0.622172 0.6181 0.611815 0.611915 0.60915 0.6001 0.595022 0.593212 0.593313 0.595475 0.580392 0.585772 0.590498 0.590648 0.592056 0.59462 0.59814 0.603117 0.603469 0.604625 0.610809 0.615032 0.617144 0.619004 0.62011 0.622322 0.623429 0.624635 0.626898 0.627602 0.6273 0.626294 0.626697 0.6273 0.622926 0.623127 0.622875 0.623278 0.623981 0.624836 0.624132 0.623881 0.621769 0.624032 0.626194 0.627401 0.626495 0.62368 0.624384 0.626446 0.626395 0.6273 0.62896 0.628256 0.626445 0.627401 0.629462 0.630468 0.620211 0.621417 0.621116 0.625892 0.626948 0.628406 0.626898 0.625741 0.623227 0.620864 0.615133 0.610759 0.606988 0.601106 0.59452 0.587079 0.576822 0.568376 0.551634 0.540623 0.533333 0.515586 0.479588 0.434389 0.569985 0.653143 0.525842 0.433836 0.45264 0.445149 0.444093 0.446204 0.446707 0.448165 0.447059 0.450327 0.453092 0.455908 0.462444 0.466416 0.428105 0.409402 0.438763 0.471695 0.428859 0.412569 0.426948 0.420714 0.449925 0.455958 0.469181 0.47265 0.490699 0.515636 0.537506 0.549874 0.553997 0.562141 0.576521 0.582755 0.579286 0.574409 0.566315 0.565309 0.557516 0.558874 0.545198 0.535244 0.535495 0.526847 0.518301 0.509653 0.496983 0.49814 0.482755 0.48356 0.442082 0.37994 0.307642 0.251735";
/**
* Sylvania[F4T5 4W]普通暖白色荧光灯
*/
const TYPE_SYLVANIA_F4T5_4W_REGULAR_WARM_WHITE_FLUORESCENT = "0 0 0.000804424 0.000804424 0.00180995 0.00281549 0.00281549 0.00382102 0.00482655 0.00482655 0.00563097 0.00563097 0.00563097 0.00563097 0.00563097 0.00563097 0.00563097 0.00563097 0.00718954 0.00718954 0.00718954 0.00718954 0.00718954 0.00718954 0.00718954 0.00718954 0.00975365 0.00945199 0.0108597 0.0117647 0.0154852 0.0179487 0.0230267 0.0235294 0.0296129 0.0301659 0.0353947 0.0385621 0.0432881 0.0481649 0.0533434 0.0555556 0.0742082 0.0807944 0.0919055 0.0997486 0.110458 0.120161 0.12916 0.141428 0.155455 0.165209 0.175264 0.191252 0.209201 0.226647 0.239316 0.250729 0.270588 0.281498 0.303067 0.326848 0.356863 0.386928 0.408195 0.437054 0.469533 0.496481 0.528255 0.532981 0.551533 0.516641 0.546254 0.756712 0.884515 0.719155 0.560835 0.525691 0.556812 0.553092 0.5455 0.539316 0.548969 0.548667 0.550528 0.554801 0.557466 0.560633 0.562644 0.561186 0.56184 0.570035 0.572499 0.56913 0.570488 0.580141 0.583258 0.579386 0.580744 0.585621 0.588688 0.591754 0.593363 0.595877 0.599899 0.602212 0.604927 0.608195 0.61277 0.619306 0.620362 0.620211 0.628708 0.632479 0.627099 0.615133 0.612468 0.602765 0.599246 0.59467 0.599447 0.587632 0.567823 0.562343 0.569834 0.567873 0.570387 0.567622 0.567169 0.561991 0.565008 0.560985 0.560583 0.557516 0.559477 0.555957 0.563901 0.561538 0.546204 0.544243 0.549723 0.553745 0.554148 0.547461 0.548215 0.542936 0.546707 0.541327 0.546053 0.544143 0.543087 0.537003 0.536199 0.534691 0.529462 0.517546 0.512016 0.490498 0.477527 0.479688 0.486526 0.494319 0.494671 0.500101 0.506234 0.511966 0.51634 0.52006 0.523931 0.529914 0.540724 0.544545 0.548366 0.551835 0.555656 0.55998 0.564002 0.566415 0.568627 0.570287 0.571845 0.572549 0.571393 0.569935 0.568879 0.568125 0.566918 0.558773 0.562645 0.547662 0.546908 0.524485 0.52549 0.64188 0.676421 0.569029 0.534238 0.551483 0.542835 0.537808 0.530015 0.520161 0.516742 0.508296 0.503972 0.48547 0.469533 0.460282 0.460181 0.460383 0.461941 0.470639 0.483258 0.484163 0.474309 0.459779 0.448668 0.448869 0.446154 0.438059 0.424082 0.434942 0.45641 0.473354 0.483509 0.506988 0.511312 0.523228 0.527752 0.542785 0.553896 0.562544 0.559578 0.561488 0.555555 0.540774 0.520312 0.498542 0.476923 0.44731 0.411915 0.373856 0.336953 0.293615 0.24364 0.196732 0.157617 0.115787 0.0768728 0.0600302";
/**
* 欧司朗[DULUXSTAR 21W/827]常规紧凑型三磷荧光灯
*/
const TYPE_OSRAM_DULUXSTAR_21W827_REGULAR_COMPACT_TRIPHOSPHOR_FLUORESCENT = "0.0742082 0.0621418 0.0797386 0.0880342 0.173152 0.27094 0.396581 0.591453 0.721468 0.485772 0.195978 0.140925 0.104475 0.102916 0.223831 0.284213 0.487029 0.429965 0.0939668 0.060181 0.0469583 0.0492207 0.0576169 0.0664656 0.0765209 0.0755154 0.0852187 0.0876823 0.0901961 0.0942685 0.0979387 0.100654 0.111161 0.116742 0.124937 0.14917 0.162997 0.159075 0.142383 0.13464 0.122222 0.112821 0.114329 0.116943 0.130468 0.136802 0.122272 0.0963801 0.0831574 0.0806938 0.06908 0.0686275 0.0709402 0.0733534 0.0837607 0.0967823 0.114932 0.123529 0.162846 0.157818 0.136802 0.127401 0.124384 0.132177 0.158421 0.167722 0.169482 0.165963 0.19085 0.241227 0.323529 0.402816 0.484113 0.482604 0.649874 0.959478 0.965209 0.839467 0.473052 0.357114 0.311363 0.261086 0.210508 0.168778 0.141327 0.116541 0.102413 0.093816 0.0865762 0.076169 0.0653595 0.0635496 0.0612368 0.0603318 0.058723 0.057265 0.0527904 0.0508799 0.0504776 0.0509301 0.0487682 0.0491202 0.048366 0.047813 0.0469583 0.0466064 0.0414279 0.0413273 0.0393665 0.0391654 0.0365008 0.0349422 0.0311715 0.0305179 0.0311212 0.0305179 0.0370035 0.0465058 0.0556059 0.06908 0.0789844 0.0825541 0.0919055 0.0759176 0.0617396 0.0443439 0.0466566 0.0513826 0.0639518 0.0675214 0.0688789 0.0617899 0.0588235 0.0553545 0.0722474 0.0979387 0.136551 0.180744 0.255907 0.338009 0.422323 0.46184 0.523127 0.559879 0.566566 0.613222 0.626093 0.620663 0.605631 0.570638 0.555455 0.568074 0.551583 0.515435 0.479035 0.433534 0.386174 0.335546 0.295877 0.267773 0.233233 0.202413 0.166767 0.137707 0.107642 0.0876823 0.0838613 0.0865259 0.0799397 0.0663147 0.0656109 0.0594772 0.0527401 0.0476119 0.043992 0.041629 0.0413776 0.0415787 0.0385621 0.0393163 0.053997 0.0616893 0.085269 0.106737 0.130015 0.207642 0.338663 0.312368 0.318904 0.407139 0.446959 0.529361 0.597536 0.54912 0.58004 0.600301 0.506385 0.452791 0.431775 0.396682 0.339266 0.269985 0.224585 0.189392 0.163952 0.143942 0.114731 0.105732 0.0981398 0.0864254 0.081096 0.0688286 0.212217 0.437808 0.40915 0.4092 0.433384 0.465812 0.54917 0.439316 0.482856 0.550829 0.46536 0.503368 0.577074 0.442685 0.393313 0.389894 0.491604 0.630417 0.574811 0.467119 0.462192 0.478884 0.495375 0.484867 0.50548 0.437456 0.267521 0.193967 0.16903 0.154248 0.161991 0.170437 0.165611 0.127954 0.0795375 0.0661137 0.0650578 0.0629965";
/**
* 冷阴极暖白色CFL三磷荧光灯
*/
const TYPE_COLD_CATHODE_WARM_WHITE_CFL_TRIPHOSPHOR_FLUORESCENT = "0.17823 0.183861 0.216642 0.26732 0.426244 0.455455 0.47808 0.657114 0.720714 0.46546 0.240221 0.226043 0.221116 0.234641 0.32539 0.409402 0.467924 0.378331 0.213826 0.216541 0.234942 0.23992 0.242433 0.249925 0.267974 0.275867 0.280141 0.290196 0.303972 0.319055 0.335546 0.352388 0.362594 0.368426 0.368376 0.376169 0.382454 0.393213 0.409251 0.426898 0.43811 0.44902 0.468979 0.482253 0.489442 0.495526 0.501307 0.510055 0.519859 0.525842 0.535193 0.537858 0.540724 0.544846 0.54922 0.551935 0.555103 0.555907 0.56365 0.566968 0.568326 0.567521 0.569583 0.571644 0.577928 0.58009 0.587129 0.589794 0.593866 0.588989 0.594117 0.604323 0.608999 0.597536 0.534037 0.732579 0.809603 0.582856 0.549572 0.62001 0.610457 0.616641 0.613021 0.613373 0.6183 0.619105 0.618652 0.619607 0.618753 0.619004 0.622775 0.624283 0.625842 0.625791 0.62554 0.625188 0.624484 0.623579 0.621015 0.620261 0.61825 0.617848 0.617345 0.616239 0.614831 0.612921 0.612921 0.612217 0.608999 0.607139 0.606686 0.60362 0.600452 0.596128 0.599748 0.598441 0.59648 0.593967 0.59276 0.589844 0.588084 0.590146 0.595073 0.595776 0.594369 0.593665 0.593715 0.584666 0.576722 0.559477 0.541025 0.525138 0.506938 0.484163 0.470488 0.457265 0.451433 0.448668 0.466265 0.479387 0.525691 0.527451 0.520563 0.581096 0.598944 0.609854 0.60543 0.605178 0.61468 0.610105 0.599044 0.588688 0.590397 0.586224 0.559326 0.563851 0.571845 0.571443 0.543841 0.482102 0.408597 0.34359 0.294922 0.255103 0.233233 0.227703 0.227602 0.231524 0.227853 0.225792 0.232026 0.234389 0.232127 0.230216 0.2272 0.223982 0.219407 0.215736 0.208899 0.209603 0.20724 0.21267 0.221921 0.222021 0.230669 0.259377 0.330065 0.342132 0.351081 0.420966 0.491805 0.548014 0.658824 0.688286 0.676873 0.644243 0.543187 0.493816 0.480845 0.475214 0.427702 0.333937 0.280643 0.257315 0.231725 0.205983 0.182102 0.168527 0.167019 0.16913 0.174711 0.174158 0.279889 0.43444 0.423781 0.403921 0.425038 0.438462 0.49638 0.471845 0.486325 0.521468 0.480744 0.51458 0.574108 0.457064 0.403469 0.400905 0.516843 0.662494 0.59452 0.506385 0.57104 0.581498 0.553796 0.509201 0.556209 0.511715 0.346657 0.26355 0.239015 0.226446 0.234339 0.248869 0.229663 0.171745 0.120865 0.109452 0.0970337 0.0771745";
/**
* NARVA ICOLOURLUX plus日光20W/860 日光CFL三磷荧光灯
*/
const TYPE_NARVA_COLOURLUX_PLUS_DAYLIGHT_20W860_DAYLIGHT_CFL_TRIPHOSPHOR_FLUORESCENT = "0.396531 0.467723 0.504525 0.598743 0.670689 0.611664 0.480744 0.390447 0.348517 0.348014 0.419558 0.465058 0.525641 0.58361 0.547561 0.43806 0.390096 0.401709 0.414279 0.433384 0.4636 0.492056 0.514982 0.539115 0.550377 0.546707 0.546455 0.542081 0.546304 0.55093 0.555505 0.559376 0.561689 0.561438 0.56541 0.569532 0.576923 0.5818 0.58557 0.586123 0.591151 0.594771 0.594117 0.600854 0.607994 0.612468 0.61458 0.616139 0.617496 0.616943 0.619054 0.617245 0.617245 0.616742 0.618803 0.619608 0.620161 0.621166 0.623379 0.623379 0.621519 0.627452 0.629412 0.630921 0.636401 0.641076 0.642937 0.657265 0.661589 0.676119 0.708095 0.731926 0.815183 0.960785 0.98351 0.984113 0.965259 0.886929 0.743841 0.732077 0.759678 0.758874 0.768124 0.77647 0.784263 0.792307 0.795626 0.796782 0.798944 0.78738 0.772549 0.758874 0.752891 0.740473 0.72896 0.71624 0.710357 0.700202 0.697336 0.689995 0.685772 0.675113 0.66536 0.653193 0.64726 0.635244 0.627301 0.620563 0.619256 0.620111 0.619256 0.61629 0.613776 0.614077 0.612317 0.613222 0.610558 0.610156 0.610105 0.613474 0.616139 0.616491 0.613726 0.614228 0.613927 0.613424 0.613474 0.613675 0.613977 0.613625 0.612268 0.610608 0.607491 0.605078 0.605078 0.607391 0.611262 0.614027 0.60729 0.614229 0.639669 0.657517 0.673102 0.677527 0.679287 0.67627 0.666164 0.656561 0.646054 0.640523 0.637809 0.631323 0.629161 0.622323 0.605781 0.598391 0.590196 0.571342 0.544495 0.499799 0.434892 0.394671 0.36355 0.349874 0.330066 0.320614 0.315687 0.308949 0.303268 0.29995 0.28914 0.285872 0.278683 0.276973 0.272499 0.268376 0.265661 0.265762 0.269683 0.286928 0.286526 0.303117 0.339819 0.34726 0.354751 0.395525 0.416189 0.416541 0.434741 0.496078 0.587481 0.728055 0.820362 0.796933 0.800905 0.776018 0.664002 0.579537 0.52363 0.472499 0.450981 0.417848 0.382202 0.357718 0.331322 0.308296 0.286777 0.262293 0.24007 0.223429 0.199196 0.158723 0.301911 0.550678 0.467522 0.38175 0.40739 0.439115 0.503017 0.469985 0.466466 0.533232 0.49824 0.492207 0.559628 0.49276 0.412368 0.397134 0.445852 0.623379 0.59829 0.468225 0.520412 0.531674 0.54917 0.519356 0.508597 0.475516 0.351684 0.239517 0.187029 0.170739 0.168175 0.159829 0.156159 0.135445 0.0762695 0.0177979 0.00527903 0.00824535";
/**
* Sylvania[Grolux]荧光水族箱/植物灯
*/
const TYPE_SYLVANIA_GROLUX_FLUORESCENT_AQUARIUM_PLANT_LAMP = "0.00784314 0.00784314 0.00889894 0.00824535 0.00869784 0.0111614 0.014178 0.0154349 0.0146807 0.0138763 0.00809452 0.00754148 0.00708899 0.00739065 0.00759176 0.00789341 0.00829563 0.0092006 0.00904977 0.00839618 0.00904977 0.00869784 0.00819507 0.00759176 0.00658622 0.00744093 0.00739065 0.00653595 0.00693816 0.0092006 0.00995475 0.00915033 0.00789341 0.00723982 0.0101559 0.01091 0.0116642 0.0121669 0.0117647 0.0125189 0.0127702 0.0134238 0.0152841 0.0151835 0.014731 0.0157366 0.0159879 0.0168426 0.0167924 0.0171946 0.0213173 0.0216692 0.0223731 0.0237305 0.0245852 0.0261438 0.0294118 0.0301659 0.0255405 0.0302162 0.0361488 0.0362494 0.0386124 0.0396179 0.0434389 0.046003 0.0474108 0.0487682 0.0509804 0.049623 0.0499246 0.0620915 0.0930619 0.127903 0.234641 0.409 0.513373 0.568124 0.56913 0.454902 0.269734 0.13992 0.106888 0.101458 0.0975365 0.0987431 0.10181 0.105229 0.107994 0.110055 0.116038 0.12177 0.125792 0.128758 0.134339 0.139115 0.14183 0.143137 0.143992 0.149673 0.154299 0.159276 0.161136 0.164404 0.170437 0.175365 0.180694 0.185621 0.188336 0.188638 0.189744 0.193213 0.193715 0.192308 0.199799 0.202061 0.207592 0.211161 0.21453 0.218854 0.22358 0.224636 0.234188 0.239769 0.243338 0.240573 0.238964 0.238462 0.237909 0.236551 0.231272 0.234791 0.236953 0.238261 0.238612 0.236953 0.236601 0.237356 0.234791 0.232227 0.229311 0.228406 0.226295 0.217195 0.208648 0.208899 0.199296 0.198441 0.189945 0.183459 0.174711 0.163097 0.155958 0.151634 0.141528 0.141126 0.134439 0.123278 0.114077 0.111463 0.109703 0.108296 0.113575 0.114178 0.114178 0.117496 0.118803 0.120412 0.123027 0.124133 0.127451 0.128457 0.129613 0.129915 0.130266 0.129211 0.128155 0.127954 0.126395 0.125641 0.12544 0.124636 0.123178 0.120563 0.118904 0.119005 0.121368 0.114681 0.113474 0.123529 0.149724 0.184867 0.277275 0.420915 0.457265 0.26184 0.119155 0.0778281 0.0748617 0.0678733 0.0687783 0.0645048 0.0599799 0.0560081 0.0509301 0.044897 0.041277 0.0402715 0.0419809 0.0529412 0.0647059 0.142735 0.241579 0.21463 0.108698 0.0758673 0.0809955 0.0878331 0.0886878 0.0898945 0.0956762 0.100905 0.107391 0.115787 0.130216 0.146355 0.167672 0.186627 0.209904 0.263901 0.308195 0.360081 0.388135 0.411865 0.418703 0.42177 0.419356 0.399799 0.370588 0.366315 0.375113 0.390246 0.411915 0.431775 0.432881 0.434992 0.408447 0.313172 0.195073 0.107893";
/**
* 液晶显示屏
*/
const TYPE_LAPTOP_LCD_SCREEN = "0.0156863 0.0156863 0.0144796 0.0144796 0.0111614 0.00784314 0.00784314 0.00452489 0.00120664 0.00120664 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00201106 0.00201106 0.00201106 0.00201106 0.00201106 0.00241327 0.00281549 0.00281549 0.00824535 0.00824535 0.00864756 0.00945199 0.0118653 0.0126697 0.0134741 0.0134741 0.019457 0.019457 0.0238814 0.0262444 0.0271493 0.0297134 0.0326295 0.0335847 0.0373052 0.0385621 0.049824 0.0533434 0.046003 0.0485671 0.057818 0.064002 0.0785822 0.0843138 0.0735043 0.0743087 0.0947712 0.12911 0.184615 0.253695 0.473354 0.593614 0.561086 0.355204 0.200503 0.176672 0.160583 0.161136 0.178331 0.186928 0.199547 0.208044 0.215234 0.222474 0.229462 0.236451 0.258069 0.260885 0.266114 0.270588 0.27461 0.283409 0.28904 0.295777 0.300754 0.307843 0.315083 0.323781 0.328859 0.331624 0.337356 0.337657 0.338964 0.33997 0.340423 0.341026 0.341981 0.340372 0.338261 0.337004 0.342082 0.342836 0.345098 0.346355 0.348567 0.350327 0.35088 0.351634 0.361539 0.358572 0.362343 0.360986 0.3636 0.361338 0.359125 0.355908 0.354952 0.350981 0.34912 0.348718 0.351031 0.348668 0.353695 0.34731 0.341579 0.339668 0.354902 0.373806 0.405832 0.426596 0.446908 0.453193 0.448668 0.426194 0.403519 0.378029 0.35807 0.335847 0.318351 0.288235 0.274309 0.24917 0.23459 0.195626 0.17094 0.151936 0.128255 0.116792 0.104676 0.100251 0.0909 0.0863248 0.0831071 0.0799397 0.0791855 0.0782303 0.0706888 0.0690297 0.0666667 0.0632479 0.0582203 0.0542484 0.0497738 0.0481146 0.0428859 0.0473102 0.0481649 0.0411262 0.0420312 0.054349 0.0746103 0.0960784 0.127552 0.142886 0.25827 0.315787 0.378029 0.463248 0.465712 0.454751 0.501911 0.378431 0.351282 0.32187 0.250478 0.168829 0.0854701 0.0607341 0.0489694 0.0423831 0.0314228 0.0278532 0.0225239 0.0230267 0.0284565 0.0322273 0.0537456 0.086727 0.236249 0.287833 0.311413 0.38909 0.461891 0.491001 0.501659 0.420965 0.437205 0.331624 0.279135 0.315183 0.24354 0.239065 0.297587 0.333836 0.609401 0.580492 0.379286 0.361488 0.323077 0.281498 0.200955 0.177124 0.153142 0.0975365 0.0414279 0.0213675 0.0189543 0.020362 0.0191051 0.0182504 0.0133233 0.00839618 0.00502765 0.00452489 0.00382102 0.00382102";
/**
* 飞利浦[Activiva]“天然”三磷荧光粉
*/
const TYPE_PHILIPS_ACTIVIVA_NATURAL_TRIPHOSPHOR_FLUORESCENT = "0.0117647 0.0117647 0.0185018 0.024183 0.0776772 0.237959 0.329713 0.516189 0.452489 0.114631 0.0314228 0.0224233 0.024183 0.0329311 0.0527904 0.0870287 0.101609 0.0792861 0.0421317 0.043087 0.0468075 0.051634 0.0586727 0.06727 0.0746607 0.0787331 0.0835093 0.0928105 0.105933 0.116642 0.125641 0.137657 0.151332 0.162745 0.175616 0.185872 0.203368 0.223781 0.244646 0.253746 0.263952 0.281951 0.295676 0.3091 0.330719 0.355053 0.377376 0.395324 0.408346 0.41634 0.439065 0.450981 0.467572 0.48723 0.500754 0.509804 0.517949 0.521367 0.530166 0.532277 0.53092 0.534188 0.537607 0.539618 0.545751 0.543288 0.548265 0.550025 0.553092 0.558421 0.56541 0.561337 0.565862 0.55098 0.543087 0.682403 0.830417 0.682404 0.555857 0.579537 0.592106 0.590799 0.599447 0.598391 0.603318 0.607994 0.606887 0.606938 0.61463 0.619356 0.616642 0.618703 0.620462 0.622474 0.62715 0.628406 0.629512 0.628909 0.634942 0.63082 0.635345 0.640976 0.640322 0.642031 0.645802 0.647612 0.650478 0.653847 0.655657 0.660232 0.65812 0.663349 0.660483 0.657215 0.655506 0.654701 0.643138 0.632781 0.626949 0.622474 0.61282 0.600603 0.591051 0.592106 0.583509 0.573806 0.566465 0.564655 0.560985 0.558471 0.556159 0.554701 0.553695 0.553042 0.549371 0.543137 0.542182 0.543992 0.530568 0.532881 0.549321 0.544897 0.542333 0.540623 0.627602 0.602011 0.55998 0.528205 0.561086 0.584615 0.547964 0.555354 0.551634 0.472348 0.435345 0.471041 0.43454 0.364052 0.318301 0.31267 0.308296 0.26737 0.248467 0.240121 0.231172 0.224485 0.223077 0.222775 0.215033 0.209904 0.207743 0.20181 0.195073 0.191151 0.185822 0.178683 0.171644 0.167521 0.162997 0.16003 0.165862 0.168376 0.166717 0.181247 0.233484 0.279035 0.278984 0.369482 0.466969 0.4727 0.527602 0.593363 0.520965 0.564404 0.618703 0.548517 0.464907 0.428105 0.399447 0.383811 0.287481 0.220664 0.166164 0.149221 0.124485 0.110307 0.102564 0.0984414 0.0960282 0.0894923 0.0926094 0.266868 0.448668 0.42911 0.413977 0.420764 0.481599 0.48909 0.473856 0.517949 0.500503 0.449925 0.509351 0.471041 0.388587 0.390699 0.413424 0.575716 0.618954 0.499598 0.513524 0.50734 0.498894 0.492006 0.480493 0.48899 0.310256 0.203821 0.192107 0.189542 0.165209 0.155204 0.151885 0.128306 0.0990448 0.0843137 0.0774761 0.0577175 0.0363499 0.028909";
/**
* 飞利浦[Activivaj]三磷荧光粉
*/
const TYPE_PHILIPS_ACTIVIVA_TRIPHOSPHOR_FLUORESCENT = "0.0117647 0.0117647 0.0184012 0.0117647 0.0616391 0.110558 0.246606 0.424082 0.53826 0.249975 0.0405732 0.0276018 0.017446 0.0338864 0.0659628 0.101911 0.148165 0.126546 0.0520362 0.0517346 0.0562595 0.064354 0.0712418 0.0771745 0.0862746 0.093816 0.11277 0.123077 0.133032 0.14721 0.168326 0.188235 0.207441 0.224585 0.22911 0.252991 0.281448 0.294168 0.301307 0.322725 0.351534 0.377024 0.395073 0.411865 0.429915 0.458975 0.478733 0.496782 0.504575 0.517597 0.520915 0.529613 0.532931 0.531473 0.532478 0.538914 0.542785 0.542433 0.547763 0.551382 0.556661 0.557315 0.560633 0.569633 0.571493 0.572448 0.579789 0.580895 0.586777 0.589944 0.596078 0.588486 0.596128 0.602614 0.559377 0.65812 0.876571 0.692258 0.577426 0.6272 0.629663 0.626345 0.634842 0.642283 0.64168 0.643741 0.650176 0.647612 0.64721 0.6545 0.654148 0.656712 0.661991 0.661137 0.665561 0.669432 0.666164 0.671041 0.675315 0.676924 0.67079 0.677125 0.681851 0.679186 0.684465 0.684415 0.691252 0.693465 0.695375 0.69452 0.689794 0.685722 0.686878 0.687984 0.66179 0.658422 0.650327 0.640825 0.626496 0.615736 0.61272 0.609854 0.601709 0.600502 0.598894 0.597033 0.590095 0.585319 0.582453 0.580643 0.579236 0.57451 0.574309 0.572096 0.565762 0.564806 0.567421 0.562393 0.555958 0.55284 0.555405 0.560533 0.56727 0.577828 0.590347 0.594318 0.601357 0.595173 0.592911 0.589492 0.582001 0.576068 0.5637 0.550276 0.535646 0.508597 0.477627 0.43082 0.37632 0.330468 0.313072 0.305229 0.294268 0.284816 0.279789 0.276471 0.271795 0.272599 0.273454 0.268979 0.272649 0.263399 0.25812 0.254198 0.24726 0.23997 0.235194 0.230669 0.222122 0.21991 0.21991 0.217899 0.218552 0.220714 0.245349 0.288587 0.28733 0.307541 0.376571 0.439819 0.492258 0.594872 0.632127 0.64168 0.617044 0.478482 0.443439 0.449322 0.454701 0.371745 0.279085 0.230166 0.208044 0.165561 0.14188 0.121016 0.113022 0.124636 0.119859 0.139417 0.146104 0.330719 0.444193 0.413574 0.393363 0.425038 0.433836 0.482655 0.454751 0.514681 0.49643 0.437154 0.504123 0.470689 0.38361 0.384012 0.414027 0.57818 0.611765 0.534389 0.522825 0.570638 0.553896 0.48547 0.449774 0.454249 0.350176 0.195576 0.187381 0.187129 0.188989 0.198341 0.201257 0.137356 0.0862243 0.0867773 0.0887883 0.0709905 0.0419306 0.0305179";
//Diode(发光二极管)
/**
* 椭圆高亮度蓝光LED
*/
const TYPE_EGULAR_HIGH_BRIGHTNESS_BLUE_LED = "0.0344897 0.0344897 0.0400704 0.041277 0.0503268 0.0645048 0.0832077 0.099095 0.112066 0.126797 0.164807 0.182805 0.19643 0.217597 0.243037 0.268628 0.294369 0.319759 0.345752 0.373806 0.404676 0.436652 0.460181 0.484766 0.499799 0.51639 0.53992 0.5455 0.554047 0.561086 0.571393 0.577225 0.583962 0.585973 0.592056 0.595626 0.600603 0.604876 0.608798 0.613977 0.621769 0.62544 0.627149 0.62911 0.640875 0.645551 0.650729 0.654249 0.658824 0.658623 0.663751 0.664103 0.667421 0.667874 0.669281 0.66893 0.674712 0.677829 0.679085 0.6817 0.690901 0.697487 0.704576 0.714229 0.723379 0.73092 0.740171 0.751333 0.766968 0.782705 0.799447 0.814681 0.830115 0.842785 0.861438 0.863801 0.881147 0.889141 0.895626 0.895677 0.898442 0.891202 0.902213 0.901509 0.910056 0.914078 0.920765 0.924184 0.93082 0.93434 0.94168 0.942937 0.948467 0.952137 0.955104 0.958271 0.963198 0.96355 0.967974 0.968226 0.971594 0.971745 0.973656 0.973756 0.97446 0.97441 0.974812 0.974158 0.974711 0.974359 0.974711 0.973404 0.971695 0.968779 0.964103 0.960534 0.954249 0.946406 0.940222 0.933736 0.929413 0.924737 0.912419 0.900755 0.892409 0.881147 0.869633 0.857466 0.846857 0.834489 0.824284 0.809603 0.798039 0.779487 0.764756 0.748769 0.740925 0.728759 0.70905 0.698543 0.694068 0.684717 0.674158 0.663701 0.654198 0.648266 0.639165 0.634791 0.629411 0.623328 0.618954 0.612418 0.607239 0.602765 0.584163 0.564354 0.540121 0.517647 0.504978 0.489593 0.472197 0.461337 0.439366 0.427602 0.4091 0.396531 0.388235 0.377526 0.363449 0.355002 0.348165 0.3363 0.321418 0.309754 0.302413 0.291604 0.275918 0.263248 0.253193 0.241981 0.228658 0.215485 0.206285 0.19452 0.180091 0.168326 0.153695 0.141981 0.129512 0.117949 0.107994 0.0995978 0.0895425 0.0846657 0.0790347 0.0770739 0.0730518 0.0669181 0.0597788 0.0547009 0.0526395 0.0497738 0.050176 0.0492208 0.047813 0.0447461 0.0435898 0.0408749 0.0415285 0.0417798 0.0420312 0.0419809 0.0410257 0.0371041 0.0371041 0.0331825 0.029261 0.029261 0.0229261 0.0229261 0.0193062 0.0156863 0.0156863 0.0120664 0.00844646 0.00844646 0.0156863 0.0156863 0.0156863 0.0156863 0.0156863 0.0156863 0.0156863 0.0156863 0.0156863 0.0156863 0.0156863 0.0156863 0.0156863 0.0156863 0.0156863 0.0156863 0.0156863 0.0156863 0.0156863 0.0156863 0.0156863 0.0156863 0.0156863 0.0156863";
/**
* 红色激光二极管的单色发射
*/
const TYPE_MONOCHROMATIC_EMISSION_FROM_A_RED_LASER_DIODE = "0.0156863 0.0156863 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.000804424 0.000804424 0.000804424 0.000804424 0.000804424 0.000804424 0.000804424 0.000804424 0.00281549 0.00281549 0.00281549 0.00281549 0.00281549 0.00281549 0.00281549 0.00281549 0.00281549 0.00281549 0.00281549 0.00281549 0.00281549 0.00281549 0.00281549 0.00281549 0.00522876 0.00522876 0.00522876 0.00522876 0.00522876 0.00522876 0.00522876 0.00522876 0.0049271 0.00442433 0.00397185 0.00361991 0.0034188 0.00367019 0.00422323 0.00477627 0.00603318 0.00603318 0.00603318 0.00603318 0.00603318 0.00603318 0.00603318 0.00603318 0.00522876 0.00522876 0.00522876 0.00522876 0.00522876 0.00522876 0.00522876 0.00522876 0.00437406 0.00437406 0.00437406 0.00437406 0.00437406 0.00437406 0.00437406 0.00437406 0.00201106 0.00201106 0.00201106 0.00201106 0.00201106 0.00201106 0.00201106 0.00201106 0.00120664 0.00120664 0.00120664 0.00120664 0.00120664 0.00120664 0.00120664 0.00120664 0.00281549 0.00281549 0.00281549 0.00281549 0.00281549 0.00281549 0.00281549 0.00281549 0.00281549 0.00281549 0.0032177 0.00361991 0.00361991 0.00402212 0.00442433 0.00442433 0.00367019 0.00367019 0.00367019 0.00367019 0.00367019 0.00367019 0.00367019 0.00367019 0.00588235 0.0057818 0.00568125 0.00558069 0.00563097 0.00568125 0.00568125 0.00558069 0.00548014 0.00542986 0.00542986 0.00542986 0.00542986 0.00542986 0.00542986 0.00548014 0.00623429 0.00623429 0.00623429 0.00623429 0.00623429 0.00623429 0.00623429 0.00623429 0.00356963 0.00356963 0.00356963 0.00356963 0.00356963 0.00356963 0.00356963 0.00356963 0.00281549 0.00281549 0.00281549 0.00281549 0.00281549 0.00281549 0.00281549 0.00281549 0.00281549 0.00281549 0.00281549 0.00281549 0.00281549 0.00281549 0.00281549 0.00281549 0.00201106 0.00201106 0.00201106 0.00201106 0.00201106 0.00201106 0.00201106 0.00201106 0.00241327 0.00241327 0.00241327 0.00241327 0.00241327 0.00241327 0.00241327 0.00241327 0.0032177 0.0032177 0.0032177 0.0032177 0.0032177 0.0032177 0.0032177 0.0032177 0.0032177 0.0032177 0.0032177 0.0032177 0.0032177 0.0032177 0.0032177 0.0032177 0.00457516 0.00472599 0.00779286 0.0104575 0.00894922 0.0136752 0.0187532 0.0215184 0.0344897 0.0404224 0.0506285 0.0609855 0.0713927 0.0800403 0.0863751 0.091805 0.107391 0.115787 0.127049 0.14188 0.159377 0.174309 0.18728 0.196481 0.216993 0.227753 0.240774 0.254299 0.269985 0.282504 0.294872 0.303117 0.326345 0.342283 0.365008 0.379839 0.397838 0.421066 0.451332 0.467572 0.519457 0.534289 0.700301 0.792509 0.515284 0.476169 0.425289 0.380744";
/**
* 绿色激光二极管的单色发射
*/
const TYPE_MONOCHROMATIC_EMISSION_FROM_A_GREEN_LASER_DIODE = "0 0 0.00271493 0.00271493 0.00311714 0.00311714 0.00392157 0.00392157 0.00351936 0.00351936 0.00331825 0.00331825 0.00331825 0.00331825 0.00331825 0.00331825 0.00331825 0.00331825 0.00311714 0.00311714 0.00351936 0.00351936 0.00351936 0.00351936 0.00311714 0.00311714 0.00291604 0.00291604 0.00291604 0.00291604 0.00351936 0.00351936 0.00351936 0.00351936 0.00372046 0.00372046 0.00372046 0.00372046 0.00372046 0.00372046 0.00372046 0.00372046 0.00361991 0.00326797 0.00311714 0.00311714 0.0034188 0.00351936 0.00367019 0.00392157 0.00331825 0.00331825 0.00336853 0.0034188 0.00351936 0.00351936 0.00356963 0.00361991 0.00377074 0.00377074 0.00382102 0.00392157 0.00402212 0.0040724 0.00417295 0.00417295 0.00422323 0.00392157 0.00437406 0.00457516 0.00462544 0.00447461 0.00417295 0.00457516 0.00442433 0.00417295 0.00412267 0.00377074 0.00382102 0.00417295 0.0042735 0.00457516 0.00477627 0.0042735 0.0042735 0.00432378 0.00467572 0.00447461 0.00392157 0.00392157 0.00422323 0.00397185 0.00377074 0.00382102 0.00392157 0.00402212 0.00437406 0.00457516 0.00447461 0.00392157 0.00442433 0.00638512 0.00884867 0.012368 0.0149824 0.0169432 0.0209653 0.0216189 0.022172 0.0231272 0.0206134 0.0185018 0.0157366 0.0138261 0.0108095 0.010005 0.0089995 0.00683761 0.00683761 0.00532931 0.0049271 0.00467572 0.00452489 0.00452489 0.00432378 0.00432378 0.00432378 0.00432378 0.00432378 0.00432378 0.00553042 0.00553042 0.00553042 0.00553042 0.00553042 0.00553042 0.00553042 0.00553042 0.00784314 0.00789341 0.00804424 0.00804424 0.00849673 0.00859729 0.0089995 0.00904977 0.0111111 0.0111614 0.0128205 0.0129211 0.0145299 0.0157366 0.0166918 0.0167924 0.0188537 0.0189543 0.0202112 0.0228256 0.0239819 0.0270991 0.0291604 0.0302162 0.0365008 0.0413776 0.0489694 0.0540976 0.0603319 0.0699347 0.0791855 0.0874309 0.102514 0.112921 0.132026 0.151986 0.171795 0.196129 0.230367 0.261538 0.304575 0.363851 0.434289 0.50729 0.588889 0.650076 0.702917 0.971644 0.939719 0.64193 0.57632 0.510055 0.428909 0.359728 0.295676 0.248467 0.206285 0.185219 0.160181 0.139316 0.124434 0.111966 0.0989442 0.0891403 0.0789845 0.0735546 0.0659628 0.0587732 0.0537959 0.0498241 0.0449975 0.0408748 0.0370036 0.0353947 0.0337356 0.0309201 0.0268477 0.0243339 0.0237305 0.0225239 0.0208145 0.0205128 0.0195576 0.0191051 0.0172449 0.0169432 0.0144796 0.0143288 0.0136752 0.0136249 0.0135244 0.0125189 0.0121166 0.0119658 0.0119658 0.0119155 0.0112619 0.0112619 0.0112619 0.0112619 0.0112619 0.0112619 0.0112619 0.0112619 0.0112619 0.0112619 0.0112619 0.0112619 0.0112619 0.0112619 0.0112619 0.0112619";
//Spectral(光谱)
/**
* 飞利浦光谱氙气灯-连续氙气低压热离子放电
*/
const TYPE_PHILIPS_SPECTRAL_XENON_LAMP_CONTINUOUS_XENON_LOW_PRESSURE_THERMIONIC_DISCHARGE = "0.00246355 0.00246355 0.00251383 0.002363 0.002363 0.00251383 0.00251383 0.0025641 0.00266466 0.00296631 0.00392157 0.0034188 0.00331825 0.00281549 0.00281549 0.00271493 0.00291604 0.00286576 0.0025641 0.00276521 0.0025641 0.00271493 0.00271493 0.00286576 0.00271493 0.00276521 0.0032177 0.00301659 0.00301659 0.00296631 0.00251383 0.0025641 0.00251383 0.00266466 0.00311714 0.00306687 0.00286576 0.00281549 0.00346908 0.0034188 0.00367019 0.00361991 0.0025641 0.00231272 0.00226244 0.00226244 0.00301659 0.00356963 0.0042735 0.00497738 0.00356963 0.00316742 0.00266466 0.00301659 0.00301659 0.00382102 0.00417295 0.00457516 0.00502765 0.00462544 0.00452489 0.00442433 0.00542986 0.00678733 0.00804424 0.00960282 0.00955254 0.010005 0.0112117 0.0128205 0.0139769 0.0156863 0.0172449 0.0180996 0.0214681 0.0234289 0.0290598 0.0340372 0.0438914 0.0494721 0.0528407 0.0510307 0.0478633 0.0512318 0.0556561 0.05817 0.060181 0.0650076 0.0705883 0.0735043 0.0794872 0.0783811 0.0810961 0.0852188 0.108396 0.129864 0.170538 0.244545 0.346757 0.327602 0.256813 0.261388 0.27642 0.230166 0.19643 0.189744 0.202665 0.220664 0.246305 0.280141 0.286224 0.278733 0.306084 0.339417 0.514127 0.674057 0.715184 0.510307 0.400251 0.409955 0.524987 0.683409 0.810407 0.601307 0.479789 0.573906 0.439769 0.348869 0.443087 0.625943 0.596883 0.37084 0.296078 0.338261 0.340523 0.348014 0.411312 0.512871 0.559527 0.433736 0.473404 0.526998 0.447461 0.335696 0.294922 0.304173 0.30905 0.319809 0.375013 0.504475 0.575063 0.303218 0.227753 0.244143 0.224133 0.224485 0.237607 0.238964 0.266315 0.292509 0.30734 0.279839 0.282453 0.299799 0.304927 0.303318 0.318954 0.329563 0.328004 0.326697 0.340473 0.355455 0.360835 0.350981 0.345752 0.346808 0.35455 0.36546 0.376521 0.362896 0.361589 0.367622 0.358572 0.356511 0.366315 0.369583 0.379387 0.377979 0.379186 0.37089 0.361488 0.353696 0.344394 0.343489 0.358321 0.342031 0.324133 0.334289 0.358271 0.368326 0.351232 0.321619 0.315535 0.300553 0.285973 0.287582 0.313122 0.335495 0.289744 0.240674 0.265661 0.295877 0.380845 0.444143 0.455908 0.442987 0.472499 0.477929 0.496833 0.468879 0.44007 0.435294 0.406486 0.388688 0.381297 0.378884 0.41096 0.422272 0.444244 0.455958 0.429764 0.35269 0.356762 0.3818 0.384364 0.34726 0.228808 0.187632 0.206184 0.223479 0.263097 0.250779 0.173002 0.145048 0.119708 0.0964807 0.067823 0.0426848 0.0205631 0.0110608";
/**
* 飞利浦光谱铷灯-连续铷低压热离子放电
*/
const TYPE_PHILIPS_SPECTRAL_RUBIDIUM_LAMP_CONTINUOUS_RUBIDIUM_LOW_PRESSURE_THERMIONIC_DISCHARGE = "0.00392157 0.00392157 0.00392157 0.00392157 0.00392157 0.00392157 0.00392157 0.00392157 0.00392157 0.00392157 0.00281549 0.00281549 0.0032177 0.00331825 0.00351936 0.00351936 0.00311714 0.00311714 0.00361991 0.00316742 0.00301659 0.00261438 0.00261438 0.00261438 0.00276521 0.00281549 0.00191051 0.00191051 0.00196078 0.00196078 0.00241327 0.00241327 0.00246355 0.00246355 0.00301659 0.00507793 0.00925088 0.0126697 0.0190548 0.0366516 0.0646556 0.0880342 0.247461 0.380493 0.466918 0.565862 0.622876 0.540422 0.533534 0.633585 0.578029 0.347461 0.165058 0.103218 0.0682755 0.0599799 0.0346405 0.0267471 0.026546 0.0250377 0.0236803 0.0233283 0.0223228 0.0207642 0.022172 0.0234289 0.0267974 0.0267974 0.026546 0.0268477 0.0284565 0.0296632 0.0325289 0.0337356 0.0417295 0.0417295 0.0445953 0.044897 0.0466064 0.051634 0.0528909 0.0541478 0.0564103 0.0600302 0.0626949 0.0642032 0.0671695 0.0731523 0.0794871 0.081448 0.089995 0.0900453 0.0907492 0.0941177 0.0978381 0.102313 0.105732 0.10719 0.115334 0.117748 0.117898 0.118452 0.123429 0.131021 0.135596 0.134942 0.177677 0.215837 0.304726 0.42906 0.457014 0.312921 0.189392 0.182554 0.23449 0.246757 0.212167 0.170035 0.164605 0.165812 0.162041 0.165209 0.16913 0.172549 0.174862 0.177476 0.179537 0.17813 0.181146 0.179839 0.1727 0.176823 0.179186 0.182655 0.182303 0.181046 0.181549 0.178482 0.179487 0.180543 0.174258 0.173353 0.172901 0.171443 0.163147 0.162695 0.159326 0.158874 0.15812 0.14545 0.151735 0.139417 0.117245 0.144998 0.132278 0.0867773 0.116993 0.138311 0.104977 0.110005 0.0780794 0.0872298 0.214932 0.204173 0.0456511 0.0357466 0.108497 0.222071 0.276772 0.139618 0.046003 0.0520362 0.108195 0.212217 0.298592 0.169633 0.129663 0.22554 0.173806 0.053092 0.132529 0.19447 0.346003 0.254651 0.0339367 0.03273 0.0586225 0.0711916 0.125138 0.248467 0.270639 0.144042 0.157667 0.217848 0.374258 0.289995 0.0645551 0.0291604 0.0302162 0.0244344 0.0240322 0.0228256 0.0406235 0.0705883 0.0668678 0.0535948 0.159125 0.321368 0.25993 0.0830066 0.151181 0.357315 0.366667 0.0707391 0.0182001 0.0335847 0.104072 0.156259 0.244294 0.431876 0.629311 0.357969 0.0764203 0.048718 0.0603318 0.0728004 0.105078 0.166717 0.246204 0.224535 0.280895 0.349472 0.39095 0.45269 0.431071 0.307843 0.36732 0.53997 0.307441 0.0666164 0.0258924 0.0223228 0.0129713 0.0108597 0.00874812 0.00628457 0.00563097 0.00382102 0.0017094 0.000904977";
/**
* 飞利浦光谱镉灯-连续镉低压热离子放电
*/
const TYPE_PHILIPS_SPECTRAL_CADMIUM_LAMP_CONTINUOUS_CADMIUM_LOW_PRESSURE_THERMIONIC_DISCHARGE = "0.00326797 0.00326797 0.00392157 0.00392157 0.00392157 0.00392157 0.00392157 0.00392157 0.00392157 0.00392157 0.00251383 0.00251383 0.00311714 0.00311714 0.00311714 0.00311714 0.00251383 0.00251383 0.00346908 0.00367019 0.0034188 0.0034188 0.00346908 0.00356963 0.00392157 0.00377074 0.00432378 0.00422323 0.00412267 0.00336853 0.00397185 0.00487682 0.00487682 0.00568125 0.00658622 0.00668678 0.00764203 0.00739065 0.00723982 0.00774258 0.00854701 0.00904977 0.00925088 0.0105581 0.0122675 0.0128708 0.0124686 0.0138763 0.0143288 0.0157366 0.0170438 0.0200603 0.0226244 0.0249372 0.0280543 0.028909 0.0327803 0.033987 0.0424334 0.043992 0.0499749 0.0532931 0.0546506 0.0586727 0.0660131 0.0708396 0.0777778 0.0785822 0.0810961 0.0842132 0.0896934 0.0961288 0.100101 0.103369 0.110709 0.111714 0.113826 0.118401 0.123529 0.128155 0.133333 0.137205 0.145953 0.174057 0.226697 0.265158 0.255556 0.199497 0.156863 0.156461 0.148768 0.15093 0.148517 0.146807 0.144143 0.14178 0.144042 0.143087 0.136149 0.13449 0.131725 0.130266 0.13097 0.133082 0.135093 0.136601 0.135897 0.136048 0.137355 0.136652 0.139115 0.142685 0.145551 0.1545 0.161287 0.171544 0.192257 0.208195 0.257717 0.303821 0.36174 0.399749 0.536903 0.755103 0.809803 0.729915 0.363751 0.258069 0.276169 0.254852 0.251081 0.253997 0.277878 0.314228 0.342232 0.349422 0.521719 0.768627 0.8182 0.793263 0.514279 0.249472 0.231272 0.215083 0.169633 0.162293 0.142232 0.130669 0.119859 0.103268 0.0903972 0.0851685 0.0798391 0.0758673 0.0834088 0.0867773 0.0968829 0.102966 0.111966 0.126395 0.152036 0.181398 0.201257 0.224334 0.473906 0.764756 0.819507 0.741126 0.395023 0.176068 0.172046 0.205732 0.215033 0.124485 0.0893414 0.0831574 0.0688789 0.0659126 0.0620915 0.0558572 0.0479638 0.0445953 0.0450981 0.0440925 0.0406234 0.0397185 0.0384113 0.0358472 0.0339367 0.0349422 0.030719 0.0261941 0.0267471 0.025993 0.0253897 0.0246858 0.02363 0.0201609 0.0182001 0.0169432 0.015636 0.0148819 0.0130719 0.0136752 0.0141277 0.0123177 0.0105078 0.0107089 0.011815 0.0126697 0.0101559 0.00869784 0.00819507 0.0072901 0.00703871 0.00759176 0.00759176 0.00809452 0.00859729 0.00804424 0.00819507 0.00839618 0.00809452 0.00683761 0.00678733 0.00864756 0.00960282 0.00980392 0.0106586 0.00980392 0.00794369 0.00774258 0.00925088 0.0107089 0.0181498 0.02182 0.0435898 0.0863248 0.168527 0.301408 0.517898 0.514128 0.190447 0.0471594 0.0137255 0.0134238 0.00623429 0.0107592 0.0081448 0.00744093";
/**
* 飞利浦光谱锌灯-连续锌低压热离子放电
*/
const TYPE_PHILIPS_SPECTRAL_ZINC_LAMP_CONTINUOUS_ZINC_LOW_PRESSURE_THERMIONIC_DISCHARGE = "0.00241327 0.00241327 0.00331825 0.00331825 0.00331825 0.00331825 0.00331825 0.00331825 0.00331825 0.00331825 0.00331825 0.0032177 0.0032177 0.00326797 0.0034188 0.00331825 0.00336853 0.0034188 0.00351936 0.00351936 0.00351936 0.00351936 0.00351936 0.00351936 0.00351936 0.00351936 0.00361991 0.00356963 0.00351936 0.00351936 0.00351936 0.00351936 0.00356963 0.00361991 0.00291604 0.00291604 0.00331825 0.00331825 0.00291604 0.00291604 0.00251383 0.00251383 0.00346908 0.00346908 0.00346908 0.00346908 0.00367019 0.00356963 0.00356963 0.00356963 0.00457516 0.00437406 0.00437406 0.00437406 0.00497738 0.00673705 0.0074912 0.00789341 0.00839618 0.00804424 0.00829563 0.0100553 0.0121669 0.014731 0.0148819 0.0143791 0.0160885 0.0176471 0.0180493 0.0196079 0.0213675 0.0229261 0.028004 0.0296632 0.0430367 0.0406737 0.0369533 0.0346405 0.0356964 0.0388135 0.0399196 0.0397185 0.043087 0.0427351 0.0459528 0.0498743 0.0533434 0.0556561 0.0565108 0.0565108 0.0572147 0.0556561 0.0559075 0.0586225 0.0597285 0.0616893 0.0635496 0.065812 0.0679236 0.0703369 0.073454 0.0751131 0.0768728 0.0790347 0.0832579 0.0864254 0.0939166 0.0904978 0.0973857 0.111513 0.118301 0.125239 0.144444 0.165259 0.197939 0.270136 0.348014 0.301559 0.302715 0.342534 0.317245 0.456611 0.766968 0.781347 0.488336 0.324535 0.470035 0.802916 0.842332 0.633836 0.337607 0.334037 0.348768 0.346305 0.347562 0.30357 0.497838 0.799396 0.846757 0.704123 0.314731 0.256611 0.250075 0.205028 0.174057 0.147009 0.129563 0.115535 0.0981398 0.0855707 0.0755154 0.0661639 0.0585722 0.0517345 0.0428859 0.0426848 0.0384616 0.0333836 0.0318753 0.0279035 0.0251886 0.0256913 0.021267 0.0229261 0.0222222 0.0201609 0.0183007 0.0161388 0.0154852 0.0178985 0.0186526 0.028356 0.0761187 0.088185 0.0247863 0.0113122 0.0112117 0.0130719 0.0129713 0.0124686 0.0125189 0.0119658 0.0120664 0.0114128 0.011815 0.0120161 0.0135747 0.0143791 0.0171946 0.0228256 0.0284565 0.0314228 0.0282554 0.0255908 0.0191051 0.0154349 0.0119155 0.011815 0.0116642 0.00915033 0.0083459 0.00829563 0.00638512 0.00683761 0.0057818 0.00457516 0.00487682 0.00734037 0.00930116 0.010005 0.0140272 0.0135244 0.0147813 0.0191051 0.025088 0.0383107 0.0466566 0.0464555 0.033635 0.0281549 0.0206134 0.0198592 0.0219709 0.0313726 0.0471091 0.0631976 0.104726 0.101307 0.0666164 0.051081 0.0504777 0.0588738 0.0925088 0.162343 0.256963 0.497034 0.652791 0.297888 0.0746104 0.0326798 0.0243841 0.0183007 0.0153343 0.014731 0.0136752 0.00965309 0.00718954 0.00548014 0.00472599 0.00452489";
//Molecular(火焰)
/**
* 丁烷气体火焰
*/
const TYPE_BUTANE_GAS_FLAME = "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.000804424 0.000804424 0.000804424 0.000804424 0.000804424 0.000804424 0.000804424 0.000804424 0.00351936 0.00351936 0.00593263 0.00804424 0.00844646 0.0107592 0.0130719 0.013273 0.0177476 0.0199095 0.0235797 0.0289593 0.038713 0.0482655 0.0625943 0.0740574 0.0940171 0.105229 0.115435 0.138713 0.174359 0.213323 0.247159 0.298341 0.37823 0.437406 0.4818 0.50367 0.509502 0.508748 0.48366 0.444042 0.391352 0.327853 0.267672 0.249975 0.258472 0.273756 0.299547 0.298693 0.293565 0.276772 0.257969 0.226295 0.196229 0.163198 0.14178 0.126445 0.112569 0.109502 0.108095 0.106938 0.107843 0.107391 0.10734 0.108044 0.112519 0.113172 0.115938 0.117446 0.120312 0.120814 0.125239 0.125038 0.128457 0.12911 0.134892 0.137456 0.141679 0.143741 0.146807 0.147159 0.158874 0.166265 0.171242 0.183409 0.201659 0.232227 0.266616 0.303972 0.354701 0.398844 0.439568 0.475716 0.505732 0.523479 0.534641 0.533685 0.533384 0.531121 0.535495 0.534993 0.530116 0.503318 0.458371 0.405782 0.340372 0.288185 0.235495 0.181046 0.161136 0.160432 0.165561 0.166365 0.159779 0.16189 0.16536 0.161991 0.161237 0.152489 0.150729 0.141227 0.136802 0.130216 0.128406 0.11815 0.116139 0.116038 0.125189 0.127451 0.144294 0.157768 0.174359 0.19271 0.208949 0.230468 0.260131 0.286325 0.324133 0.351684 0.385621 0.418451 0.456611 0.494118 0.511664 0.510508 0.500754 0.486023 0.447059 0.430216 0.392358 0.255304 0.164455 0.168678 0.171946 0.172599 0.176018 0.177778 0.180091 0.183208 0.189995 0.193263 0.202665 0.213223 0.226647 0.235244 0.242383 0.254701 0.26903 0.283509 0.293816 0.300855 0.30724 0.31448 0.320261 0.322725 0.321719 0.321971 0.304575 0.282755 0.261438 0.235948 0.199346 0.129211 0.0933635 0.0795375 0.0746607 0.100603 0.132931 0.167019 0.204072 0.232278 0.248919 0.260332 0.278431 0.279236 0.278431 0.276018 0.273655 0.268376 0.260231 0.250528 0.231725 0.213524 0.194168 0.171041 0.149774 0.126848 0.113072 0.0978381 0.0766717 0.0678733 0.0613374 0.0517849 0.0466566 0.0399699 0.0367019 0.0323781 0.0263449 0.0218703 0.0214681 0.0186526 0.0200603 0.0203117 0.0247361 0.0249372";
/**
* 酒精火焰
*/
const TYPE_ALCOHOL_FLAME = "0.017999 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00130719 0.00130719 0.000603318 0.000452489 0.000100553 0.000201106 0.000703871 0.000553042 0.00739065 0.00583208 0.00874812 0.0130216 0.0117647 0.0199095 0.0577175 0.102011 0.169834 0.221016 0.256008 0.255606 0.247059 0.223731 0.170337 0.12177 0.0651584 0.0436903 0.0438411 0.0538965 0.0642031 0.0824535 0.0904978 0.0785822 0.0674208 0.0574661 0.0432378 0.0320764 0.0385621 0.0490699 0.0426848 0.030719 0.0295123 0.0459025 0.05817 0.0554047 0.0515837 0.0499749 0.0497738 0.0523379 0.0620413 0.07999 0.0746606 0.0623429 0.0665159 0.06908 0.0695827 0.07818 0.0869784 0.0946707 0.102715 0.104776 0.103871 0.109301 0.111513 0.10915 0.0996481 0.0958271 0.0884867 0.091101 0.107542 0.113323 0.116038 0.123881 0.153645 0.160231 0.171594 0.210106 0.245098 0.255807 0.261739 0.264957 0.282655 0.277024 0.28004 0.292207 0.285872 0.25093 0.219608 0.213323 0.204676 0.207089 0.195777 0.184716 0.188788 0.20005 0.207592 0.21453 0.234138 0.232076 0.246958 0.261187 0.248064 0.23273 0.224082 0.218552 0.218301 0.219658 0.226496 0.229311 0.22549 0.232579 0.244746 0.25636 0.277828 0.306033 0.324434 0.342986 0.361187 0.392006 0.437557 0.481901 0.519105 0.583509 0.657869 0.722122 0.780643 0.83283 0.850628 0.841528 0.808999 0.77099 0.713173 0.649824 0.589241 0.555606 0.544595 0.553343 0.566868 0.575515 0.585671 0.594721 0.599497 0.60543 0.609703 0.612669 0.610256 0.608295 0.613172 0.620261 0.624082 0.629512 0.634942 0.633031 0.629059 0.633132 0.628205 0.617345 0.609904 0.607541 0.595726 0.580241 0.54007 0.506184 0.449271 0.426194 0.412971 0.373555 0.353042 0.355204 0.366164 0.40005 0.462946 0.543942 0.629965 0.729764 0.724133 0.711765 0.711363 0.727602 0.71996 0.599749 0.487682 0.48723 0.479839 0.472398 0.434138 0.399698 0.369482 0.346707 0.329915 0.316591 0.295274 0.262594 0.234641 0.21629 0.193715 0.168678 0.148115 0.122725 0.0892911 0.0592258 0.0338361 0.018904 0.00658622 0.00361991 0.00387129 0.00553042 0.00633484 0.00542986";
//Fluorescence(荧光)
/**
* 打印质量A4复印纸,包裹在黑光灯周围
*/
const TYPE_PRINT_QUALITY_A4_XEROX_PAPER_WRAPPED_AROUND_A_BLACKLIGHT_LAMP = "0.00482655 0.00482655 0.0112619 0.017094 0.0479135 0.0667672 0.119457 0.162645 0.134389 0.0677728 0.0383107 0.0370538 0.0393163 0.0458522 0.0588236 0.0717949 0.0887381 0.106285 0.125339 0.149673 0.175918 0.210608 0.249522 0.287934 0.315033 0.353796 0.400905 0.437557 0.468778 0.489945 0.513424 0.522071 0.523177 0.525641 0.536551 0.54183 0.546355 0.548868 0.556259 0.561086 0.56918 0.575515 0.581599 0.585168 0.593414 0.598642 0.602966 0.606485 0.608195 0.608698 0.612971 0.612619 0.614479 0.61287 0.616038 0.616189 0.616641 0.617194 0.62177 0.622977 0.621217 0.62368 0.624133 0.628055 0.630317 0.631775 0.633484 0.633686 0.634691 0.639819 0.643238 0.644596 0.646607 0.648668 0.659578 0.722977 0.734389 0.680845 0.67989 0.695375 0.700604 0.714631 0.718301 0.728457 0.73811 0.748014 0.754148 0.760332 0.761538 0.757516 0.742433 0.727803 0.721519 0.705631 0.692962 0.676873 0.669533 0.658271 0.6545 0.647864 0.64349 0.635948 0.629312 0.623379 0.6181 0.615535 0.608496 0.611312 0.613775 0.613474 0.614177 0.610658 0.609552 0.604927 0.603016 0.595525 0.59085 0.588235 0.585068 0.582906 0.585671 0.581951 0.577225 0.584314 0.592257 0.596179 0.59633 0.598894 0.602111 0.605631 0.606586 0.607843 0.606586 0.607843 0.607792 0.608748 0.608396 0.608396 0.606938 0.60739 0.608547 0.608446 0.609502 0.605379 0.601508 0.597687 0.593816 0.590699 0.588285 0.584414 0.582353 0.579286 0.579286 0.57632 0.560281 0.558371 0.543087 0.526496 0.502514 0.481549 0.45812 0.443087 0.434188 0.433434 0.429412 0.422725 0.415837 0.407994 0.396229 0.394771 0.389341 0.389341 0.377728 0.372348 0.371342 0.372348 0.370186 0.364907 0.350528 0.343841 0.332328 0.32177 0.311413 0.297637 0.285872 0.276219 0.260684 0.254148 0.242232 0.227602 0.212921 0.198492 0.181599 0.166365 0.148316 0.133132 0.118351 0.104022 0.0901458 0.0841629 0.0822021 0.0918552 0.114279 0.110156 0.106083 0.0977879 0.0952237 0.0842635 0.0757165 0.0655103 0.0570639 0.0475616 0.041076 0.0310206 0.0273002 0.0228256 0.0182001 0.014178 0.0138763 0.0138763 0.0108597 0.00784314 0.00784314 0.00482655 0.00180995 0.00180995 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00784314 0.00784314 0.00784314 0.00784314 0.00784314 0.00784314 0.00784314 0.00784314";
/**
* 霓虹绿染料,黑光轰击
*/
const TYPE_NEON_GREEN_DYE_BOMBARDED_WITH_BLACK_LIGHT = "0.0680242 0.0761187 0.164756 0.280191 0.427904 0.492056 0.438261 0.283007 0.137707 0.112016 0.105933 0.0967321 0.118351 0.150176 0.182403 0.182252 0.150276 0.119306 0.110659 0.111966 0.117597 0.122574 0.133484 0.1363 0.139115 0.139869 0.157265 0.160734 0.167873 0.17089 0.175968 0.175867 0.17823 0.176722 0.183861 0.185269 0.191252 0.192609 0.197386 0.199095 0.202162 0.203218 0.210508 0.209703 0.211765 0.213273 0.218602 0.220111 0.224083 0.223228 0.230065 0.230468 0.235696 0.237305 0.242383 0.243188 0.246606 0.247009 0.254801 0.254148 0.258472 0.259728 0.257466 0.257918 0.262695 0.264806 0.270588 0.271041 0.255455 0.252891 0.265259 0.29271 0.338713 0.387029 0.465309 0.524635 0.707995 0.759326 0.466063 0.276521 0.244545 0.224284 0.20357 0.199447 0.205581 0.200402 0.180091 0.176973 0.178934 0.177627 0.159025 0.157868 0.156209 0.154751 0.150478 0.148617 0.145752 0.145199 0.138914 0.139316 0.136451 0.136652 0.13283 0.132177 0.131423 0.13087 0.124837 0.125138 0.123328 0.123127 0.119407 0.117949 0.115787 0.114279 0.109905 0.109905 0.109754 0.110156 0.108648 0.109904 0.111011 0.111865 0.118049 0.120865 0.124585 0.128155 0.131976 0.135546 0.145349 0.151785 0.162142 0.167421 0.179286 0.187934 0.202966 0.21634 0.23092 0.236652 0.24188 0.2454 0.262192 0.270789 0.281699 0.284062 0.287481 0.284364 0.281498 0.276219 0.275214 0.269683 0.266767 0.260533 0.266063 0.259578 0.248215 0.236953 0.237959 0.226043 0.230719 0.239568 0.24731 0.254248 0.260885 0.26556 0.26903 0.275767 0.28175 0.285772 0.284263 0.288587 0.290699 0.290699 0.286928 0.283358 0.278934 0.276269 0.272599 0.268828 0.262544 0.253595 0.241679 0.23092 0.219407 0.202262 0.186828 0.173354 0.155405 0.142735 0.127099 0.111765 0.0959276 0.0833082 0.072901 0.0671694 0.0567622 0.0510307 0.0452489 0.0362494 0.028356 0.0221217 0.0173454 0.0136752 0.00945199 0.00945199 0.00864756 0.00784314 0.00784314 0.00703871 0.00623429 0.00623429 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00784314 0.00784314 0.00784314 0.00784314 0.00784314 0.00784314 0.00784314 0.00784314 0.00784314 0.00784314 0.00784314 0.00784314 0.00784314 0.00784314 0.00784314 0.00784314 0.00784314 0.00784314 0.00784314 0.00784314 0.00784314 0.00784314 0.00784314 0.00784314";
/**
* 常规现代彩色电视阴极射线管
*/
const TYPE_REGULAR_MODERN_COLOR_TV_CRT = "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00160885 0.00160885 0.00160885 0.00160885 0.00160885 0.00160885 0.00160885 0.00160885 0.00442433 0.00442433 0.00603318 0.00764203 0.00764203 0.00925088 0.0108597 0.0108597 0.02363 0.0264455 0.0302162 0.0347411 0.0453494 0.0498744 0.0591755 0.0671192 0.0884867 0.0985923 0.116591 0.127451 0.146556 0.159075 0.166466 0.179789 0.204374 0.217647 0.230618 0.249573 0.269683 0.289542 0.309502 0.323831 0.345953 0.361036 0.382303 0.400503 0.42001 0.437507 0.451483 0.466466 0.486325 0.491654 0.497587 0.506285 0.513776 0.517295 0.526345 0.534892 0.537456 0.549773 0.561387 0.56551 0.562946 0.558069 0.566214 0.559376 0.537959 0.53092 0.534138 0.524786 0.519608 0.506536 0.493364 0.483057 0.4727 0.462796 0.454701 0.441277 0.435043 0.421367 0.422273 0.409603 0.395224 0.391503 0.391302 0.387079 0.380442 0.373203 0.363449 0.355053 0.345802 0.337205 0.331272 0.321368 0.312669 0.303972 0.309854 0.305882 0.295576 0.280493 0.275515 0.28004 0.288235 0.299648 0.307441 0.314932 0.318251 0.328155 0.339618 0.347713 0.352338 0.362393 0.373353 0.384464 0.38728 0.390246 0.391151 0.394469 0.399949 0.404324 0.406888 0.407441 0.411161 0.411413 0.410457 0.409552 0.408798 0.407893 0.407391 0.406435 0.401508 0.400653 0.401759 0.401106 0.396581 0.391604 0.383208 0.378079 0.375666 0.373353 0.370186 0.367069 0.362896 0.359779 0.356662 0.355154 0.343992 0.340322 0.33635 0.331021 0.31996 0.306284 0.289341 0.26551 0.247914 0.227853 0.22911 0.274711 0.331021 0.384263 0.411563 0.442433 0.435294 0.411463 0.455153 0.519407 0.452539 0.36727 0.347059 0.348215 0.351835 0.35812 0.381951 0.429513 0.499246 0.484163 0.456863 0.520764 0.580141 0.536149 0.36908 0.222122 0.140372 0.0844143 0.05817 0.04726 0.0396179 0.0235294 0.00698844 0.0025641 0.0032177 0.00884867 0.0278029 0.0384616";
//snore
/**
* 频闪闪光。氙气I,很可能会,也许会
*/
const TYPE_STROBOSCOPIC_FLASH_XENON_I_LIKELY_LL_AND_PERHAPS = "0.0351433 0.0351936 0.0344897 0.0349422 0.0343389 0.0342383 0.0346405 0.0339869 0.0347411 0.0345903 0.0343891 0.0337858 0.0349925 0.0357969 0.0345903 0.0343892 0.0355958 0.03454 0.0341881 0.0340875 0.0306184 0.0283057 0.0282554 0.0265963 0.02363 0.0234289 0.0335345 0.0379588 0.0419306 0.0457516 0.0531926 0.0569131 0.0622926 0.0682755 0.0807944 0.0917044 0.105279 0.112368 0.11639 0.120965 0.125641 0.134389 0.163399 0.169231 0.166516 0.159175 0.150075 0.157315 0.185671 0.2001 0.213977 0.20905 0.181599 0.153695 0.130267 0.119608 0.113424 0.11096 0.117144 0.120714 0.129412 0.132378 0.133937 0.136903 0.147059 0.160583 0.195224 0.207793 0.219759 0.21644 0.188587 0.169834 0.161237 0.162896 0.169784 0.177275 0.18723 0.202363 0.223027 0.242534 0.25636 0.25822 0.243087 0.230468 0.213675 0.205983 0.210357 0.228457 0.25812 0.276722 0.30005 0.304173 0.305279 0.291855 0.261036 0.233836 0.211011 0.210106 0.204826 0.213022 0.236652 0.252137 0.262695 0.265661 0.260533 0.25827 0.244696 0.243439 0.25631 0.26908 0.292659 0.306536 0.316189 0.322222 0.31458 0.29095 0.26551 0.25631 0.256913 0.260432 0.27094 0.278984 0.305028 0.306033 0.303117 0.293967 0.284867 0.277979 0.274409 0.273052 0.271443 0.270035 0.264756 0.260935 0.266365 0.27823 0.291453 0.29814 0.287431 0.29824 0.327904 0.366667 0.469985 0.577375 0.586224 0.551533 0.46541 0.465712 0.466918 0.437406 0.393011 0.400704 0.430116 0.426596 0.330619 0.290498 0.302061 0.346757 0.356963 0.348618 0.339518 0.331071 0.328859 0.334792 0.341679 0.353243 0.370287 0.390447 0.411211 0.419407 0.405932 0.402966 0.386727 0.381347 0.388889 0.413273 0.467673 0.489442 0.481649 0.450528 0.41815 0.434239 0.468577 0.516692 0.601609 0.663097 0.667572 0.640373 0.590648 0.571895 0.545047 0.521367 0.510508 0.523529 0.574158 0.588336 0.586475 0.559678 0.507743 0.468477 0.427803 0.403569 0.388135 0.377727 0.355405 0.342383 0.323127 0.319809 0.317094 0.317949 0.333535 0.334741 0.333585 0.327753 0.303519 0.291503 0.284867 0.267974 0.261337 0.280895 0.296279 0.317446 0.341679 0.360483 0.366365 0.370337 0.371493 0.374912 0.375415 0.376672 0.378281 0.377325 0.374912 0.368829 0.34912 0.330669 0.316692 0.294972 0.278683 0.261689 0.248115 0.233535 0.21629 0.199598 0.183308 0.161438 0.146707 0.129211 0.117496 0.113374";
/**
* 碳弧光谱
*/
const TYPE_CARBON_ARC_SPECTRUM = "0.140674 0.163399 0.18733 0.175616 0.140774 0.11091 0.0867773 0.0782806 0.0775767 0.0786325 0.0788336 0.0806938 0.0858221 0.0911011 0.0944696 0.0919558 0.0842635 0.0782303 0.077074 0.0782806 0.0814983 0.0850679 0.0877326 0.0911514 0.0944696 0.0955254 0.110608 0.116591 0.124133 0.128054 0.130719 0.138763 0.143238 0.147712 0.14912 0.155405 0.162494 0.170991 0.17632 0.179035 0.181398 0.181096 0.198441 0.207944 0.282202 0.360282 0.433233 0.511563 0.603619 0.613021 0.534037 0.366918 0.273655 0.264505 0.245249 0.256963 0.282956 0.287029 0.324887 0.342886 0.387682 0.420513 0.452187 0.504977 0.545148 0.521719 0.4453 0.410005 0.370789 0.33992 0.321569 0.316139 0.322072 0.326496 0.340523 0.358623 0.37823 0.4001 0.437657 0.471896 0.448115 0.41277 0.441529 0.493665 0.498341 0.524434 0.558673 0.578079 0.592509 0.536501 0.55812 0.639317 0.600301 0.469985 0.446959 0.456612 0.439819 0.461237 0.474007 0.482554 0.511061 0.511413 0.554349 0.604323 0.571141 0.539517 0.567019 0.53459 0.516591 0.532126 0.549271 0.533534 0.548567 0.596329 0.601659 0.575214 0.568527 0.582152 0.596128 0.595073 0.609904 0.613876 0.608296 0.596179 0.600603 0.581347 0.579588 0.573605 0.567471 0.548617 0.534992 0.528155 0.572298 0.570789 0.531473 0.531372 0.549723 0.496229 0.489191 0.499145 0.501408 0.479688 0.477225 0.463047 0.458422 0.471694 0.464555 0.441177 0.422021 0.414128 0.424485 0.421518 0.42368 0.404826 0.386476 0.388386 0.407692 0.413474 0.407642 0.402162 0.405782 0.415234 0.40362 0.409402 0.417194 0.426445 0.432227 0.439819 0.445199 0.450579 0.449171 0.460785 0.472901 0.483359 0.475868 0.464002 0.461237 0.464304 0.456209 0.477225 0.485973 0.465812 0.455858 0.463399 0.46717 0.462645 0.463701 0.4635 0.462796 0.461991 0.46179 0.46174 0.461589 0.46174 0.463399 0.463248 0.462997 0.462896 0.462896 0.462997 0.463248 0.463399 0.474158 0.469382 0.467371 0.466164 0.463298 0.466566 0.463148 0.442635 0.443439 0.419658 0.447411 0.477979 0.499397 0.486677 0.472398 0.553293 0.610558 0.516189 0.49095 0.538763 0.554047 0.567471 0.581347 0.574912 0.591704 0.588034 0.576269 0.566918 0.558019 0.543288 0.527853 0.513524 0.507893 0.505028 0.498693 0.489392 0.479638 0.468024 0.458975 0.446858 0.440825 0.402112 0.367672 0.32368 0.282403 0.219608 0.145148 0.10734";
/**
* 欧司朗[XBO 75W/2]短弧氙气灯
*/
const TYPE_OSRAM_XBO_75W2_SHORT_ARC_XENON_LAMP = "0.104877 0.111564 0.117999 0.130367 0.145349 0.159326 0.174811 0.194319 0.212921 0.222826 0.260784 0.275918 0.296682 0.317798 0.341428 0.364907 0.384917 0.397486 0.42549 0.438964 0.446104 0.458874 0.479085 0.498291 0.513876 0.517848 0.525842 0.527652 0.528004 0.530518 0.531825 0.530015 0.531372 0.531523 0.533132 0.537607 0.54183 0.544092 0.5456 0.549774 0.553997 0.558773 0.557717 0.562192 0.56551 0.569231 0.573202 0.576018 0.57818 0.57999 0.583157 0.587028 0.593615 0.59819 0.600854 0.60548 0.609904 0.609251 0.613021 0.617094 0.619507 0.624585 0.62901 0.630417 0.637909 0.64359 0.648819 0.648216 0.653293 0.656964 0.658824 0.662544 0.663751 0.665008 0.66898 0.671946 0.673454 0.676974 0.678683 0.679839 0.684012 0.686174 0.691001 0.692861 0.69985 0.706788 0.716039 0.726144 0.73092 0.731825 0.708598 0.70166 0.689744 0.668578 0.647663 0.638411 0.644244 0.644998 0.63811 0.628256 0.628105 0.625541 0.61825 0.612669 0.613122 0.614278 0.602815 0.60734 0.606988 0.603217 0.602564 0.601156 0.599849 0.609502 0.614881 0.625138 0.63077 0.632881 0.637456 0.647009 0.659679 0.671695 0.679035 0.677627 0.671845 0.66908 0.669533 0.671494 0.671494 0.669432 0.661287 0.661489 0.661237 0.660031 0.661137 0.664907 0.668326 0.670136 0.667673 0.665561 0.66184 0.655707 0.650277 0.644897 0.64168 0.640222 0.639468 0.640574 0.64173 0.643741 0.642132 0.638613 0.635295 0.635094 0.635647 0.635294 0.631775 0.63082 0.633032 0.633434 0.635345 0.634993 0.626496 0.62182 0.620312 0.621317 0.621418 0.620362 0.620663 0.62001 0.619909 0.619054 0.615937 0.613524 0.609803 0.604726 0.600502 0.597033 0.589392 0.583861 0.576119 0.569834 0.561739 0.54917 0.533132 0.516541 0.495777 0.475415 0.4636 0.455455 0.451333 0.450327 0.44354 0.442484 0.442685 0.439669 0.438814 0.437205 0.435546 0.433987 0.434842 0.438311 0.436652 0.439819 0.435696 0.441026 0.421217 0.387783 0.361539 0.36169 0.3818 0.428507 0.459729 0.486576 0.492459 0.497536 0.503922 0.506938 0.520412 0.520865 0.520261 0.526244 0.526646 0.521116 0.515234 0.499698 0.487783 0.480191 0.465008 0.453595 0.437708 0.41815 0.406787 0.39829 0.379487 0.354852 0.335445 0.309553 0.288034 0.245199 0.209452 0.18356 0.14545 0.11634 0.0760684 0.0538965 0.0510307 0.0522876 0.0491704 0.0423329";
}
?>

6
src/scene/texture/procedural/Brick.php

@ -99,7 +99,7 @@ class Brick extends TextureBase
*/ */
public function setBricktex($color) public function setBricktex($color)
{ {
$this->bricktex = Scene::testAbnormal($color);
$this->bricktex = $this->judgeAttribute($color);
} }
/** /**
@ -107,7 +107,7 @@ class Brick extends TextureBase
*/ */
public function setBrickmodtex($color) public function setBrickmodtex($color)
{ {
$this->brickmodtex = Scene::testAbnormal($color);
$this->brickmodtex = $this->judgeAttribute($color);
} }
/** /**
@ -115,7 +115,7 @@ class Brick extends TextureBase
*/ */
public function setMortartex($color) public function setMortartex($color)
{ {
$this->mortartex = Scene::testAbnormal($color);
$this->mortartex = $this->judgeAttribute($color);
} }
} }

4
src/scene/texture/procedural/Checkerboard2d.php

@ -47,7 +47,7 @@ class Checkerboard2d extends TextureBase
*/ */
public function setTexture1($color) public function setTexture1($color)
{ {
$this->texture1 = Scene::testAbnormal($color);
$this->texture1 = $this->judgeAttribute($color);
} }
/** /**
@ -55,7 +55,7 @@ class Checkerboard2d extends TextureBase
*/ */
public function setTexture2($color) public function setTexture2($color)
{ {
$this->texture2 = Scene::testAbnormal($color);
$this->texture2 = $this->judgeAttribute($color);
} }
} }

4
src/scene/texture/procedural/Checkerboard3d.php

@ -47,7 +47,7 @@ class Checkerboard3d extends TextureBase
*/ */
public function setTexture1($color) public function setTexture1($color)
{ {
$this->texture1 = Scene::testAbnormal($color);
$this->texture1 = $this->judgeAttribute($color);
} }
/** /**
@ -55,7 +55,7 @@ class Checkerboard3d extends TextureBase
*/ */
public function setTexture2($color) public function setTexture2($color)
{ {
$this->texture2 = Scene::testAbnormal($color);
$this->texture2 = $this->judgeAttribute($color);
} }
} }

2
src/scene/texture/procedural/Fresnelcolor.php

@ -34,7 +34,7 @@ class Fresnelcolor extends TextureBase
*/ */
public function setRefraction($color) public function setRefraction($color)
{ {
$this->kr = Scene::testAbnormal($color);
$this->kr = $this->judgeAttribute($color);
} }
} }

4
src/scene/texture/procedural/Fresnelconst.php

@ -39,7 +39,7 @@ class Fresnelconst extends TextureBase
*/ */
public function setRefractionN($color) public function setRefractionN($color)
{ {
$this->n = Scene::testAbnormal($color);
$this->n = $this->judgeAttribute($color);
} }
/** /**
@ -47,7 +47,7 @@ class Fresnelconst extends TextureBase
*/ */
public function setRefractionK($color) public function setRefractionK($color)
{ {
$this->k = Scene::testAbnormal($color);
$this->k = $this->judgeAttribute($color);
} }
} }

2
src/scene/texture/procedural/Random.php

@ -38,7 +38,7 @@ class Random extends TextureBase
*/ */
public function setTexture1($color) public function setTexture1($color)
{ {
$this->texture1 = Scene::testAbnormal($color);
$this->texture1 = $this->judgeAttribute($color);
} }
} }

6
src/scene/texture/tint/BrightContrast.php

@ -45,7 +45,7 @@ class BrightContrast extends TextureBase
*/ */
public function setTexture($color) public function setTexture($color)
{ {
$this->texture = Scene::testAbnormal($color);
$this->texture = $this->judgeAttribute($color);
} }
/** /**
@ -53,7 +53,7 @@ class BrightContrast extends TextureBase
*/ */
public function setBrightness($color) public function setBrightness($color)
{ {
$this->brightness = Scene::testAbnormal($color);
$this->brightness = $this->judgeAttribute($color);
} }
/** /**
@ -61,7 +61,7 @@ class BrightContrast extends TextureBase
*/ */
public function setContrast($color) public function setContrast($color)
{ {
$this->contrast = Scene::testAbnormal($color);
$this->contrast = $this->judgeAttribute($color);
} }
} }

8
src/scene/texture/tint/Hsv.php

@ -50,7 +50,7 @@ class Hsv extends TextureBase
*/ */
public function setTexture($color) public function setTexture($color)
{ {
$this->texture = Scene::testAbnormal($color);
$this->texture = $this->judgeAttribute($color);
} }
/** /**
@ -58,7 +58,7 @@ class Hsv extends TextureBase
*/ */
public function setHue($color) public function setHue($color)
{ {
$this->hue = Scene::testAbnormal($color);
$this->hue = $this->judgeAttribute($color);
} }
/** /**
@ -66,7 +66,7 @@ class Hsv extends TextureBase
*/ */
public function setSaturation($color) public function setSaturation($color)
{ {
$this->saturation = Scene::testAbnormal($color);
$this->saturation = $this->judgeAttribute($color);
} }
/** /**
@ -74,7 +74,7 @@ class Hsv extends TextureBase
*/ */
public function setBrightness($color) public function setBrightness($color)
{ {
$this->value = Scene::testAbnormal($color);
$this->value = $this->judgeAttribute($color);
} }
} }

4
src/scene/texture/tint/Subtract.php

@ -40,7 +40,7 @@ class Subtract extends TextureBase
*/ */
public function setBrightness($color) public function setBrightness($color)
{ {
$this->texture1 = Scene::testAbnormal($color);
$this->texture1 = $this->judgeAttribute($color);
} }
/** /**
@ -48,7 +48,7 @@ class Subtract extends TextureBase
*/ */
public function setSource($color) public function setSource($color)
{ {
$this->texture2 = Scene::testAbnormal($color);
$this->texture2 = $this->judgeAttribute($color);
} }
} }

4
src/scene/volumes/HeteroGeneous.php

@ -49,7 +49,7 @@ class HomoGeneous extends VolumesBase
*/ */
public function setAsymmetry($color) public function setAsymmetry($color)
{ {
$this->asymmetry = Scene::testAbnormal($color);
$this->asymmetry = $this->judgeAttribute($color);
} }
/** /**
@ -57,7 +57,7 @@ class HomoGeneous extends VolumesBase
*/ */
public function setScattering($color) public function setScattering($color)
{ {
$this->scattering = Scene::testAbnormal($color);
$this->scattering = $this->judgeAttribute($color);
} }
} }

4
src/scene/volumes/HomoGeneous.php

@ -39,7 +39,7 @@ class HomoGeneous extends VolumesBase
*/ */
public function setAsymmetry($color) public function setAsymmetry($color)
{ {
$this->asymmetry = Scene::testAbnormal($color);
$this->asymmetry = $this->judgeAttribute($color);
} }
/** /**
@ -47,7 +47,7 @@ class HomoGeneous extends VolumesBase
*/ */
public function setScattering($color) public function setScattering($color)
{ {
$this->scattering = Scene::testAbnormal($color);
$this->scattering = $this->judgeAttribute($color);
} }
} }

32
src/scene/volumes/VolumesBase.php

@ -62,7 +62,7 @@ class VolumesBase extends BaseCfg
*/ */
public function setEmission($color,$emissionId = 0) public function setEmission($color,$emissionId = 0)
{ {
$this->emission = Scene::testAbnormal($color);
$this->emission = $this->judgeAttribute($color);
$this->emissionId = $emissionId; $this->emissionId = $emissionId;
} }
@ -71,7 +71,7 @@ class VolumesBase extends BaseCfg
*/ */
public function setAbsorption($color) public function setAbsorption($color)
{ {
$this->absorption = Scene::testAbnormal($color);
$this->absorption = $this->judgeAttribute($color);
} }
/** /**
@ -79,8 +79,32 @@ class VolumesBase extends BaseCfg
*/ */
public function setIor($color) public function setIor($color)
{ {
$this->ior = Scene::testAbnormal($color);
}
$this->ior = $this->judgeAttribute($color);
}
/**
* @param object $value 接收的是一个 由自身set函数 所接收到的值,本函数可以被这些类set函数调用,
* 并判断set函数接收到值是否合法,合法则返回$value,否则抛出一个异常
*/
protected static function judgeAttribute($value)
{
if( is_object($value) )
{
if( $value->registerId != null )
{
return $value->registerId;
}
else
{
throw new \Exception("You use an unregistered ".$value->getInstanceClassName()." object for the current property");
}
}
else
{
return $value;
}
}
} }
?> ?>
Loading…
Cancel
Save