Struct ncollide3d::pipeline::object::CollisionObject [−][src]
pub struct CollisionObject<N: RealField, T> { /* fields omitted */ }
A stand-alone object that has a position and a shape.
Implementations
impl<N: RealField, T> CollisionObject<N, T>[src]
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]
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
T: Send,
T: Send,
impl<N, T> Sync for CollisionObject<N, T> where
T: Sync,
T: Sync,
impl<N, T> Unpin for CollisionObject<N, T> where
N: Unpin,
T: Unpin,
N: Unpin,
T: Unpin,
impl<N, T> !UnwindSafe for CollisionObject<N, T>
Blanket Implementations
impl<T> DowncastSync for T where
T: Any + Send + Sync, [src]
impl<T> DowncastSync for T where
T: Any + Send + Sync, [src]impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>, [src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>, [src]