Skip to content

igl.embree

Python API reference for igl.embree.

ambient_occlusion

C++ reference

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 positiosn
  • F — #F by 3 list of mesh triangle indices into rows of V
  • P — #P by 3 list of origin points
  • N — #P by 3 list of origin normals
  • S — #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 points
  • N — #P by 3 list of origin normals
  • S — #P list of ambient occlusion values between 1 (fully occluded) and 0 (not occluded)

reorient_facets_raycast

C++ reference

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 positions
  • F — #F by 3 list of triangle indices
  • rays_total — Total number of rays that will be shot
  • rays_minimum — Minimum number of rays that each patch should receive
  • facet_wise — Decision made for each face independently, no use of patches (i.e., each face is treated as a patch)
  • use_parity — Use parity mode
  • is_verbose — Verbose output to cout
  • I — #F list of whether face has been flipped
  • C — #F list of patch ID (output of bfs_orient > manifold patches)

shape_diameter_function

C++ reference

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 positiosn
  • F — #F by 3 list of mesh triangle indices into rows of V
  • P — #P by 3 list of origin points
  • N — #P by 3 list of origin normals
  • S — #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 points
  • N — #P by 3 list of origin normals
  • S — #P list of ambient occlusion values between 1 (fully occluded) and 0 (not occluded)

EmbreeIntersector

C++ reference

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]