cpNearestPointQueryInfo

The cpShape struct defines the shape of a rigid body_. Nearest point query info struct.

struct cpNearestPointQueryInfo {}

Members

Variables

d
cpFloat d;

The distance to the point. The distance is negative if the point is inside the shape.

g
cpVect g;

The gradient of the signed distance function. The same as info.p/info.d, but accurate even for very small values of info.d.

p
cpVect p;

The closest point on the shape's surface. (in world space coordinates)

shape
cpShape* shape;

The nearest shape, null if no shape was within range.

Meta