pub struct JointKind {
pub joint: Joint,
pub limits: [Limits; 4],
}Expand description
How a joint lets its second body move against its first: which joint
of the table it is (Joint), and the limits of its coordinates.
Serializes flat, the limits of only those limited, by name: {"type": "revolute", "limits": {"angle": {"min": -90.0, "max": 90.0}}}.
Fields§
§joint: Joint§limits: [Limits; 4]The limits of each coordinate, by Motion::index.
Implementations§
Source§impl JointKind
impl JointKind
Sourcepub fn limited(self, motion: Motion, limits: Limits) -> Self
pub fn limited(self, motion: Motion, limits: Limits) -> Self
It with the coordinate of motion kept within limits.
Sourcepub fn turning(&self) -> Turning
pub fn turning(&self) -> Turning
How it lets the second frame turn (see Joint::frees).
Sourcepub fn limits(&self, motion: Motion) -> [Option<Scalar>; 2]
pub fn limits(&self, motion: Motion) -> [Option<Scalar>; 2]
The limits of motion’s coordinate, [min, max], either missing.
pub fn label(&self) -> &'static str
Sourcepub fn validate(&self) -> GeopResult<()>
pub fn validate(&self) -> GeopResult<()>
Checks it limits only coordinates it frees, and each the right way round.
Trait Implementations§
impl Copy for JointKind
Source§impl<'de> Deserialize<'de> for JointKind
impl<'de> Deserialize<'de> for JointKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for JointKind
Auto Trait Implementations§
impl Freeze for JointKind
impl RefUnwindSafe for JointKind
impl Send for JointKind
impl Sync for JointKind
impl Unpin for JointKind
impl UnsafeUnpin for JointKind
impl UnwindSafe for JointKind
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