pub struct GeomInstance {
pub name: Option<String>,
pub origin: SpatialTransform<f64>,
pub geometry: Geometry,
}Expand description
A geometry placed at an offset within a body frame.
Fields§
§name: Option<String>Optional name from the source file.
origin: SpatialTransform<f64>Placement of the shape within the body frame.
Follows the same convention as crate::Joint::parent_to_joint:
origin.pos is the shape origin expressed in body coordinates and
origin.rot is the coordinate transform body → shape, so the shape’s
orientation in the body frame is origin.rot.transpose().
geometry: GeometryThe shape itself.
Implementations§
Source§impl GeomInstance
impl GeomInstance
Sourcepub fn new(geometry: Geometry, origin: SpatialTransform<f64>) -> GeomInstance
pub fn new(geometry: Geometry, origin: SpatialTransform<f64>) -> GeomInstance
Create a geom instance at the given offset.
Sourcepub fn centered(geometry: Geometry) -> GeomInstance
pub fn centered(geometry: Geometry) -> GeomInstance
Create a geom instance centred on the body frame.
Sourcepub fn is_centered(&self) -> bool
pub fn is_centered(&self) -> bool
True if this shape sits exactly on the body frame.
Trait Implementations§
Source§impl Clone for GeomInstance
impl Clone for GeomInstance
Source§fn clone(&self) -> GeomInstance
fn clone(&self) -> GeomInstance
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 moreAuto Trait Implementations§
impl Freeze for GeomInstance
impl RefUnwindSafe for GeomInstance
impl Send for GeomInstance
impl Sync for GeomInstance
impl Unpin for GeomInstance
impl UnsafeUnpin for GeomInstance
impl UnwindSafe for GeomInstance
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