casts a box2d object to a shape type * @param {Object} o
(o)
| 1914 | /** casts a box2d object to a shape type |
| 1915 | * @param {Object} o */ |
| 1916 | castShapeObject(o) |
| 1917 | { |
| 1918 | switch (o.GetType()) |
| 1919 | { |
| 1920 | case box2d.instance.b2Shape.e_circle: |
| 1921 | return box2d.instance.castObject(o, box2d.instance.b2CircleShape); |
| 1922 | case box2d.instance.b2Shape.e_edge: |
| 1923 | return box2d.instance.castObject(o, box2d.instance.b2EdgeShape); |
| 1924 | case box2d.instance.b2Shape.e_polygon: |
| 1925 | return box2d.instance.castObject(o, box2d.instance.b2PolygonShape); |
| 1926 | case box2d.instance.b2Shape.e_chain: |
| 1927 | return box2d.instance.castObject(o, box2d.instance.b2ChainShape); |
| 1928 | } |
| 1929 | |
| 1930 | ASSERT(false, 'Unknown box2d object type'); |
| 1931 | } |
| 1932 | |
| 1933 | /** casts a box2d object to a joint type |
| 1934 | * @param {Object} o */ |
no test coverage detected