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>where T: RealField + SubsetOf<f64>,

source

pub fn new() -> NodeBuilder<T>

source

pub fn name(self, name: &str) -> NodeBuilder<T>

Set the name of the Link

source

pub fn joint_type(self, joint_type: JointType<T>) -> NodeBuilder<T>

Set the joint which is connected to this link

source

pub fn limits(self, limits: Option<Range<T>>) -> NodeBuilder<T>

Set joint limits

source

pub fn origin(self, origin: Isometry3<T>) -> NodeBuilder<T>

Set the origin transform of this joint

source

pub fn translation(self, translation: Translation3<T>) -> NodeBuilder<T>

Set the translation of the origin transform of this joint

source

pub fn rotation(self, rotation: UnitQuaternion<T>) -> NodeBuilder<T>

Set the rotation of the origin transform of this joint

source

pub fn finalize(self) -> Joint<T>

Create Joint instance

source

pub fn into_node(self) -> Node<T>

Create Node instead of Joint as output

Trait Implementations§

source§

impl<T: Clone + RealField> Clone for NodeBuilder<T>

source§

fn clone(&self) -> NodeBuilder<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug + RealField> Debug for NodeBuilder<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T> Default for NodeBuilder<T>where T: RealField + SubsetOf<f64>,

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

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> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,

source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
source§

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

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more