About Store Forum Documentation Contact



Post Reply 
get vertexes from physpart or physbody
Author Message
yvanvds Offline
Member

Post: #1
get vertexes from physpart or physbody
Hello.

I'm trying to add a sound geometry system for occlusion. Therefore I need to find out the basic geometry for objects, and possibly for the terrain. Since normal meshes are way to detailed for sound geometry, I thought i'd better use the physbody of an object and get the vertexes from there to create the sound geometry object.

But i don't really see how to get access to the vertexes. I guess they should be in Mems<PhysPart> parts, but MeshBase is private in a PhysPart. Does this mean I cannot get access to them, or is there another way?

Regards,

yvan
05-27-2011 12:50 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: get vertexes from physpart or physbody
phys -> mesh -> vtxs
MeshBase::create(from phys)
05-27-2011 02:25 PM
Find all posts by this user Quote this message in a reply
yvanvds Offline
Member

Post: #3
RE: get vertexes from physpart or physbody
ok, thanks!
05-27-2011 02:31 PM
Find all posts by this user Quote this message in a reply
yvanvds Offline
Member

Post: #4
RE: get vertexes from physpart or physbody
It seems I have to pass the mesh to FMOD face by face. I figured out how to do that, but I'm a bit worried about quads.

I use quad.ind(x) to get all vertices of a certain quad. Then I just pass them to FMOD as a vector array. Now this works if the vertices are ordered clockwise or counter-clockwise. But if they would be ordered in a Z shape, like:

1 2
3 4

it wouldn't work for FMOD. Until now all seems ok, but I'd like to be sure now I'm at it.

In other words, are the values x y z w of the VecI4 returned by quad.ind(x) always in clockwise order, or is this arbitrary?
05-29-2011 06:13 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #5
RE: get vertexes from physpart or physbody
yes, it's always same clock-wise order
05-29-2011 11:10 PM
Find all posts by this user Quote this message in a reply
Post Reply