HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nanovdb::build::Grid< BuildT > Struct Template Reference

#include <GridBuilder.h>

+ Inheritance diagram for nanovdb::build::Grid< BuildT >:

Public Types

using BuildType = BuildT
 
using ValueType = typename BuildToValueMap< BuildT >::type
 
using TreeType = Tree< BuildT >
 
using Node0 = build::LeafNode< BuildT >
 
using Node1 = build::InternalNode< Node0 >
 
using Node2 = build::InternalNode< Node1 >
 
using RootNodeType = build::RootNode< Node2 >
 
- Public Types inherited from nanovdb::build::Tree< BuildT >
using ValueType = typename BuildToValueMap< BuildT >::type
 
using Node0 = build::LeafNode< BuildT >
 
using Node1 = build::InternalNode< Node0 >
 
using Node2 = build::InternalNode< Node1 >
 
using RootNodeType = build::RootNode< Node2 >
 
using LeafNodeType = typename RootNodeType::LeafNodeType
 

Public Member Functions

 Grid (const ValueType &background, const std::string &name="", GridClass gClass=GridClass::Unknown)
 
TreeTypetree ()
 
const GridTypegridType () const
 
const GridClassgridClass () const
 
const Mapmap () const
 
void setTransform (double scale=1.0, const Vec3d &translation=Vec3d(0.0))
 
const std::stringgridName () const
 
const std::stringgetName () const
 
void setName (const std::string &name)
 
template<typename Func >
void operator() (const Func &func, const CoordBBox &bbox, ValueType delta=ValueType(0))
 Sets grids values in domain of the bbox to those returned by the specified func with the expected signature [](const Coord&)->ValueType. More...
 
- Public Member Functions inherited from nanovdb::build::Tree< BuildT >
 Tree (const ValueType &background)
 
 Tree (const Tree &)=delete
 
 Tree (Tree &&)=delete
 
Treetree ()
 
RootNodeTyperoot ()
 
ValueType getValue (const Coord &ijk) const
 
ValueType getValue (int i, int j, int k) const
 
void setValue (const Coord &ijk, const ValueType &value)
 
std::array< size_t, 3 > nodeCount () const
 
ValueAccessor< BuildT > getAccessor ()
 regular accessor for thread-safe reading and non-thread-safe writing More...
 
WriteAccessor getWriteAccessor ()
 special accessor for thread-safe writing only More...
 

Public Attributes

GridClass mGridClass
 
GridType mGridType
 
Map mMap
 
std::string mName
 
- Public Attributes inherited from nanovdb::build::Tree< BuildT >
RootNodeType mRoot
 
std::mutex mMutex
 

Detailed Description

template<typename BuildT>
struct nanovdb::build::Grid< BuildT >

Definition at line 1883 of file GridBuilder.h.

Member Typedef Documentation

template<typename BuildT >
using nanovdb::build::Grid< BuildT >::BuildType = BuildT

Definition at line 1885 of file GridBuilder.h.

template<typename BuildT >
using nanovdb::build::Grid< BuildT >::Node0 = build::LeafNode<BuildT>

Definition at line 1888 of file GridBuilder.h.

template<typename BuildT >
using nanovdb::build::Grid< BuildT >::Node1 = build::InternalNode<Node0>

Definition at line 1889 of file GridBuilder.h.

template<typename BuildT >
using nanovdb::build::Grid< BuildT >::Node2 = build::InternalNode<Node1>

Definition at line 1890 of file GridBuilder.h.

template<typename BuildT >
using nanovdb::build::Grid< BuildT >::RootNodeType = build::RootNode<Node2>

Definition at line 1891 of file GridBuilder.h.

template<typename BuildT >
using nanovdb::build::Grid< BuildT >::TreeType = Tree<BuildT>

Definition at line 1887 of file GridBuilder.h.

template<typename BuildT >
using nanovdb::build::Grid< BuildT >::ValueType = typename BuildToValueMap<BuildT>::type

Definition at line 1886 of file GridBuilder.h.

Constructor & Destructor Documentation

template<typename BuildT >
nanovdb::build::Grid< BuildT >::Grid ( const ValueType background,
const std::string name = "",
GridClass  gClass = GridClass::Unknown 
)
inline

Definition at line 1898 of file GridBuilder.h.

Member Function Documentation

template<typename BuildT >
const std::string& nanovdb::build::Grid< BuildT >::getName ( ) const
inline

Definition at line 1912 of file GridBuilder.h.

template<typename BuildT >
const GridClass& nanovdb::build::Grid< BuildT >::gridClass ( ) const
inline

Definition at line 1908 of file GridBuilder.h.

template<typename BuildT >
const std::string& nanovdb::build::Grid< BuildT >::gridName ( ) const
inline

Definition at line 1911 of file GridBuilder.h.

template<typename BuildT >
const GridType& nanovdb::build::Grid< BuildT >::gridType ( ) const
inline

Definition at line 1907 of file GridBuilder.h.

template<typename BuildT >
const Map& nanovdb::build::Grid< BuildT >::map ( ) const
inline

Definition at line 1909 of file GridBuilder.h.

template<typename BuildT >
template<typename Func >
void nanovdb::build::Grid< BuildT >::operator() ( const Func &  func,
const CoordBBox bbox,
ValueType  delta = ValueType(0) 
)

Sets grids values in domain of the bbox to those returned by the specified func with the expected signature [](const Coord&)->ValueType.

Note
If func returns a value equal to the background value of the input grid at a specific voxel coordinate, then the active state of that coordinate is off! Else the value value is set and the active state is on. This is done to allow for sparse grids to be generated.
Parameters
funcFunctor used to evaluate the grid values in the bbox
bboxCoordinate bounding-box over which the grid values will be set.
deltaSpecifies a lower threshold value for rendering (optional). Typically equals the voxel size for level sets and otherwise it's zero.

Definition at line 1931 of file GridBuilder.h.

template<typename BuildT >
void nanovdb::build::Grid< BuildT >::setName ( const std::string name)
inline

Definition at line 1913 of file GridBuilder.h.

template<typename BuildT >
void nanovdb::build::Grid< BuildT >::setTransform ( double  scale = 1.0,
const Vec3d translation = Vec3d(0.0) 
)
inline

Definition at line 1910 of file GridBuilder.h.

template<typename BuildT >
TreeType& nanovdb::build::Grid< BuildT >::tree ( )
inline

Definition at line 1906 of file GridBuilder.h.

Member Data Documentation

template<typename BuildT >
GridClass nanovdb::build::Grid< BuildT >::mGridClass

Definition at line 1893 of file GridBuilder.h.

template<typename BuildT >
GridType nanovdb::build::Grid< BuildT >::mGridType

Definition at line 1894 of file GridBuilder.h.

template<typename BuildT >
Map nanovdb::build::Grid< BuildT >::mMap

Definition at line 1895 of file GridBuilder.h.

template<typename BuildT >
std::string nanovdb::build::Grid< BuildT >::mName

Definition at line 1896 of file GridBuilder.h.


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