Extract points for collision shape

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
Sinthoras
Gnoblar
Posts: 7
Joined: Thu Aug 18, 2011 11:07 pm

Extract points for collision shape

Post by Sinthoras » Mon Jul 23, 2012 9:46 pm

Hello everyone,

Im trying around with OGRE and BulletPhysics and right now I would like to created some good collision shapes for my graphic objects. To do that I need to extract some points from the mesh surface (I create the meshes with blender) and the question is, how can I get these surface points? Any ideas?

Greetings
Sinthoras
0 x

bstone
OGRE Expert User
OGRE Expert User
Posts: 1920
Joined: Sun Feb 19, 2012 9:24 pm
Location: Russia

Re: Extract points for collision shape

Post by bstone » Tue Jul 24, 2012 4:43 pm

A mesh consists of one or more sub-meshes. Each sub-mesh contains a vertex declaration - that's where you can get the vertices (points) you need. But don't forget that all vertices usually reside in a shared (by all sub-meshes) vertex buffer and then index buffers are used to point exactly which vertices compose sub-mesh triangles.
0 x

Post Reply