pub struct CuAttachedShape {
pub id: CuObjectId,
pub frame: Option<usize>,
pub shape: CuCollisionShape,
}Expand description
A collision shape rigidly attached to a robot frame or the base.
Fields§
§id: CuObjectIdStable typed identifier of this attached object.
frame: Option<usize>Joint-frame index this shape is attached to (0..N), or None for the base frame.
shape: CuCollisionShapeCollision geometry expressed in the local coordinates of frame.
Implementations§
Source§impl CuAttachedShape
impl CuAttachedShape
Sourcepub fn new(
id: CuObjectId,
frame: Option<usize>,
shape: CuCollisionShape,
) -> CuResult<Self>
pub fn new( id: CuObjectId, frame: Option<usize>, shape: CuCollisionShape, ) -> CuResult<Self>
Creates an attached shape, validating ID and geometry. The frame index is checked against the robot when the shape is used.
Sourcepub fn with_transform(
self,
frame_from_shape: &Transform3D<f64>,
) -> CuResult<Self>
pub fn with_transform( self, frame_from_shape: &Transform3D<f64>, ) -> CuResult<Self>
Re-expresses the shape through a frame-relative transform (frame_from_shape),
rejecting non-finite transforms and results.
Trait Implementations§
Source§impl<'__de, __Context> BorrowDecode<'__de, __Context> for CuAttachedShape
impl<'__de, __Context> BorrowDecode<'__de, __Context> for CuAttachedShape
Source§fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>(
decoder: &mut __D,
) -> Result<Self, DecodeError>
fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>( decoder: &mut __D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given BorrowDecode.
Source§impl Clone for CuAttachedShape
impl Clone for CuAttachedShape
Source§fn clone(&self) -> CuAttachedShape
fn clone(&self) -> CuAttachedShape
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CuAttachedShape
Source§impl Debug for CuAttachedShape
impl Debug for CuAttachedShape
Source§impl<__Context> Decode<__Context> for CuAttachedShape
impl<__Context> Decode<__Context> for CuAttachedShape
Source§impl Default for CuAttachedShape
impl Default for CuAttachedShape
Source§fn default() -> CuAttachedShape
fn default() -> CuAttachedShape
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CuAttachedShape
impl<'de> Deserialize<'de> for CuAttachedShape
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
Source§impl Encode for CuAttachedShape
impl Encode for CuAttachedShape
Source§impl PartialEq for CuAttachedShape
impl PartialEq for CuAttachedShape
Source§impl Serialize for CuAttachedShape
impl Serialize for CuAttachedShape
impl StructuralPartialEq for CuAttachedShape
Source§impl TypePath for CuAttachedShape
impl TypePath for CuAttachedShape
fn type_path() -> &'static str
fn short_type_path() -> &'static str
fn type_ident() -> Option<&'static str>
fn crate_name() -> Option<&'static str>
fn module_path() -> Option<&'static str>
Auto Trait Implementations§
impl Freeze for CuAttachedShape
impl RefUnwindSafe for CuAttachedShape
impl Send for CuAttachedShape
impl Sync for CuAttachedShape
impl Unpin for CuAttachedShape
impl UnsafeUnpin for CuAttachedShape
impl UnwindSafe for CuAttachedShape
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,
impl<T> CuMsgPayload for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> ElementType for T
impl<T> ElementType for T
impl<T> GetTypeRegistration for T
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> ⓘ
Converts
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> ⓘ
Converts
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 more