A chain shape is a free form sequence of line segments. The chain has two-sided collision, so you can use inside and outside collision. Therefore, you may use any winding order. Since there may be many vertices, they are allocated using Alloc. Connectivity information is used to create smooth collisions. WARNING The chain will not collide properly if there are self-intersections.
Inheritance: Shape
コード例 #1
0
ファイル: ChainShape.cs プロジェクト: prepare/gerich_box2dnet
        public override Shape Clone()
        {
            ChainShape clone = new ChainShape();

            clone.CreateChain(Vertices, Count);
            clone.m_prevVertex.Set(m_prevVertex);
            clone.m_nextVertex.Set(m_nextVertex);
            clone.HasPrevVertex = HasPrevVertex;
            clone.HasNextVertex = HasNextVertex;
            return(clone);
        }
コード例 #2
0
ファイル: ChainShape.cs プロジェクト: gerich-home/box2dnet
 public override Shape Clone()
 {
     ChainShape clone = new ChainShape();
     clone.CreateChain(Vertices, Count);
     clone.m_prevVertex.Set(m_prevVertex);
     clone.m_nextVertex.Set(m_nextVertex);
     clone.HasPrevVertex = HasPrevVertex;
     clone.HasNextVertex = HasNextVertex;
     return clone;
 }
コード例 #3
0
ファイル: ChainShape.cs プロジェクト: thdtjsdn/box2dnet
 public override Shape Clone()
 {
     ChainShape clone = new ChainShape();
     clone.createChain(m_vertices, m_count);
     clone.m_prevVertex.set_Renamed(m_prevVertex);
     clone.m_nextVertex.set_Renamed(m_nextVertex);
     clone.m_hasPrevVertex = m_hasPrevVertex;
     clone.m_hasNextVertex = m_hasNextVertex;
     return clone;
 }