WPF 3D :check if a cube can completely contain another cube -


i working on drop & drop in 3d. have created 3d spaces (rooms) walls (cubes) act place holders objects (assume smaller cubes) being dropped.

how go figuring out :

if user drops object @ edges of room room contain object?

meaning, not want objects partially in room , partially outside. ideally cancel drop operation / move point room safely contains object.

i have bounds of room & object (modelvisual3d.content.bounds) , point @ object dropped.

i thinking have math figure out if object placed @ point within bounding room.

ideas/thoughts/pointer appreciated.

to make drag , dropping in 3d easier might implement (optional) snapping system.

to check whether or not box contains box check corners of box. test each corner see if on 'inside' (or outside) of faces of other box. if corners inside, box inside.

this work boxes, not axis aligned boxes.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -