pub struct ModelBuilder { /* private fields */ }Expand description
Builder for constructing models.
Implementations§
Source§impl ModelBuilder
impl ModelBuilder
Sourcepub fn add_revolute_body(
self,
name: &str,
parent: i32,
parent_to_joint: SpatialTransform,
inertia: SpatialInertia,
) -> Self
pub fn add_revolute_body( self, name: &str, parent: i32, parent_to_joint: SpatialTransform, inertia: SpatialInertia, ) -> Self
Add a body with a revolute joint attached to the given parent.
parent is the index of the parent body, or -1 for world.
parent_to_joint is the transform from parent body frame to joint frame.
inertia is the body’s spatial inertia in its own frame.
Sourcepub fn add_prismatic_body(
self,
name: &str,
parent: i32,
parent_to_joint: SpatialTransform,
axis: Vec3,
inertia: SpatialInertia,
) -> Self
pub fn add_prismatic_body( self, name: &str, parent: i32, parent_to_joint: SpatialTransform, axis: Vec3, inertia: SpatialInertia, ) -> Self
Add a body with a prismatic joint attached to the given parent.
Sourcepub fn add_spherical_body(
self,
name: &str,
parent: i32,
parent_to_joint: SpatialTransform,
inertia: SpatialInertia,
) -> Self
pub fn add_spherical_body( self, name: &str, parent: i32, parent_to_joint: SpatialTransform, inertia: SpatialInertia, ) -> Self
Add a body with a spherical (ball) joint attached to the given parent.
Sourcepub fn add_free_body(
self,
name: &str,
parent: i32,
parent_to_joint: SpatialTransform,
inertia: SpatialInertia,
) -> Self
pub fn add_free_body( self, name: &str, parent: i32, parent_to_joint: SpatialTransform, inertia: SpatialInertia, ) -> Self
Add a body with a free joint (6 DOF) attached to the given parent.
Sourcepub fn add_fixed_body(
self,
name: &str,
parent: i32,
parent_to_joint: SpatialTransform,
inertia: SpatialInertia,
) -> Self
pub fn add_fixed_body( self, name: &str, parent: i32, parent_to_joint: SpatialTransform, inertia: SpatialInertia, ) -> Self
Add a body with a fixed joint (0 DOF) attached to the given parent.
Sourcepub fn add_body(
self,
name: &str,
parent: i32,
joint: Joint,
inertia: SpatialInertia,
) -> Self
pub fn add_body( self, name: &str, parent: i32, joint: Joint, inertia: SpatialInertia, ) -> Self
Add a generic joint and body.
Sourcepub fn add_free_body_with_geometry(
self,
name: &str,
parent: i32,
parent_to_joint: SpatialTransform,
inertia: SpatialInertia,
geometry: Body,
) -> Self
pub fn add_free_body_with_geometry( self, name: &str, parent: i32, parent_to_joint: SpatialTransform, inertia: SpatialInertia, geometry: Body, ) -> Self
Add a free body with collision geometry (useful for dropping objects).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ModelBuilder
impl RefUnwindSafe for ModelBuilder
impl Send for ModelBuilder
impl Sync for ModelBuilder
impl Unpin for ModelBuilder
impl UnsafeUnpin for ModelBuilder
impl UnwindSafe for ModelBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.