b2PolygonDef Struct Reference
Convex polygon. More...
Inheritance diagram for b2PolygonDef:

Public Member Functions | |
| void | SetAsBox (float32 hx, float32 hy) |
| Build vertices to represent an axis-aligned box. | |
| void | SetAsBox (float32 hx, float32 hy, const b2Vec2 ¢er, float32 angle) |
| Build vertices to represent an oriented box. | |
Public Attributes | |
| b2Vec2 | vertices [b2_maxPolygonVertices] |
| The polygon vertices in local coordinates. | |
| int32 | vertexCount |
| The number of polygon vertices. | |
Detailed Description
Convex polygon.The vertices must be in CCW order for a right-handed coordinate system with the z-axis coming out of the screen.
Member Function Documentation
| void b2PolygonDef::SetAsBox | ( | float32 | hx, | |
| float32 | hy | |||
| ) |
Build vertices to represent an axis-aligned box.
- Parameters:
-
hx the half-width. hy the half-height.
| void b2PolygonDef::SetAsBox | ( | float32 | hx, | |
| float32 | hy, | |||
| const b2Vec2 & | center, | |||
| float32 | angle | |||
| ) |
Build vertices to represent an oriented box.
- Parameters:
-
hx the half-width. hy the half-height. center the center of the box in local coordinates. angle the rotation of the box in local coordinates.
The documentation for this struct was generated from the following files:
- b2PolygonShape.h
- b2PolygonShape.cpp
Generated on Sun Apr 13 15:21:27 2008 for Box2D by
1.5.4