I want to create a while loop to Translate some entities which have intersections with each other. But the Entity.Intersects()
method is protected. Is there any other solution to find intersections with Eyeshot methods?
My entities are Region
in XY-Plane.
(I also tried UtilityEx.DoOverlap(Mesh, Mesh)
by converting my regions to mesh, and it didn't work, since I can see the overlapping area of my entities in my Eyeshot Model.)
public static void MoveIntersectedEntity(List<Mesh> mainList, ref Mesh movingMesh, bool moveUp = false)
{
for (int i = 0; i < mainList.Count; i++)
{
while (UtilityEx.DoOverlap(mainList[i],movingMesh))
{
if (moveUp)
movingMesh.Translate(0,2,0);
else
movingMesh.Translate(0,-2,0);
}
}
}