On Aug 27, 9:29 am, Michael Arens <Michael.Ar...@[EMAIL PROTECTED]
>
wrote:
> > 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:
Ok, when you first mentioned it, it sounded reasonable and something I
should explore. When doing this, I can use spanning to speed things
up, once I determine whether the very first sample is in or out and
then use a flip boolean to tell the tracer whether the sample is
currently inside or out. Anything that can speed this up, because
I'll be using it on objects as large as cities -- actually space
stations, though I'll most likely use a coarser sampling resolution.
The default resolution with be 1/1000th -- and it will be three pass:
1. Volumize, 2. Find center of mass and center of percussion, 3. Find
moments of inertia with respect to center of mass.
> 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.
And to Miss Elaine:
I thought BSP were only good for static worlds, not where it's 95%
open space and the other 5% moving objects. I could be wrong, because
I've only seen BSP trees used for FPSs and walk-through sims and that
was for the walls.


|