|
| | PolygonShape (const Conf &conf=GetDefaultConf()) noexcept |
| | Default constructor. More...
|
| |
| | PolygonShape (const PolygonShape &)=default |
| |
| | PolygonShape (Length hx, Length hy, const Conf &conf=GetDefaultConf()) noexcept |
| | Initializing constructor for rectangles. More...
|
| |
| | PolygonShape (Span< const Length2D > points, const Conf &conf=GetDefaultConf()) noexcept |
| | Creates a convex hull from the given array of local points. The size of the span must be in the range [1, MaxShapeVertices]. More...
|
| |
| child_count_t | GetChildCount () const noexcept override |
| | Gets the number of child primitives. More...
|
| |
| DistanceProxy | GetChild (child_count_t index) const noexcept override |
| | Gets the child for the given index. More...
|
| |
| bool | TestPoint (const Transformation &xf, const Length2D p) const noexcept override |
| | Tests a point for containment in this shape. More...
|
| |
| MassData | GetMassData () const noexcept override |
| | Computes the mass properties of this shape using its dimensions and density. The inertia tensor is computed about the local origin. More...
|
| |
| RayCastOutput | RayCast (const RayCastInput &input, const Transformation &xf, child_count_t childIndex) const noexcept override |
| | Cast a ray against a child shape. More...
|
| |
| void | Accept (Visitor &visitor) const override |
| | Accepts a visitor. More...
|
| |
| void | Set (Span< const Length2D > points) noexcept |
| | Creates a convex hull from the given array of local points. The size of the span must be in the range [1, MaxShapeVertices]. More...
|
| |
| void | Set (const VertexSet &points) noexcept |
| | Creates a convex hull from the given set of local points. The size of the set must be in the range [1, MaxShapeVertices]. More...
|
| |
| void | SetAsBox (Length hx, Length hy) noexcept |
| | Build vertices to represent an axis-aligned box centered on the local origin. More...
|
| |
| void | Transform (Transformation xfm) noexcept |
| |
| vertex_count_t | GetVertexCount () const noexcept |
| | Gets the vertex count. More...
|
| |
| Length2D | GetVertex (vertex_count_t index) const |
| | Gets a vertex by index. More...
|
| |
| UnitVec2 | GetNormal (vertex_count_t index) const |
| | Gets a normal by index. More...
|
| |
| Span< const Length2D > | GetVertices () const noexcept |
| | Gets the span of vertices. More...
|
| |
| Span< const UnitVec2 > | GetNormals () const noexcept |
| |
| Length2D | GetCentroid () const noexcept |
| |
| | Shape ()=delete |
| | Default constructor is deleted. More...
|
| |
| | Shape (const Conf &conf) noexcept |
| | Initializing constructor. More...
|
| |
| | Shape (const Shape &)=default |
| |
| virtual | ~Shape ()=default |
| |
| Length | GetVertexRadius () const noexcept |
| | Gets the vertex radius. More...
|
| |
| void | SetVertexRadius (Length vertexRadius) |
| |
| Density | GetDensity () const noexcept |
| | Gets the density of this fixture. More...
|
| |
| void | SetDensity (Density density) noexcept |
| | Sets the density of this fixture. More...
|
| |
| RealNum | GetFriction () const noexcept |
| | Gets the coefficient of friction. More...
|
| |
| void | SetFriction (RealNum friction) noexcept |
| | Sets the coefficient of friction. This will not change the friction of existing contacts. More...
|
| |
| RealNum | GetRestitution () const noexcept |
| | Gets the coefficient of restitution. More...
|
| |
| void | SetRestitution (RealNum restitution) noexcept |
| | Sets the coefficient of restitution. This will not change the restitution of existing contacts. More...
|
| |
Polygon shape.
A convex polygon. The interior of the polygon is to the left of each edge. Polygons have a maximum number of vertices equal to MaxShapeVertices. In most cases you should not need many vertices for a convex polygon.
- Note
- This data structure is 64-bytes large (with 4-byte RealNum).