1 static DT_ShapeHandle CreateShapeFromMesh(RAS_MeshObject* meshobj)
3 DT_ShapeHandle shape = DT_NewComplexShape();
4 int numpolys = meshobj->NumPolygons();
7 for (int p=0; p<numpolys; p++)
9 RAS_Polygon* poly = meshobj->GetPolygon(p);
11 // only add polygons that have the collisionflag set
12 if (poly->IsCollider())
15 for (int v=0; v<poly->VertexCount(); v++) {
16 MT_Point3 pt = meshobj->GetVertex(poly->GetVertexIndexBase().m_vtxarray,
17 poly->GetVertexIndexBase().m_indexarray[v],
18 poly->GetMaterial()->GetPolyMaterial())->xyz();
19 DT_Vertex(pt[0],pt[1],pt[2]);
29 if (numvalidpolys==0) {