Loading src/mesh/vdb/TODO +1 −1 Original line number Diff line number Diff line echo echo echo "Add integration to tnl library -- that means: templates for" echo "Real, Index and Device types. Add Values class to store " echo "Device types. Add updateTree method. Add Values class to store " echo "interpoled values in each node. Compare speed with original" echo "VDB. Implement on CUDA. Implement 3D version (should be trivial)." echo src/mesh/vdb/tnlBitmaskArray.h +2 −2 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ #include "tnlBitmask.h" template< unsigned size > template< unsigned Size > class tnlBitmaskArray { public: Loading @@ -19,7 +19,7 @@ public: ~tnlBitmaskArray(); private: tnlBitmask* bitmaskArray[ size ]; tnlBitmask* bitmaskArray[ Size ]; unsigned length; }; Loading src/mesh/vdb/tnlBitmaskArray_impl.h +13 −13 Original line number Diff line number Diff line Loading @@ -5,35 +5,35 @@ #include "tnlBitmask.h" #include "tnlBitmaskArray.h" template< unsigned size > tnlBitmaskArray< size >::tnlBitmaskArray() template< unsigned Size > tnlBitmaskArray< Size >::tnlBitmaskArray() { this->length = size; this->length = Size; } template< unsigned size > unsigned tnlBitmaskArray< size >::getSize() template< unsigned Size > unsigned tnlBitmaskArray< Size >::getSize() { return this->length; } template< unsigned size > void tnlBitmaskArray< size >::setIthBitmask( unsigned i, template< unsigned Size > void tnlBitmaskArray< Size >::setIthBitmask( unsigned i, tnlBitmask bitmask ) { assert( i < size ); assert( i < Size ); this->bitmaskArray[ i ] = new tnlBitmask( bitmask ); } template< unsigned size > tnlBitmask* tnlBitmaskArray< size >::getIthBitmask( unsigned i ) template< unsigned Size > tnlBitmask* tnlBitmaskArray< Size >::getIthBitmask( unsigned i ) { assert( i < size ); assert( i < Size ); return this->bitmaskArray[ i ]; } template< unsigned size > tnlBitmaskArray< size >::~tnlBitmaskArray() template< unsigned Size > tnlBitmaskArray< Size >::~tnlBitmaskArray() { for( int i = 0; i < this->length; i++ ) delete this->bitmaskArray[ i ]; Loading src/mesh/vdb/tnlNode_impl.h +2 −2 Original line number Diff line number Diff line Loading @@ -39,8 +39,8 @@ void tnlNode< Real, Index, LogX, LogY >::setNode( Index splitX, tnlBitmaskArray< LogX * LogY >* bitmaskArray ) { Index depthX = splitX * tnlVDBMath::power( LogX, this->level - 1 ); Index depthY = splitY * tnlVDBMath::power( LogY, this->level - 1 ); Index depthX = splitX * tnlVDBMath< Index >::power( LogX, this->level - 1 ); Index depthY = splitY * tnlVDBMath< Index >::power( LogY, this->level - 1 ); Real stepX = ( Real ) this->area->getLengthX() / depthX; Real stepY = ( Real ) this->area->getLengthY() / depthY; Real startX = this->X * stepX; Loading src/mesh/vdb/tnlRootNode.h +3 −3 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ template< typename Real, typename Index, unsigned size, unsigned Size, Index LogX, Index LogY = LogX > class tnlRootNode : public tnlNode< Real, Index, LogX, LogY > Loading @@ -28,8 +28,8 @@ public: private: unsigned nodesX; unsigned nodesY; tnlBitmaskArray< size >* bitmaskArray; tnlNode< Real, Index, LogX, LogY >* children[ size ]; tnlBitmaskArray< Size >* bitmaskArray; tnlNode< Real, Index, LogX, LogY >* children[ Size ]; unsigned depth; }; Loading Loading
src/mesh/vdb/TODO +1 −1 Original line number Diff line number Diff line echo echo echo "Add integration to tnl library -- that means: templates for" echo "Real, Index and Device types. Add Values class to store " echo "Device types. Add updateTree method. Add Values class to store " echo "interpoled values in each node. Compare speed with original" echo "VDB. Implement on CUDA. Implement 3D version (should be trivial)." echo
src/mesh/vdb/tnlBitmaskArray.h +2 −2 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ #include "tnlBitmask.h" template< unsigned size > template< unsigned Size > class tnlBitmaskArray { public: Loading @@ -19,7 +19,7 @@ public: ~tnlBitmaskArray(); private: tnlBitmask* bitmaskArray[ size ]; tnlBitmask* bitmaskArray[ Size ]; unsigned length; }; Loading
src/mesh/vdb/tnlBitmaskArray_impl.h +13 −13 Original line number Diff line number Diff line Loading @@ -5,35 +5,35 @@ #include "tnlBitmask.h" #include "tnlBitmaskArray.h" template< unsigned size > tnlBitmaskArray< size >::tnlBitmaskArray() template< unsigned Size > tnlBitmaskArray< Size >::tnlBitmaskArray() { this->length = size; this->length = Size; } template< unsigned size > unsigned tnlBitmaskArray< size >::getSize() template< unsigned Size > unsigned tnlBitmaskArray< Size >::getSize() { return this->length; } template< unsigned size > void tnlBitmaskArray< size >::setIthBitmask( unsigned i, template< unsigned Size > void tnlBitmaskArray< Size >::setIthBitmask( unsigned i, tnlBitmask bitmask ) { assert( i < size ); assert( i < Size ); this->bitmaskArray[ i ] = new tnlBitmask( bitmask ); } template< unsigned size > tnlBitmask* tnlBitmaskArray< size >::getIthBitmask( unsigned i ) template< unsigned Size > tnlBitmask* tnlBitmaskArray< Size >::getIthBitmask( unsigned i ) { assert( i < size ); assert( i < Size ); return this->bitmaskArray[ i ]; } template< unsigned size > tnlBitmaskArray< size >::~tnlBitmaskArray() template< unsigned Size > tnlBitmaskArray< Size >::~tnlBitmaskArray() { for( int i = 0; i < this->length; i++ ) delete this->bitmaskArray[ i ]; Loading
src/mesh/vdb/tnlNode_impl.h +2 −2 Original line number Diff line number Diff line Loading @@ -39,8 +39,8 @@ void tnlNode< Real, Index, LogX, LogY >::setNode( Index splitX, tnlBitmaskArray< LogX * LogY >* bitmaskArray ) { Index depthX = splitX * tnlVDBMath::power( LogX, this->level - 1 ); Index depthY = splitY * tnlVDBMath::power( LogY, this->level - 1 ); Index depthX = splitX * tnlVDBMath< Index >::power( LogX, this->level - 1 ); Index depthY = splitY * tnlVDBMath< Index >::power( LogY, this->level - 1 ); Real stepX = ( Real ) this->area->getLengthX() / depthX; Real stepY = ( Real ) this->area->getLengthY() / depthY; Real startX = this->X * stepX; Loading
src/mesh/vdb/tnlRootNode.h +3 −3 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ template< typename Real, typename Index, unsigned size, unsigned Size, Index LogX, Index LogY = LogX > class tnlRootNode : public tnlNode< Real, Index, LogX, LogY > Loading @@ -28,8 +28,8 @@ public: private: unsigned nodesX; unsigned nodesY; tnlBitmaskArray< size >* bitmaskArray; tnlNode< Real, Index, LogX, LogY >* children[ size ]; tnlBitmaskArray< Size >* bitmaskArray; tnlNode< Real, Index, LogX, LogY >* children[ Size ]; unsigned depth; }; Loading