A loop Shape is a free form sequence of line segments that form a circular list. The loop may cross upon itself, but this is not recommended for smooth collision. The loop has double sided collision, so you can use inside and outside collision. Therefore, you may use any winding order.
Inheritance: Shape
コード例 #1
0
        public override Shape Clone()
        {
            LoopShape loop = new LoopShape();

            loop.Radius   = Radius;
            loop.Vertices = Vertices;
            loop._density = _density;
            loop.MassData = MassData;
            return(loop);
        }
コード例 #2
0
ファイル: LoopShape.cs プロジェクト: scastle/Solitude
 public override Shape Clone()
 {
     LoopShape loop = new LoopShape();
     loop.Radius = Radius;
     loop.Vertices = Vertices;
     loop._density = _density;
     loop.MassData = MassData;
     return loop;
 }
コード例 #3
0
ファイル: FixtureFactory.cs プロジェクト: scastle/Solitude
 public static Fixture CreateLoopShape(Vertices vertices, float density, Body body, Object userData)
 {
     LoopShape shape = new LoopShape(vertices, density);
     return body.CreateFixture(shape, userData);
 }