HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
openvdb::OPENVDB_VERSION_NAME::tools::mesh_to_volume_internal::VoxelizationData< TreeType > Struct Template Reference

TBB body object to voxelize a mesh of triangles and/or quads into a collection of VDB grids, namely a squared distance grid, a closest primitive grid and an intersecting voxels grid (masks the mesh intersecting voxels) More...

#include <MeshToVolume.h>

Public Types

using Ptr = std::unique_ptr< VoxelizationData >
 
using ValueType = typename TreeType::ValueType
 
using Int32TreeType = typename TreeType::template ValueConverter< Int32 >::Type
 
using UCharTreeType = typename TreeType::template ValueConverter< unsigned char >::Type
 
using FloatTreeAcc = tree::ValueAccessor< TreeType >
 
using Int32TreeAcc = tree::ValueAccessor< Int32TreeType >
 
using UCharTreeAcc = tree::ValueAccessor< UCharTreeType >
 

Public Member Functions

 VoxelizationData ()
 
unsigned char getNewPrimId ()
 

Public Attributes

TreeType distTree
 
FloatTreeAcc distAcc
 
Int32TreeType indexTree
 
Int32TreeAcc indexAcc
 
UCharTreeType primIdTree
 
UCharTreeAcc primIdAcc
 

Detailed Description

template<typename TreeType>
struct openvdb::OPENVDB_VERSION_NAME::tools::mesh_to_volume_internal::VoxelizationData< TreeType >

TBB body object to voxelize a mesh of triangles and/or quads into a collection of VDB grids, namely a squared distance grid, a closest primitive grid and an intersecting voxels grid (masks the mesh intersecting voxels)

Note
Only the leaf nodes that intersect the mesh are allocated, and only voxels in a narrow band (of two to three voxels in proximity to the mesh's surface) are activated. They are populated with distance values and primitive indices.

Definition at line 1898 of file MeshToVolume.h.

Member Typedef Documentation

Definition at line 1906 of file MeshToVolume.h.

template<typename TreeType >
using openvdb::OPENVDB_VERSION_NAME::tools::mesh_to_volume_internal::VoxelizationData< TreeType >::Int32TreeType = typename TreeType::template ValueConverter<Int32>::Type

Definition at line 1903 of file MeshToVolume.h.

template<typename TreeType >
using openvdb::OPENVDB_VERSION_NAME::tools::mesh_to_volume_internal::VoxelizationData< TreeType >::Ptr = std::unique_ptr<VoxelizationData>

Definition at line 1900 of file MeshToVolume.h.

template<typename TreeType >
using openvdb::OPENVDB_VERSION_NAME::tools::mesh_to_volume_internal::VoxelizationData< TreeType >::UCharTreeType = typename TreeType::template ValueConverter<unsigned char>::Type

Definition at line 1904 of file MeshToVolume.h.

template<typename TreeType >
using openvdb::OPENVDB_VERSION_NAME::tools::mesh_to_volume_internal::VoxelizationData< TreeType >::ValueType = typename TreeType::ValueType

Definition at line 1901 of file MeshToVolume.h.

Constructor & Destructor Documentation

Definition at line 1911 of file MeshToVolume.h.

Member Function Documentation

template<typename TreeType >
unsigned char openvdb::OPENVDB_VERSION_NAME::tools::mesh_to_volume_internal::VoxelizationData< TreeType >::getNewPrimId ( )
inline
Warning
Don't use parallel methods here! The primIdTree is used as a "scratch" pad to mark visits for a given polygon into voxels which it may contribute to. The tree is kept as lightweight as possible and is reset when a maximum count or size is reached. A previous bug here occurred due to the calling of tree methods with multi-threaded implementations, resulting in nested parallelization and re-use of the TLS from the initial task. This consequently resulted in non deterministic values of mPrimCount on the return of the initial task, and could potentially end up with a mPrimCount equal to that of the MaxPrimId. This is used as the background value of the scratch tree.
See Also
jira.aswf.io/browse/OVDB-117, PR #564
Todo:
Consider profiling this operator with tree.clear() and Investigate the chosen value of MaxPrimId

Definition at line 1931 of file MeshToVolume.h.

Member Data Documentation

Definition at line 1923 of file MeshToVolume.h.

template<typename TreeType >
TreeType openvdb::OPENVDB_VERSION_NAME::tools::mesh_to_volume_internal::VoxelizationData< TreeType >::distTree

Definition at line 1922 of file MeshToVolume.h.

Definition at line 1926 of file MeshToVolume.h.

Definition at line 1925 of file MeshToVolume.h.

Definition at line 1929 of file MeshToVolume.h.

Definition at line 1928 of file MeshToVolume.h.


The documentation for this struct was generated from the following file: