MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / compute_signed_tet_volume

Method compute_signed_tet_volume

src/Attributes/VoxelVolumeAttribute.cpp:63–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63Float VoxelVolumeAttribute::compute_signed_tet_volume(Mesh& mesh, size_t voxel_idx) {
64 VectorI voxel = mesh.get_voxel(voxel_idx);
65 assert(voxel.size() == 4);
66
67 Vector3F v[4] = {
68 mesh.get_vertex(voxel[0]),
69 mesh.get_vertex(voxel[1]),
70 mesh.get_vertex(voxel[2]),
71 mesh.get_vertex(voxel[3])
72 };
73
74 return ::compute_signed_tet_volume(v[0], v[1], v[2], v[3]);
75}
76
77Float VoxelVolumeAttribute::compute_signed_hex_volume(Mesh& mesh, size_t voxel_idx) {
78 VectorI voxel = mesh.get_voxel(voxel_idx);

Callers

nothing calls this directly

Calls 4

get_voxelMethod · 0.80
sizeMethod · 0.45
get_vertexMethod · 0.45

Tested by

no test coverage detected