pub struct LinkBuilder { /* private fields */ }
Expand description
The builder for the Link
type.
The LinkBuilder
is used to construct a Link
.
It can be attached to a pre-existing Link
in a KinematicTree
or a Robot
.
Or a new KinematicTree
can be started with this LinkBuilder
as the blueprint for the root_link
.
This will configure most of the link data:
name
: The string identifier (or name) of thisLink
. For practical purposes, it is recommended to use unique identifiers/names.visuals
(0+): The builders for theVisual
elements associated with thisLink
.colliders
(0+): The builders for theCollision
elements associated with thisLink
.joints
(0+): The buiders for the childJoints
of thisLink
. (This field should be/is assumed as empty on a bareLinkBuilder
, but can optionally be non-empty in aChained<LinkBuilder>
)
This field only be filled when reconstructing or yanking a pre-existingLink
/Joint
.inertial
(Optional): TheInertial
data for thisLink
.
Implementations§
Source§impl LinkBuilder
impl LinkBuilder
Sourcepub fn new(name: impl Into<String>) -> LinkBuilder
pub fn new(name: impl Into<String>) -> LinkBuilder
Create a new LinkBuilder
with the specified name
.
Sourcepub fn add_visual(self, visual: VisualBuilder) -> Self
pub fn add_visual(self, visual: VisualBuilder) -> Self
Adds a VisualBuilder
to this LinkBuilder
.
Sourcepub fn add_collider(self, collider: CollisionBuilder) -> Self
pub fn add_collider(self, collider: CollisionBuilder) -> Self
Adds a CollisionBuilder
to this LinkBuilder
.
Sourcepub fn add_intertial(self, inertial: Inertial) -> Self
pub fn add_intertial(self, inertial: Inertial) -> Self
Sets the Inertial
(inertial
) of this LinkBuilder
.
Sourcepub fn build_tree(self) -> KinematicTree
pub fn build_tree(self) -> KinematicTree
Creates a KinematicTree
by building this LinkBuilder
.
Source§impl LinkBuilder
Non-builder methods
impl LinkBuilder
Non-builder methods
Sourcepub fn visuals(&self) -> &Vec<VisualBuilder>
pub fn visuals(&self) -> &Vec<VisualBuilder>
Gets a reference to the visuals
of this LinkBuilder
.
Sourcepub fn visuals_mut(&mut self) -> &mut Vec<VisualBuilder>
pub fn visuals_mut(&mut self) -> &mut Vec<VisualBuilder>
Gets a mutable reference to the visuals
of this LinkBuilder
.
Sourcepub fn colliders(&self) -> &Vec<CollisionBuilder>
pub fn colliders(&self) -> &Vec<CollisionBuilder>
Gets a reference to the colliders
of this LinkBuilder
.
Sourcepub fn colliders_mut(&mut self) -> &mut Vec<CollisionBuilder>
pub fn colliders_mut(&mut self) -> &mut Vec<CollisionBuilder>
Gets a mutable reference to the colliders
of this LinkBuilder
.
Sourcepub fn joints(&self) -> &Vec<JointBuilder>
pub fn joints(&self) -> &Vec<JointBuilder>
Gets a reference to the joints
of this LinkBuilder
.
Trait Implementations§
Source§impl Clone for LinkBuilder
impl Clone for LinkBuilder
Source§fn clone(&self) -> LinkBuilder
fn clone(&self) -> LinkBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for LinkBuilder
impl Debug for LinkBuilder
Source§impl Default for LinkBuilder
impl Default for LinkBuilder
Source§fn default() -> LinkBuilder
fn default() -> LinkBuilder
Source§impl From<Chained<LinkBuilder>> for LinkBuilder
impl From<Chained<LinkBuilder>> for LinkBuilder
Source§fn from(value: Chained<LinkBuilder>) -> Self
fn from(value: Chained<LinkBuilder>) -> Self
Source§impl From<LinkBuilder> for Chained<LinkBuilder>
Since Link’s can end a chain, a LinkBuilder
can always be converted to a Chained<LinkBuilder>
.
impl From<LinkBuilder> for Chained<LinkBuilder>
Since Link’s can end a chain, a LinkBuilder
can always be converted to a Chained<LinkBuilder>
.
Source§fn from(value: LinkBuilder) -> Self
fn from(value: LinkBuilder) -> Self
Source§impl GroupIDChanger for LinkBuilder
impl GroupIDChanger for LinkBuilder
Source§unsafe fn change_group_id_unchecked(&mut self, new_group_id: &str)
unsafe fn change_group_id_unchecked(&mut self, new_group_id: &str)
Source§fn apply_group_id(&mut self)
fn apply_group_id(&mut self)
GroupID
delimiter replacements. Read moreSource§fn change_group_id(
&mut self,
new_group_id: impl GroupID,
) -> Result<(), GroupIDError>
fn change_group_id( &mut self, new_group_id: impl GroupID, ) -> Result<(), GroupIDError>
Source§impl PartialEq for LinkBuilder
impl PartialEq for LinkBuilder
impl StructuralPartialEq for LinkBuilder
Auto Trait Implementations§
impl Freeze for LinkBuilder
impl !RefUnwindSafe for LinkBuilder
impl Send for LinkBuilder
impl Sync for LinkBuilder
impl Unpin for LinkBuilder
impl !UnwindSafe for LinkBuilder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§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>
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.