On Apr 1, 5:22 pm, Andreas Sch=FCle <schu...@[EMAIL PROTECTED]
> wrote:
> broli schrieb:
>
> > Thank you very much.
>
> > What I'm thinking is to build the BSP tree by subdividing along the
> > center of x, y, or z bounds. But the
> > biggest problem I'm facing right now is how to deal with situations
> > where a triangle is spanning across the plane ?? In this case part of
> > traingle is in one bounding volume and the other part is in the
> > sibling bounding volume. How to deal with this ??
>
> If your triangle lies exactly on your splitting plane, then add it to
> the side where triangle's normal is pointing to.
>
> What do you expect to achieve with BSP?
No, Im speaking of the situation where your triangle is intersecting
the splitting plane.
I have also been considering octree .In octree you are simulatenously
cutting thorugh center of box with 3 planes coplanar to XY, YZ and ZX
planes. However, I could not understand how to calculate the bounds
for each of the 8 children ??
I tried octree with following data structure -
struct octree
{
struct octree *child[8];
vector minB, maxB;
Triangle *list;
};
typedef octree octree;
octree *root;
=2E............
=2E............
Now suppose we have a root bounding box, now how to subdivide this
into 8 children ?


|