igl.embree¶
Python API reference for igl.embree.
ambient_occlusion¶
ambient_occlusion(V: float64[m, n], F: int64[m, n], P: float64[m, n], N: float64[m, n], num_samples: int) -> float64[m]
Compute ambient occlusion per given point
Parameters
V— #V by 3 list of mesh vertex positiosnF— #F by 3 list of mesh triangle indices into rows of VP— #P by 3 list of origin pointsN— #P by 3 list of origin normalsS— #P list of ambient occlusion values between 1 (fully occluded) and 0 (not occluded)
ambient_occlusion(ei: EmbreeIntersector, P: float64[m, n], N: float64[m, n], num_samples: int) -> float64[m]
Compute ambient occlusion per given point
Parameters
ei— EmbreeIntersector containing (V,F)P— #P by 3 list of origin pointsN— #P by 3 list of origin normalsS— #P list of ambient occlusion values between 1 (fully occluded) and 0 (not occluded)
reorient_facets_raycast¶
reorient_facets_raycast(V: float64[m, n], F: int64[m, n], rays_total: int = -1, rays_minimum: int = 10, facet_wise: bool = False, use_parity: bool = False, is_verbose: bool = False) -> tuple[bool[m], int64[m]]
Orient each component (identified by C) of a mesh (V,F) using ambient occlusion such that the front side is less occluded than back side, as described in “A Simple Method for Correcting Facet Orientations in Polygon Meshes Based on Ray Casting” [Takayama et al. 2014].
Parameters
V— #V by 3 list of vertex positionsF— #F by 3 list of triangle indicesrays_total— Total number of rays that will be shotrays_minimum— Minimum number of rays that each patch should receivefacet_wise— Decision made for each face independently, no use of patches (i.e., each face is treated as a patch)use_parity— Use parity modeis_verbose— Verbose output to coutI— #F list of whether face has been flippedC— #F list of patch ID (output of bfs_orient > manifold patches)
shape_diameter_function¶
shape_diameter_function(V: float64[m, n], F: int64[m, n], P: float64[m, n], N: float64[m, n], num_samples: int) -> float64[m]
Compute shape diameter function per given point
Parameters
V— #V by 3 list of mesh vertex positiosnF— #F by 3 list of mesh triangle indices into rows of VP— #P by 3 list of origin pointsN— #P by 3 list of origin normalsS— #P list of ambient occlusion values between 1 (fully occluded) and 0 (not occluded)
shape_diameter_function(ei: EmbreeIntersector, P: float64[m, n], N: float64[m, n], num_samples: int) -> float64[m]
Compute shape diameter function per given point
Parameters
ei— EmbreeIntersector containing (V,F)P— #P by 3 list of origin pointsN— #P by 3 list of origin normalsS— #P list of ambient occlusion values between 1 (fully occluded) and 0 (not occluded)
EmbreeIntersector¶
EmbreeIntersector.init¶
init(V: float32[m, 3], F: int32[m, 3], isStatic: bool = False) -> None
EmbreeIntersector.intersectRay_first¶
intersectRay_first(origin: float32[3], direction: float32[3], tnear: float = 0, tfar: float = float('inf')) -> tuple[int, float, float, float]
EmbreeIntersector.intersectRay¶
intersectRay(origin: float32[3], direction: float32[3], tnear: float = 0, tfar: float = float('inf')) -> tuple[list[tuple[int, float, float, float]], int]