Page 1 of 1

ConvexHills - Extract Vectors form Vexter

Posted: Thu Jan 06, 2011 10:31 am
by Machei
Hi,

In question ,so i need any code for working extract vectors form vexter and make entity from convexhills, or i wanna make collision detection with TriangleMesh and Entity.

At link http://www.bepu-games.com/forums/viewto ... ?f=4&t=960 then i got code XNAutils.XNAutils.ExtractVectors(model.Meshes[0], vertices, transforms[model.Meshes[0].ParentBone.Index]) , where I can get this code , but this framework XNAutils doesnt found on my XNA.

I couldnt make any code with my brain. I need tutorial.

I am noob, and sorry for poorly english. Machei.

Re: ConvexHills - Extract Vectors form Vexter

Posted: Thu Jan 06, 2011 4:42 pm
by Norbo
For some vertex formats, you can use the convenience static method TriangleMesh.GetVerticesAndIndiciesFromModel. It doesn't work for all vertex types currently, though. In the general case, I recommend using the content pipeline to extract the vertices.

A sample of extracting vertices from a model can be found in the Triangle Picking sample on the XNA website. It can explain it better than I can.

Here's a couple of related threads too:
http://www.bepu-games.com/forums/viewto ... 048&p=6499
http://www.bepu-games.com/forums/viewto ... f=4&t=1025

Re: ConvexHills - Extract Vectors form Vexter

Posted: Thu Jan 06, 2011 9:03 pm
by Machei
I am using XNA 3.1 but i am working with SunPhysics , on website XNA with sample Triangle Picking is only for XNA 4.0 ... :| -.-

Here any help doesnt work ;/

Re: ConvexHills - Extract Vectors form Vexter

Posted: Thu Jan 06, 2011 9:11 pm
by Norbo
The basic concepts should carry over with little change from XNA 4.0 to XNA 3.1. For reference: http://www.nelxon.com/blog/xna-3-1-to-x ... heatsheet/

Re: ConvexHills - Extract Vectors form Vexter

Posted: Thu Jan 06, 2011 10:27 pm
by Machei
Wow , thanks !