SGsortcollBB

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Surfaces
Introduced first in SolidGeometry 4.9, Creation date: 2020-01-20, Last change: 2025-09-14

returns a collision index list of all SG in the SG cell list

Description

This function returns if there is a collision between two bounding boxes of the solids in the cell list
The next step would be to check the collisions of all the faces by SGsortcollVLFLBB or
[~,~,~,~,~,~,bba]=VLDLBBofVLFL(VLA,FLA);
[~,~,~,~,~,~,bbb]=VLDLBBofVLFL(VLB,FLB);
CL=collofBBs(bba,bbb);



See Also: SGsortfitinBB , SGsortisinsideBB , SGsortcollVLFLBB , VLDLBBofVLFL , collofBBs

Example Illustration

 missing image of SGsortcollBB(BBL)

Syntax

[ELcoll,CIL,ss,SG]=SGsortcollBB(BBL)

Input Parameter

BBL: Bounding Box List or Solid Geometry cell list with n entries

Output Parameter

ELcoll: Collision pair list | It is an undirected graph
CIL: logical collision index list, size n
ss: bounding bo size list
SG: Solid Geometry list

Examples


A=SGbox; B=SGsphere(4); SGfigure; C={A,B}; SGsurfaces(C); SGsortcollBB(C)
BB=rounddiv(randminv(20,3,[1 10]),2) % Create 10 Bounding boxes
SGbox(BB,30,'randxy'); SG=ans % Create 10 Boxes in random distance
SGsortcollBB(SG) % Collision pair list
[a,b]=SGsortcollBB(SG)




Copyright 2020-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth

Last html export of this page out of FM database by TL: 2025-09-21