mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: support construction of pointIndexHit from pointHit
STYLE: combine templated/non-templated headers (reduced clutter) STYLE: use hitPoint(const point&) combined setter - same as setHit() + setPoint(const point&) ENH: expose and use labelOctBits::pack method for addressing
This commit is contained in:
@ -365,7 +365,7 @@ Foam::volumeType Foam::dynamicIndexedOctree<Type>::calcVolumeType
|
||||
}
|
||||
|
||||
// Store octant type
|
||||
nodeTypes_.set((nodeI<<3)+octant, subType);
|
||||
nodeTypes_.set(labelBits::pack(nodeI, octant), subType);
|
||||
|
||||
// Combine sub node types into type for treeNode. Result is 'mixed' if
|
||||
// types differ among subnodes.
|
||||
@ -393,7 +393,11 @@ Foam::volumeType Foam::dynamicIndexedOctree<Type>::getVolumeType
|
||||
|
||||
direction octant = nod.bb_.subOctant(sample);
|
||||
|
||||
volumeType octantType = volumeType::type(nodeTypes_.get((nodeI<<3)+octant));
|
||||
volumeType octantType =
|
||||
volumeType::type
|
||||
(
|
||||
nodeTypes_.get(labelBits::pack(nodeI, octant))
|
||||
);
|
||||
|
||||
if (octantType == volumeType::INSIDE)
|
||||
{
|
||||
@ -1418,9 +1422,8 @@ void Foam::dynamicIndexedOctree<Type>::traverseNode
|
||||
{
|
||||
// Hit so pt is nearer than nearestPoint.
|
||||
// Update hit info
|
||||
hitInfo.setHit();
|
||||
hitInfo.hitPoint(pt);
|
||||
hitInfo.setIndex(shapeI);
|
||||
hitInfo.setPoint(pt);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -1456,9 +1459,8 @@ void Foam::dynamicIndexedOctree<Type>::traverseNode
|
||||
// Hit so pt is nearer than nearestPoint.
|
||||
nearestPoint = pt;
|
||||
// Update hit info
|
||||
hitInfo.setHit();
|
||||
hitInfo.hitPoint(pt);
|
||||
hitInfo.setIndex(shapeI);
|
||||
hitInfo.setPoint(pt);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user