[−][src]Struct ncollide2d::world::CollisionObject
A stand-alone object that has a position and a shape.
Methods
impl<N: RealField, T> CollisionObject<N, T>
[src]
pub fn new(
handle: CollisionObjectHandle,
proxy_handle: ProxyHandle,
graph_index: InteractionGraphIndex,
position: Isometry<N>,
shape: ShapeHandle<N>,
groups: CollisionGroups,
query_type: GeometricQueryType<N>,
data: T
) -> CollisionObject<N, T>
[src]
handle: CollisionObjectHandle,
proxy_handle: ProxyHandle,
graph_index: InteractionGraphIndex,
position: Isometry<N>,
shape: ShapeHandle<N>,
groups: CollisionGroups,
query_type: GeometricQueryType<N>,
data: T
) -> CollisionObject<N, T>
Creates a new collision object.
pub fn handle(&self) -> CollisionObjectHandle
[src]
The collision object unique handle.
pub fn graph_index(&self) -> InteractionGraphIndex
[src]
The collision object non-stable graph index.
This index may change whenever a collision object is removed from the world.
pub fn proxy_handle(&self) -> ProxyHandle
[src]
The collision object's broad phase proxy unique identifier.
pub fn position(&self) -> &Isometry<N>
[src]
The collision object position.
pub fn set_position(&mut self, pos: Isometry<N>)
[src]
Sets the position of the collision object.
pub fn set_deformations(&mut self, coords: &[N])
[src]
Deforms the underlying shape if possible.
Panics if the shape is not deformable.
pub fn shape(&self) -> &ShapeHandle<N>
[src]
The collision object shape.
pub fn collision_groups(&self) -> &CollisionGroups
[src]
The collision groups of the collision object.
pub fn query_type(&self) -> GeometricQueryType<N>
[src]
The kind of queries this collision object is expected to .
pub fn data(&self) -> &T
[src]
Reference to the user-defined data associated to this object.
pub fn data_mut(&mut self) -> &mut T
[src]
Mutable reference to the user-defined data associated to this object.
Auto Trait Implementations
impl<N, T> Send for CollisionObject<N, T> where
N: Scalar,
T: Send,
N: Scalar,
T: Send,
impl<N, T> Sync for CollisionObject<N, T> where
N: Scalar,
T: Sync,
N: Scalar,
T: Sync,
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<SS, SP> SupersetOf for SP where
SS: SubsetOf<SP>,
[src]
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
[src]
fn is_in_subset(&self) -> bool
[src]
unsafe fn to_subset_unchecked(&self) -> SS
[src]
fn from_subset(element: &SS) -> SP
[src]
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
[src]
fn as_any(&self) -> &(dyn Any + 'static)
[src]
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> Same for T
type Output = T
Should always be Self