[−][src]Struct ncollide2d::pipeline::object::CollisionObject
A stand-alone object that has a position and a shape.
Methods
impl<N: RealField, T> CollisionObject<N, T>
[src]
pub fn new(
proxy_handle: Option<BroadPhaseProxyHandle>,
graph_index: Option<CollisionObjectGraphIndex>,
position: Isometry<N>,
shape: ShapeHandle<N>,
groups: CollisionGroups,
query_type: GeometricQueryType<N>,
data: T
) -> CollisionObject<N, T>
[src]
proxy_handle: Option<BroadPhaseProxyHandle>,
graph_index: Option<CollisionObjectGraphIndex>,
position: Isometry<N>,
shape: ShapeHandle<N>,
groups: CollisionGroups,
query_type: GeometricQueryType<N>,
data: T
) -> CollisionObject<N, T>
Creates a new collision object.
pub fn graph_index(&self) -> Option<CollisionObjectGraphIndex>
[src]
The collision object non-stable graph index.
This index may change whenever a collision object is removed from the world.
pub fn set_graph_index(&mut self, index: Option<CollisionObjectGraphIndex>)
[src]
Sets the collision object unique but non-stable graph index.
pub fn update_flags_mut(&mut self) -> &mut CollisionObjectUpdateFlags
[src]
Mutable reference to this collision object's update flags.
pub fn clear_update_flags(&mut self)
[src]
Clears the update flags of this collision object.
pub fn proxy_handle(&self) -> Option<BroadPhaseProxyHandle>
[src]
The collision object's broad phase proxy unique identifier.
pub fn set_proxy_handle(&mut self, handle: Option<BroadPhaseProxyHandle>)
[src]
Set collision object's broad phase proxy unique identifier.
pub fn position(&self) -> &Isometry<N>
[src]
The collision object position.
pub fn predicted_position(&self) -> Option<&Isometry<N>>
[src]
The predicted collision object position.
pub fn set_position(&mut self, pos: Isometry<N>)
[src]
Sets the position of the collision object and resets the predicted position to None.
pub fn set_position_with_prediction(
&mut self,
pos: Isometry<N>,
prediction: Isometry<N>
)
[src]
&mut self,
pos: Isometry<N>,
prediction: Isometry<N>
)
Sets the position of the collision object and resets the predicted position.
pub fn set_predicted_position(&mut self, pos: Option<Isometry<N>>)
[src]
Sets the predicted 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 set_shape(&mut self, shape: ShapeHandle<N>)
[src]
Set the collision object shape.
pub fn collision_groups(&self) -> &CollisionGroups
[src]
The collision groups of the collision object.
pub fn set_collision_groups(&mut self, groups: CollisionGroups)
[src]
Sets the collision groups of this collision object.
pub fn query_type(&self) -> GeometricQueryType<N>
[src]
The kind of queries this collision object is expected to .
pub fn set_query_type(&mut self, query_type: GeometricQueryType<N>)
[src]
Sets the GeometricQueryType
of the collision object.
Use CollisionWorld::set_query_type
to use this method.
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.
Trait Implementations
impl<N: RealField, T> CollisionObjectRef<N> for CollisionObject<N, T>
[src]
fn graph_index(&self) -> Option<CollisionObjectGraphIndex>
[src]
fn proxy_handle(&self) -> Option<BroadPhaseProxyHandle>
[src]
fn position(&self) -> &Isometry<N>
[src]
fn predicted_position(&self) -> Option<&Isometry<N>>
[src]
fn shape(&self) -> &dyn Shape<N>
[src]
fn collision_groups(&self) -> &CollisionGroups
[src]
fn query_type(&self) -> GeometricQueryType<N>
[src]
fn update_flags(&self) -> CollisionObjectUpdateFlags
[src]
fn compute_aabb(&self) -> AABB<N>
[src]
fn compute_swept_aabb(&self) -> AABB<N>
[src]
Auto Trait Implementations
impl<N, T> !RefUnwindSafe for CollisionObject<N, T>
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,
impl<N, T> Unpin for CollisionObject<N, T> where
N: Scalar + Unpin,
T: Unpin,
N: Scalar + Unpin,
T: Unpin,
impl<N, T> !UnwindSafe for CollisionObject<N, T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Send + Sync + Any,
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
unsafe fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
impl<T, U> TryFrom<U> 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, U> TryInto<U> 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<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,