ConvexHills - Extract Vectors form Vexter

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
Machei
Posts: 8
Joined: Tue Nov 02, 2010 12:04 am

ConvexHills - Extract Vectors form Vexter

Post 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.
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: ConvexHills - Extract Vectors form Vexter

Post 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
Machei
Posts: 8
Joined: Tue Nov 02, 2010 12:04 am

Re: ConvexHills - Extract Vectors form Vexter

Post 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 ;/
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: ConvexHills - Extract Vectors form Vexter

Post 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/
Machei
Posts: 8
Joined: Tue Nov 02, 2010 12:04 am

Re: ConvexHills - Extract Vectors form Vexter

Post by Machei »

Wow , thanks !
Post Reply