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
Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 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;
 }
Esempio n. 3
0
 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;
 }