public CylinderShape AddCylinderShape(float3 halfExtents) { ICylinderShapeImp iCylinderShapeImp = _dwi.AddCylinderShape(halfExtents); var retval = new CylinderShape(); retval.CylinderShapeImp = iCylinderShapeImp; iCylinderShapeImp.UserObject = retval; return retval; }
public void InitColliders() { MyBoxCollider = _world.AddBoxShape(2); MySphereCollider = _world.AddSphereShape(2); MyCylinderCollider = _world.AddCylinderShape(new float3(2, 4, 2)); BoxMesh = MeshReader.LoadMesh(@"Assets/Cube.obj.model"); TeaPotMesh = MeshReader.LoadMesh(@"Assets/Teapot.obj.model"); PlatonicMesh = MeshReader.LoadMesh(@"Assets/Platonic.obj.model"); float3[] verts = PlatonicMesh.Vertices; MyConvHull = _world.AddConvexHullShape(verts, true); float3[] vertsTeaPot = TeaPotMesh.Vertices; TeaPotHull = _world.AddConvexHullShape(vertsTeaPot, true); TeaPotHull.LocalScaling = new float3(0.05f, 0.05f,0.05f); }