All shapes are defined as convex type. More...
Public Member Functions | |
| PhysicsShape () | |
| Default Constructor. | |
| PhysicsShape (float radius) | |
| Sphere Constructor. | |
| PhysicsShape (Vector2 width) | |
| Box Constructor. | |
| PhysicsShape (Vector2[] pos, int num) | |
| Convex Constructor. | |
| PhysicsShape (Vector2[] pos, int num, bool flag) | |
| Chain of Line Segments Constructor. | |
| PhysicsShape (PhysicsShape con) | |
| PhysicsShape Copy Constructor. | |
Static Public Member Functions | |
| static PhysicsShape | CreateConvexHull (Vector2[] vertList, int num) |
| create convex shape from random point | |
Public Attributes | |
| int | numVert |
| number of points | |
| Vector2[] | vertList = new Vector2[30] |
| list of points | |
| uint | hint |
| hint for PhysicsShape | |
Properties | |
| int | NumVert [get, set] |
| setter and getter of numVert | |
| Vector2[] | VertList [get, set] |
| setter and getter of vertList | |
| uint | Hint [get, set] |
| setter and getter of hint | |
All shapes are defined as convex type.
| PhysicsShape | ( | float | radius | ) |
Sphere Constructor.
| radius | radius of sphere |
| PhysicsShape | ( | Vector2 | width | ) |
Box Constructor.
| width | half width of box |
width param is half width of box
| PhysicsShape | ( | Vector2[] | pos, |
| int | num | ||
| ) |
Convex Constructor.
| pos | point list for convex shape |
| num | num of point list for convex shape |
the limitation of number of point list containd by convex shape is 30
| PhysicsShape | ( | Vector2[] | pos, |
| int | num, | ||
| bool | flag | ||
| ) |
Chain of Line Segments Constructor.
| pos | point list for line shape |
| num | num of point list for convex shape |
| flag | true should be given |
the limitation of number of point list containd by convex shape is 30, and this is only for static rigid body
| PhysicsShape | ( | PhysicsShape | con | ) |
PhysicsShape Copy Constructor.
| con | shape of rigid body |
| static PhysicsShape CreateConvexHull | ( | Vector2[] | vertList, |
| int | num | ||
| ) | [static] |
create convex shape from random point
| vertList | random point set |
| num | number of random point set |
| uint hint |
hint for PhysicsShape
hint defines symmetry of PhysicsShape hint=1 means non symmetry, hint=2 means symmetry except for sphere and box, convex shape should define this property to accelarate the simulation when usr uses convex shape