mirror of
https://github.com/leozide/leocad.git
synced 2026-07-27 19:56:49 +00:00
Scan submodels when dragging a new piece into the model.
This commit is contained in:
+11
-3
@@ -475,10 +475,18 @@ void lcPiece::RayTest(lcObjectRayTest& ObjectRayTest) const
|
||||
ObjectRayTest.ObjectSection.Section = LC_PIECE_SECTION_POSITION;
|
||||
}
|
||||
}
|
||||
else if (mPieceInfo->MinIntersectDist(Start, End, ObjectRayTest.Distance))
|
||||
else
|
||||
{
|
||||
ObjectRayTest.ObjectSection.Object = const_cast<lcPiece*>(this);
|
||||
ObjectRayTest.ObjectSection.Section = LC_PIECE_SECTION_POSITION;
|
||||
const PieceInfo* HitPieceInfo = nullptr;
|
||||
lcMatrix44 HitTransform = lcMatrix44Identity();
|
||||
|
||||
if (mPieceInfo->MinIntersectDist(Start, End, ObjectRayTest.Distance, HitPieceInfo, HitTransform))
|
||||
{
|
||||
ObjectRayTest.ObjectSection.Object = const_cast<lcPiece*>(this);
|
||||
ObjectRayTest.ObjectSection.Section = LC_PIECE_SECTION_POSITION;
|
||||
ObjectRayTest.HitPieceInfo = HitPieceInfo;
|
||||
ObjectRayTest.HitTransform = lcMul(HitTransform, mModelWorld);
|
||||
}
|
||||
}
|
||||
|
||||
if (AreControlPointsVisible())
|
||||
|
||||
Reference in New Issue
Block a user