On Sun, 2010-01-17 at 16:26 +0100, gabor papp wrote: > > I've added active-mesh and passive-mesh to the physics system. > great! this is a feature i have wanted for a long time. thanks! > > i tried to make a passive-mesh ground, but got a seg fault. am i doing > something wrong? > > (clear) > > (define p (build-seg-plane 16 16)) > > (with-primitive p > (poly-convert-to-indexed)) > > (passive-mesh p)
The seg-plane is a quad list, and the check wasn't returning from the function. I've fixed the check. In order for this to work, we need a (poly-build-triangulated) to convert any poly prim into a triangle list poly prim (which can then be converted to indexed mode and given to the physics system), so I've added that too. In order for this to work correctly for all pdata (including user added pdata) I've had to make (pdata-names) which returns a list containing the names of all the pdata arrays. (define p (build-seg-plane 20 20)) (define t (poly-build-triangulate p)) (with-primitive t (translate (vector 2 0 0)) (poly-convert-to-indexed)) (passive-mesh t) As an aside, in doing this, I noticed that: (with-primitive (build-seg-plane 1 1) (poly-convert-to-indexed)) crashes... cheers, dave
