public IPhysical MakeCyllinder(double rbottom, double rtop, double height) { FBody fb = BodyFactory.CreateCircle(World, FarseerConverter.ToSimUnits((float)rbottom), (float)1); fb.BodyType = BodyType.Dynamic; return(new FarseerBody(fb)); }
//-------------------------------------------------------------------------- #region Making primitives public IPhysical MakeBox(double xsize, double ysize, double zsise) { FBody fb = BodyFactory.CreateRectangle(World, FarseerConverter.ToSimUnits((float)xsize), FarseerConverter.ToSimUnits((float)ysize), (float)1); fb.BodyType = BodyType.Dynamic; return(new FarseerBody(fb)); }
static public WeldJoint MakeWeldJoint(FBody a, FBody b, Frame3D bBodyOffset) { return(JointFactory.CreateWeldJoint(World, a, b, new Microsoft.Xna.Framework.Vector2(0, 0), FarseerConverter.ToSimUnits(new Microsoft.Xna.Framework.Vector2((float)-bBodyOffset.X, (float)-bBodyOffset.Y)))); //без минусов не работает как надо }