Simple question about boxes

Hi,

usually a box is rendered as a couple of triangles … but how can i render it as 6 quads ? Or a Quad as one quad and not as 4 triangles… ?

you could create your own box out of six quads, or make your own Box implementation.




Ok, maybe a more detalied problem description helps to find a more elegant way:



I develop a own simple 3d "gui" and i want BoundingPickResults to calc the distance of a mouse pick.

I use BoundingBoxes but the problem is, that the BoundingBox consist of 12 Triangles… If my cursor points to a

edge of two triangles, the ray goes through the two triangles and returns a distance of 1E38 which is the maximum…

By the way, my little gui only uses quads … There must be an easy way of solving it but i don't see it …


When you are picking do you set the flag to actually check distances?

Yes, of course! The calculation is correct but when i hover over the edge of the two triangles the problem occurs…

I use quads with BoundingBoxes, so the z coordinate of the BoundingBox is 0, could this be a problem ?

It seem to be a "global bug", a simple Box with a BoundingBox will return 3.402E38 (Infinity) if you point exactly to a edge between triangles… The triangles become visible by pressing "b". (class: SimpleGame)



Any idea ?!?!