MAJ terminée. Nous sommes passés en version 14.6.2 . Pour consulter les "releases notes" associées c'est ici :

https://about.gitlab.com/releases/2022/01/11/security-release-gitlab-14-6-2-released/
https://about.gitlab.com/releases/2022/01/04/gitlab-14-6-1-released/

Commit 92260e0f authored by BRAMAS Berenger's avatar BRAMAS Berenger
Browse files

Add a function to get the leaf position from the tree coordinate

parent d40d4b4b
......@@ -53,6 +53,22 @@ struct FCoordinateComputer {
return host;
}
template <class FReal>
static inline FPoint<FReal> GetPositionFromCoordinate(const FPoint<FReal>& centerOfBox, const FReal boxWidth, const int treeHeight,
const FTreeCoordinate& pos) {
const FPoint<FReal> boxCorner(centerOfBox,-(boxWidth/2));
const FReal boxWidthAtLeafLevel(boxWidth/FReal(1<<(treeHeight-1)));
// box coordinate to host the particle
FPoint<FReal> host;
// position has to be relative to corner not center
host.setX( pos.getX()*boxWidthAtLeafLevel + boxCorner.getX() );
host.setY( pos.getY()*boxWidthAtLeafLevel + boxCorner.getY() );
host.setZ( pos.getZ()*boxWidthAtLeafLevel + boxCorner.getZ() );
return host;
}
};
......
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