Struct nphysics2d::object::RigidBodyCollisionGroups
[−]
[src]
pub struct RigidBodyCollisionGroups { /* fields omitted */ }
Groups of collision used to filter which object collide with which other one.
nphysics use a specific group for its own purposes (i.e. the group of static objects).
The group 29
is reserved and you cannot use it.
Methods
impl RigidBodyCollisionGroups
[src]
fn new_dynamic() -> RigidBodyCollisionGroups
[src]
Creates a new RigidBodyCollisionGroups
that enables collisions with everything except
self-collision.
fn new_static() -> RigidBodyCollisionGroups
[src]
Creates a new RigidBodyCollisionGroups
that enables collisions with every user-defined
groups. Static objects and sensors are blacklisted by default and self-collision disabled.
fn is_dynamic(&self) -> bool
[src]
Returns true
if this object is not part of the static group.
fn is_static(&self) -> bool
[src]
Returns true
if this object is part of the static group.
impl RigidBodyCollisionGroups
[src]
fn max_group_id() -> usize
[src]
The maximum allowed group identifier.
fn as_collision_groups(&self) -> &CollisionGroups
[src]
Return the internal, ncollide-compatible, CollisionGroups
fn modify_membership(&mut self, group_id: usize, add: bool)
[src]
Adds or removes this entity from the given group.
fn modify_whitelist(&mut self, group_id: usize, add: bool)
[src]
Adds or removes the given group from this entity whitelist.
fn modify_blacklist(&mut self, group_id: usize, add: bool)
[src]
Adds or removes this entity from the given group.
fn set_membership(&mut self, groups: &[usize])
[src]
Make this object member of the given groups only.
fn set_whitelist(&mut self, groups: &[usize])
[src]
Whitelists the given groups only (others will be un-whitelisted).
fn set_blacklist(&mut self, groups: &[usize])
[src]
Blacklists the given groups only (others will be un-blacklisted).
fn copy_membership(&mut self, other: &RigidBodyCollisionGroups)
[src]
Copies the membership of another collision groups.
fn copy_whitelist(&mut self, other: &RigidBodyCollisionGroups)
[src]
Copies the whitelist of another collision groups.
fn copy_blacklist(&mut self, other: &RigidBodyCollisionGroups)
[src]
Copies the blacklist of another collision groups.
fn enable_interaction_with_static(&mut self)
[src]
Un-blacklists static objects.
fn disable_interaction_with_static(&mut self)
[src]
Blacklists any static object.
fn enable_interaction_with_sensors(&mut self)
[src]
Un-blacklists sensors.
fn disable_interaction_with_sensors(&mut self)
[src]
Blacklists sensors.
fn enable_self_interaction(&mut self)
[src]
Enables self interaction detection.
fn disable_self_interaction(&mut self)
[src]
Disables self interaction detection.
fn is_member_of(&self, group_id: usize) -> bool
[src]
Tests if this entity is part of the given group.
fn is_group_whitelisted(&self, group_id: usize) -> bool
[src]
Tests if the given group is whitelisted.
fn is_group_blacklisted(&self, group_id: usize) -> bool
[src]
Tests if the given group is blacklisted.
fn can_interact_with(&self, group_id: usize) -> bool
[src]
Tests whether collisions with a given group is possible.
Collision is possible if group_id
is whitelisted but not blacklisted.
fn can_interact_with_groups(&self, other: &CollisionGroups) -> bool
[src]
Tests whether two collision groups have at least one group in common.
fn can_interact_with_self(&self) -> bool
[src]
Tests whether self-collision is enabled.
Trait Implementations
impl Clone for RigidBodyCollisionGroups
[src]
fn clone(&self) -> RigidBodyCollisionGroups
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more