Struct nphysics2d::object::Sensor [] [src]

pub struct Sensor<N: Real> { /* fields omitted */ }

An object capable of detecting interferances with other entities without interacting with them.

Methods

impl<N: Real> Sensor<N>
[src]

[src]

Creates a new sensor.

A sensor may either be attached to the rigid body parent, or be attached to the ground. If it has a parent, it will have a position relative to it. If the parent moves, the sensor will automatically move as well. By default, a sensor does not trigger any proximity event when it intersects its own parent.

A sensor has a default margin equal to zero.

[src]

Creates a new senson with a given shared shape.

[src]

Reference to user-defined data attached to this sensor.

[src]

Mutable reference to user-defined data attached to this sensor.

[src]

Attach some user-defined data to this sensor and return the old one.

[src]

Enables the collection of all body handles that intersect this sensor.

[src]

Enables the collection of all body handles that intersect this sensor.

[src]

Disables the collection of all body handles that intersect this sensor.

[src]

Disables the collection of all body handles that intersect this sensor.

[src]

List of rigid bodies geometrically intersecting this sensor.

[src]

List of sensors geometrically intersecting this sensor.

[src]

This sensor's position relative to self.parent().

If this sensor has no parent, then this relative position is actually the sensor absolute position.

[src]

Sets the sensor position relative to self.parent().

If self.parent() is None, then this sets the sensor's absolute position.

[src]

This sensor's absolute position.

[src]

Sets the sensor absolute position.

If self.parent() is not None, then this automatically computes the relevant relative position and updates it.

[src]

This sensor position's translational component.

[src]

The collision margin of this sensor's shape.

This is set to zero by default.

[src]

Whether or not proximity detection between this sensor and its parent is enabled.

[src]

Enables proximity detection between this sensor and its parent if it has one.

[src]

Disables proximity detection between this sensor and its parent if it has one.

[src]

The rigid body to which this sensor is kinematically attached.

Returns None if this sensor is directly attached to the scene.

[src]

A reference of this sensor's shared shape.

[src]

This sensor's collision groups.

[src]

Set this sensor's collision groups.