Shape#
-
struct nvShape#
Collision shape.
Enums#
Methods#
-
nvShape *nvCircleShape_new(nv_float radius)#
Create a new circle shape.
- Parameters:
radius – Radius of the circle
- Returns:
nvShape *
-
nvShape *nvPolygonShape_new(nvArray *vertices)#
Create a new convex polygon shape.
- Parameters:
vertices – Array of vertices
- Returns:
nvShape *
-
nvShape *nvRectShape_new(nv_float width, nv_float height)#
Create a new polygon shape that is a rectangle.
- Parameters:
width – Width
height – Height
- Returns:
nvShape *
-
nvBoxShape_new(width, height)#
Create a new polygon shape that is a rectangle. Alias for nvRectShape_new.
- Parameters:
width – Width
height – Height
- Returns:
nvShape *
-
nvShape *nvNGonShape_new(size_t n, nv_float radius)#
Create a new polygon shape that is a regular n-gon.
- Parameters:
n – Number of vertices or edges
radius – Length of a vertex from the centroid
- Returns:
nvShape *