fastdev.geom.warp_meshes¶
Module Contents¶
- class fastdev.geom.warp_meshes.WarpMeshes(warp_meshes: List[warp.Mesh], warp_meshes_first_idx: jaxtyping.Int[torch.Tensor, num_scenes])[source]¶
A lightweight wrapper for batched warp meshes.
- Parameters:
warp_meshes (List[warp.Mesh])
warp_meshes_first_idx (jaxtyping.Int[torch.Tensor, num_scenes])
- static from_files(filenames: List[str], filenames_first_idx: jaxtyping.Int[torch.Tensor, num_scenes], device: Device = 'cpu')[source]¶
- Parameters:
filenames (List[str])
filenames_first_idx (jaxtyping.Int[torch.Tensor, num_scenes])
device (Device)
- static from_trimesh_meshes(meshes: List[trimesh.Trimesh], meshes_first_idx: jaxtyping.Int[torch.Tensor, num_scenes], device: Device = 'cpu') WarpMeshes [source]¶
- Parameters:
meshes (List[trimesh.Trimesh])
meshes_first_idx (jaxtyping.Int[torch.Tensor, num_scenes])
device (Device)
- Return type:
- query_signed_distances(query_points: jaxtyping.Float[torch.Tensor, num_points 3], query_points_first_idx: jaxtyping.Int[torch.Tensor, num_scenes], mesh_poses: Optional[jaxtyping.Float[torch.Tensor, num_meshes 4 4]] = None, mesh_scales: Optional[jaxtyping.Float[torch.Tensor, num_meshes]] = None, max_dist: float = 1000000.0) Tuple[jaxtyping.Float[torch.Tensor, num_points], jaxtyping.Float[torch.Tensor, num_points 3], jaxtyping.Float[torch.Tensor, num_points 3]] [source]¶
Query signed distances.
- Returns:
differentiable signed distances (num_points). torch.Tensor: normals (num_points, 3). torch.Tensor: closest points (num_points, 3).
- Return type:
torch.Tensor
- Parameters:
query_points (jaxtyping.Float[torch.Tensor, num_points 3])
query_points_first_idx (jaxtyping.Int[torch.Tensor, num_scenes])
mesh_poses (Optional[jaxtyping.Float[torch.Tensor, num_meshes 4 4]])
mesh_scales (Optional[jaxtyping.Float[torch.Tensor, num_meshes]])
max_dist (float)