MeshLib
 
Loading...
Searching...
No Matches
MRAABBTreeMaker.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRAABBTreeNode.h"
4#include "MRVector.h"
5
6namespace MR
7{
8
11
12template<typename T>
14{
15 typename T::LeafId leafId;
16 typename T::BoxT box;
17
18 BoxedLeaf() noexcept = default;
19 explicit BoxedLeaf( NoInit ) noexcept : leafId( noInit ), box( noInit ) { }
20};
21
23inline int getNumNodes( int numLeaves )
24{
25 assert( numLeaves > 0 );
26 return 2 * numLeaves - 1;
27}
28
29template<typename T>
31
33
34} // namespace MR
std::vector<V>-like container that is 1) resized without initialization of its elements,...
Definition MRBuffer.h:54
std::vector<T>-like container that requires specific indexing type,
Definition MRMesh/MRVector.h:19
AABBTreeNodeVec< T > makeAABBTreeNodeVec(Buffer< BoxedLeaf< T > > boxedLeaves)
int getNumNodes(int numLeaves)
returns the number of nodes in the binary tree with given number of leaves
Definition MRAABBTreeMaker.h:23
Definition MRCameraOrientationPlugin.h:7
constexpr NoInit noInit
Definition MRMesh/MRMeshFwd.h:57
Definition MRAABBTreeMaker.h:14
BoxedLeaf() noexcept=default
T::BoxT box
Definition MRAABBTreeMaker.h:16
T::LeafId leafId
Definition MRAABBTreeMaker.h:15
Definition MRMesh/MRMeshFwd.h:56