MCPcopy Create free account
hub / github.com/ByteArena/box2d / Clone

Method Clone

CollisionB2ShapeChain.go:114–124  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

112}
113
114func (chain B2ChainShape) Clone() B2ShapeInterface {
115
116 clone := MakeB2ChainShape()
117 clone.CreateChain(chain.M_vertices, chain.M_count)
118 clone.M_prevVertex = chain.M_prevVertex
119 clone.M_nextVertex = chain.M_nextVertex
120 clone.M_hasPrevVertex = chain.M_hasPrevVertex
121 clone.M_hasNextVertex = chain.M_hasNextVertex
122
123 return &clone
124}
125
126func (chain B2ChainShape) GetChildCount() int {
127 // edge count = vertex count - 1

Callers

nothing calls this directly

Calls 2

MakeB2ChainShapeFunction · 0.85
CreateChainMethod · 0.80

Tested by

no test coverage detected