Commit 9fe18bfc authored by Quentin Khan's avatar Quentin Khan

Uniform tree: add level to FBasicCell

parent 3d944a02
......@@ -35,8 +35,9 @@
*
*/
class FBasicCell : public FAbstractSerializable {
MortonIndex mortonIndex; //< Morton index (need by most elements)
FTreeCoordinate coordinate; //< The position
MortonIndex mortonIndex; ///< Morton index (need by most elements)
FTreeCoordinate coordinate; ///< The position
std::size_t level; ///< Level in tree
public:
/** Default constructor */
......@@ -45,7 +46,15 @@ public:
/** Default destructor */
virtual ~FBasicCell(){
}
}
std::size_t getLevel() const {
return this->level;
}
void setLevel(std::size_t inLevel) {
this->level = inLevel;
}
/** To get the morton index */
MortonIndex getMortonIndex() const {
......
......@@ -101,6 +101,8 @@ protected:
treePosition.getY() >> bottomToTop,
treePosition.getZ() >> bottomToTop);
newNode->setLevel(this->subOctreePosition + indexLevel);
this->cells[indexLevel][arrayIndex] = newNode;
--indexLevel;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment