[−][src]Struct rapier3d::geometry::ColliderBuilder
A structure responsible for building a new collider.
Fields
shape: ColliderShape
The shape of the collider to be built.
friction: f32
The friction coefficient of the collider to be built.
restitution: f32
The restitution coefficient of the collider to be built.
delta: Isometry<f32>
The position of this collider relative to the local frame of the rigid-body it is attached to.
is_sensor: bool
Is this collider a sensor?
user_data: u128
The user-data of the collider being built.
collision_groups: InteractionGroups
The collision groups for the collider being built.
solver_groups: InteractionGroups
The solver groups for the collider being built.
Implementations
impl ColliderBuilder
[src]
pub fn new(shape: ColliderShape) -> Self
[src]
Initialize a new collider builder with the given shape.
pub fn get_density(&self) -> f32
[src]
The density of the collider being built.
pub fn ball(radius: f32) -> Self
[src]
Initialize a new collider builder with a ball shape defined by its radius.
pub fn cylinder(half_height: f32, radius: f32) -> Self
[src]
Initialize a new collider builder with a cylindrical shape defined by its half-height (along along the y axis) and its radius.
pub fn round_cylinder(half_height: f32, radius: f32, border_radius: f32) -> Self
[src]
Initialize a new collider builder with a rounded cylindrical shape defined by its half-height (along along the y axis), its radius, and its roundedness (the radius of the sphere used for dilating the cylinder).
pub fn cone(half_height: f32, radius: f32) -> Self
[src]
Initialize a new collider builder with a cone shape defined by its half-height (along along the y axis) and its basis radius.
pub fn capsule_x(half_height: f32, radius: f32) -> Self
[src]
Initialize a new collider builder with a capsule shape aligned with the x
axis.
pub fn capsule_y(half_height: f32, radius: f32) -> Self
[src]
Initialize a new collider builder with a capsule shape aligned with the y
axis.
pub fn capsule_z(half_height: f32, radius: f32) -> Self
[src]
Initialize a new collider builder with a capsule shape aligned with the z
axis.
pub fn cuboid(hx: f32, hy: f32, hz: f32) -> Self
[src]
Initialize a new collider builder with a cuboid shape defined by its half-extents.
pub fn segment(a: Point<f32>, b: Point<f32>) -> Self
[src]
Initializes a collider builder with a segment shape.
pub fn triangle(a: Point<f32>, b: Point<f32>, c: Point<f32>) -> Self
[src]
Initializes a collider builder with a triangle shape.
pub fn trimesh(vertices: Vec<Point<f32>>, indices: Vec<Point3<u32>>) -> Self
[src]
Initializes a collider builder with a triangle mesh shape defined by its vertex and index buffers.
pub fn heightfield(heights: DMatrix<f32>, scale: Vector<f32>) -> Self
[src]
Initializes a collider builder with a heightfield shape defined by its set of height and a scale factor along each coordinate axis.
pub fn default_friction() -> f32
[src]
The default friction coefficient used by the collider builder.
pub fn user_data(self, data: u128) -> Self
[src]
Sets an arbitrary user-defined 128-bit integer associated to the colliders built by this builder.
pub fn collision_groups(self, groups: InteractionGroups) -> Self
[src]
Sets the collision groups used by this collider.
Two colliders will interact iff. their collision groups are compatible. See InteractionGroups::test for details.
pub fn solver_groups(self, groups: InteractionGroups) -> Self
[src]
Sets the solver groups used by this collider.
Forces between two colliders in contact will be computed iff their solver groups are compatible. See InteractionGroups::test for details.
pub fn sensor(self, is_sensor: bool) -> Self
[src]
Sets whether or not the collider built by this builder is a sensor.
pub fn friction(self, friction: f32) -> Self
[src]
Sets the friction coefficient of the collider this builder will build.
pub fn restitution(self, restitution: f32) -> Self
[src]
Sets the restitution coefficient of the collider this builder will build.
pub fn density(self, density: f32) -> Self
[src]
Sets the density of the collider this builder will build.
pub fn translation(self, x: f32, y: f32, z: f32) -> Self
[src]
Sets the initial translation of the collider to be created, relative to the rigid-body it is attached to.
pub fn rotation(self, angle: AngVector<f32>) -> Self
[src]
Sets the initial orientation of the collider to be created, relative to the rigid-body it is attached to.
pub fn position(self, pos: Isometry<f32>) -> Self
[src]
Sets the initial position (translation and orientation) of the collider to be created, relative to the rigid-body it is attached to.
pub fn delta(self, delta: Isometry<f32>) -> Self
[src]
Use .position
instead.
Set the position of this collider in the local-space of the rigid-body it is attached to.
pub fn build(&self) -> Collider
[src]
Builds a new collider attached to the given rigid-body.
Trait Implementations
impl Clone for ColliderBuilder
[src]
fn clone(&self) -> ColliderBuilder
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl !RefUnwindSafe for ColliderBuilder
impl Send for ColliderBuilder
impl Sync for ColliderBuilder
impl Unpin for ColliderBuilder
impl !UnwindSafe for ColliderBuilder
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
pub fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
[src]
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
pub fn as_any(&self) -> &(dyn Any + 'static)
[src]
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> DowncastSync for T where
T: Send + Sync + Any,
[src]
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> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
[src]
pub fn is_in_subset(&self) -> bool
[src]
pub fn to_subset_unchecked(&self) -> SS
[src]
pub fn from_subset(element: &SS) -> SP
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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.
pub 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.
pub 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>,