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
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>
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
source§fn eq(&self, other: &LinkBuilder) -> bool
fn eq(&self, other: &LinkBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for LinkBuilder
Auto Trait Implementations§
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
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§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).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.