ashwin.sudhir Posted September 7, 2011 Share Posted September 7, 2011 Is there some way of doing an intersection test between two Shapes? All the intersection tests that I could find were only for Ray-Shape, AABB-Shape and Regular Frustum-Shape I am looking for something like bool engine.physics.Intersecting(Shape a, Shape b ) Even if that's not possible, is there some way to use a a non-regular frustum (an arbitrary plane bounded volume) for intersection testing? I cannot see how we can specify a non-regular frustum using the (projection, modelview) format. The goal is to implement drag selection and my understanding is that projecting a rectangle from 2D-projected space onto world-space will (potentially) create a non-regular frustum. Is there another approach to implementing drag selection? Thanks, Ashwin. Link to comment
manguste Posted September 15, 2011 Share Posted September 15, 2011 Is there some way of doing an intersection test between two Shapes? Function to check intersections between shapes is added to the wish list; it will be implemented in the near future. Even if that's not possible, is there some way to use a a non-regular frustum (an arbitrary plane bounded volume) for intersection testing? I cannot see how we can specify a non-regular frustum using the (projection, modelview) format. Why, with projection and modelview matrices you can set whatever non-regular frustum you need; it doesn't have to be symmetrical. Link to comment
ashwin.sudhir Posted September 19, 2011 Author Share Posted September 19, 2011 Thanks for the answer, manguste. I have tried to find a reference for a method to convert a set of 6 arbitrary planes to a frustum described using the (projection, transformation) format, but without luck. Can you point me to a book/resource that can help me do this? The closest I've got to this is to maybe transform a regular frustum using shear transformations, but even that did not give me the control I needed. As far as I can see, the math functions in Unigine (like frustum() )can only construct regular frusta. Thanks in advance, Ashwin. Link to comment
manguste Posted September 23, 2011 Share Posted September 23, 2011 What you definitely can do is create a frustum that * is asymmetrical * has the upper base nonparallel to the lower one As for constructing if from 6 arbitrary planes, sorry, it's hard to give a straight answer here, whether it is possible or not. It's not the obvious one. Link to comment
Recommended Posts