Struct k::node::NodeBuilder
source · pub struct NodeBuilder<T: RealField> { /* private fields */ }
Expand description
Build a Link<T>
§Examples
use k::*;
let l0 = NodeBuilder::new()
.name("link_pitch")
.translation(Translation3::new(0.0, 0.1, 0.0))
.joint_type( JointType::Rotational{axis: Vector3::y_axis()})
.finalize();
println!("{l0:?}");
Implementations§
source§impl<T> NodeBuilder<T>
impl<T> NodeBuilder<T>
pub fn new() -> NodeBuilder<T>
sourcepub fn name(self, name: &str) -> NodeBuilder<T>
pub fn name(self, name: &str) -> NodeBuilder<T>
Set the name of the Link
sourcepub fn joint_type(self, joint_type: JointType<T>) -> NodeBuilder<T>
pub fn joint_type(self, joint_type: JointType<T>) -> NodeBuilder<T>
Set the joint which is connected to this link
sourcepub fn limits(self, limits: Option<Range<T>>) -> NodeBuilder<T>
pub fn limits(self, limits: Option<Range<T>>) -> NodeBuilder<T>
Set joint limits
sourcepub fn origin(self, origin: Isometry3<T>) -> NodeBuilder<T>
pub fn origin(self, origin: Isometry3<T>) -> NodeBuilder<T>
Set the origin transform of this joint
sourcepub fn translation(self, translation: Translation3<T>) -> NodeBuilder<T>
pub fn translation(self, translation: Translation3<T>) -> NodeBuilder<T>
Set the translation of the origin transform of this joint
sourcepub fn rotation(self, rotation: UnitQuaternion<T>) -> NodeBuilder<T>
pub fn rotation(self, rotation: UnitQuaternion<T>) -> NodeBuilder<T>
Set the rotation of the origin transform of this joint
Trait Implementations§
source§impl<T: Clone + RealField> Clone for NodeBuilder<T>
impl<T: Clone + RealField> Clone for NodeBuilder<T>
source§fn clone(&self) -> NodeBuilder<T>
fn clone(&self) -> NodeBuilder<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<T> Freeze for NodeBuilder<T>where
T: Freeze,
impl<T> RefUnwindSafe for NodeBuilder<T>where
T: RefUnwindSafe,
impl<T> Send for NodeBuilder<T>
impl<T> Sync for NodeBuilder<T>
impl<T> Unpin for NodeBuilder<T>where
T: Unpin,
impl<T> UnwindSafe for NodeBuilder<T>where
T: UnwindSafe,
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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.