Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Gaming > Development Programming Algorithms > Re: Geometry an...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 6 Topic 642 of 680
Post > Topic >>

Re: Geometry and the concept of in vs out.

by rsprawls <rsprawls@[EMAIL PROTECTED] > Aug 27, 2007 at 06:02 AM

On Aug 27, 3:14 am, Michael Arens <Michael.Ar...@[EMAIL PROTECTED]
>
wrote:
> Hi
>
> > Assuming a closed, but concave and complex piece of geometry and that
> > the directions I am using are nice, neat axially aligned vectors, is
> > it sufficient to assume a point is inside if testing in both
> > directions in one dimension hits surfaces that face out/away from the
> > point of test?  That is, the first surface to either direction.
>
> If I am right you will always hit a surface facing away from the point
> of test first, no matter in which direction you go. Testing in one
> direction will be enough. That is - as long as you got a closed, not
> self intersecting object. Watch out for floating point errors though,
> you might run into trouble at concave edges.
>
> > And as an opposite, is it safe to assume that a test in either
> > direction in one dimension hits a surface that faces toward the point
> > means the point is outside?
>
> Sure. But you might have a problem here. Your rays might both go to
> infinity without hitting the object. So rather use one ray, pointing to
> a point inside the object to test if you are outside. Like in the other
> case a single ray is enough.

> You should have a look at Binary Space
Partitioning:http://en.wikipedia.org/wiki/Binary_space_partitioning
>
> It might be just what you need. Unless of course the object has too many
> surfaces or is round.

Actually, it's not what I needed. I'll explain what I'm doing:

I'm making a space shooter, but I want to model motion properly
according to the laws of physics, or at least that much which makes it
computationally feasible.  Thus, the ****ps and smaller craft need to
have certain physical qualities and quantities defined for them:
volume, density, center of mass, center of percussion, moments of
inertia, etc.

Because the ****ps will be complex and concave, simply summing the
volume of the pyramids defined by the triangles won't work. I'll need
to sample discreet "points." I've spent a significant amount of time
contemplating the "ifs" so I can do this right.  I tried to conceive
of a possibility of where the sampling box would be fooled into
thinking it's inside the object, when it really wasn't, or outside
when it was not.  The object will have a AABB the defines the min and
max extents of testing, so infinity is not an issue.

Thanks for the point toward BSP trees, though.  Eventually, I'll sit
down and study them hard.  I understand the concept of trees, but
could never grasp the implementation.
 




 6 Posts in Topic:
Geometry and the concept of in vs out.
rsprawls <rsprawls@[EM  2007-08-26 19:02:04 
Re: Geometry and the concept of in vs out.
Michael Arens <Michael  2007-08-27 10:14:28 
Re: Geometry and the concept of in vs out.
rsprawls <rsprawls@[EM  2007-08-27 06:02:36 
Re: Geometry and the concept of in vs out.
Miss Elaine Eos <Misc@  2007-08-27 14:14:07 
Re: Geometry and the concept of in vs out.
Michael Arens <Michael  2007-08-27 16:29:40 
Re: Geometry and the concept of in vs out.
rsprawls <rsprawls@[EM  2007-08-27 14:06:27 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 2:02:39 CDT 2008.