SPH
Functions
Morton.cpp File Reference
#include "math/Morton.h"
#include "objects/geometry/Box.h"

Go to the source code of this file.

Functions

NAMESPACE_SPH_BEGIN Size expandBits (Size v)
 
Size morton (const Vector &v)
 Calculates a 30-bit Morton code for the given vector located within the unit cube [0,1]. More...
 
Size morton (const Vector &v, const Box &box)
 Calculates the Morton code for a vector in specified box. More...
 

Function Documentation

◆ expandBits()

NAMESPACE_SPH_BEGIN Size expandBits ( Size  v)
inline

Definition at line 7 of file Morton.cpp.

◆ morton() [1/2]

Size morton ( const Vector v)

Calculates a 30-bit Morton code for the given vector located within the unit cube [0,1].

Input vector must be inside [0,1] cube, checked by assert.

Definition at line 15 of file Morton.cpp.

◆ morton() [2/2]

Size morton ( const Vector v,
const Box box 
)

Calculates the Morton code for a vector in specified box.

Definition at line 29 of file Morton.cpp.