xopto.mcvox.mcsurface.lambertian module¶
- class LambertianReflector(reflectance: float = 1.0, specular: float = 0.0)[source]¶
Bases:
xopto.mcvox.mcsurface.base.SurfaceLayoutAny
Base class of Lambertian reflectors.
- Parameters
reflectance (float) – Total reflectance of the surface. Use a value between 0 and 1.
specular (float) – Fraction of specular reflections at the surface. Use a value of 0 for an ideal Lambertian reflector or a value of 1.0 for an ideal mirror (with the given reflectance). Any value between 0 and 1 will result in surface that is a combination of a Lambertian and specular reflector.
- cl_declaration(mc: xopto.mcbase.mcobject.McObject) → str[source]¶
Structure that defines the reflector in the Monte Carlo simulator.
- cl_implementation(mc: xopto.mcbase.mcobject.McObject) → str[source]¶
Implementation of the reflector in the Monte Carlo simulator.
- cl_pack(mc: xopto.mcbase.mcobject.McObject, target: Optional[xopto.cl.cltypes.Structure] = None) → xopto.cl.cltypes.Structure[source]¶
Fills the structure (target) with the data required by the Monte Carlo simulator. See the
LambertianReflector.cl_type()
for a detailed list of fields.- Parameters
mc (mcobject.McObject) – Monte Carlo simulator instance.
target (cltypes.Structure) – Structure that is filled with the source data.
- Returns
target – Filled ctypes structure received as an input argument or a new instance if the input argument target is None.
- Return type
- static cl_type(mc: xopto.mcbase.mcobject.McObject) → xopto.cl.cltypes.Structure[source]¶
- property reflectance: float¶
Surface reflectance of the Lambertian reflector
- property specular: float¶
Specular fraction of surface reflectance. A value of 0 indicate an ideal Lambertian reflector, and a value of 1 a perfect mirror.