struct

CP::PointQueryInfo

Inherits Struct / Value / Object

Holds the result of a point query made on a Shape or Space.

Constructors

new(shape : Shape, point : Vect, distance : Float64, gradient : Vect)
Source

Instance methods

distance

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

Source
distance=(distance : Float64)
Source
gradient

The gradient of the signed distance function.

The value should be similar to point/distance, but accurate even for very small values of distance.

Source
gradient=(gradient : Vect)
Source
point

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

Source
point=(point : Vect)
Source
shape

The nearest shape

Source
shape=(shape : Shape)
Source