struct CP::PointQueryInfo

Overview

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

Defined in:

chipmunk/query.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(shape : Shape, point : Vect, distance : Float64, gradient : Vect) #

[View source]

Instance Method Detail

def distance : Float64 #

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


[View source]
def distance=(distance : Float64) #

[View source]
def gradient : Vect #

The gradient of the signed distance function.

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


[View source]
def gradient=(gradient : Vect) #

[View source]
def point : Vect #

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


[View source]
def point=(point : Vect) #

[View source]
def shape : Shape #

The nearest shape


[View source]
def shape=(shape : Shape) #

[View source]