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 5 of 6 Topic 642 of 675
Post > Topic >>

Re: Geometry and the concept of in vs out.

by Michael Arens <Michael.Arens@[EMAIL PROTECTED] > Aug 27, 2007 at 04:29 PM

> 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.

Oh, ok. Then your method seems to be a good choice. But I still do not 
see the point in tracing in two directions. Beginning from the point you 
want to test, just trace a single ray into an arbitrary direction. Then 
the inclusion of the point in the object is determined by the first 
thing you hit:
1) You hit the bound box first: The test point is outside the object
2) You hit a triangle facing towards your test point: You are outside
3) You hit a triangle facing away from your test point: You are inside

A binary space partitioning tree could speed up the line tracing 
significantly, but since calculation of volume sounds like something 
being done once, calculation time seems rather unim****tant.

It might come in handy when you have to calculate collisions in real 
time though.

Also notice that a BSP-tree will allow you to decompose your object into 
convex pieces, which in turn might allow you to decompose them into 
pyramids and sum their volume.

But tracing lines will by far be the most simple approach.
 




 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 Wed Jul 9 4:35:14 CDT 2008.