pub struct MeshGeometry {
pub path: String,
pub bounding_box: (f32, f32, f32),
pub scale: (f32, f32, f32),
}
Fields§
§path: String
This should be a valid package path to a mesh file (e.g. "package://robot_description/mesh/{mesh}"
).
This is unchecked.
You are on your own here.
bounding_box: (f32, f32, f32)
This is the size of the bounding box of the mesh at the current scale
.
The bounding box is expected to be measured such that the center of the bounding box is at the origin.
scale: (f32, f32, f32)
The desired scale off the mesh.
§Important
If this is non-zero you need to pre-calculate the scaled bounding_box
.
Implementations§
Source§impl MeshGeometry
impl MeshGeometry
Sourcepub fn new(
path: impl Into<String>,
bounding_box: (f32, f32, f32),
scale: Option<(f32, f32, f32)>,
) -> Self
pub fn new( path: impl Into<String>, bounding_box: (f32, f32, f32), scale: Option<(f32, f32, f32)>, ) -> Self
Creates a new MeshGeometry
.
§Important
path
should be a valid package path (e.g."package://robot_description/mesh/{mesh}"
). You are on your own here.bounding_box
should be the bounding box at the currentscale
.scale
is either specified or defaults to(1., 1., 1.)
.
Trait Implementations§
Source§impl Clone for MeshGeometry
impl Clone for MeshGeometry
Source§fn clone(&self) -> MeshGeometry
fn clone(&self) -> MeshGeometry
Returns a duplicate 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 moreSource§impl Debug for MeshGeometry
impl Debug for MeshGeometry
Source§impl From<MeshGeometry> for Box<dyn GeometryInterface + Sync + Send>
impl From<MeshGeometry> for Box<dyn GeometryInterface + Sync + Send>
Source§fn from(value: MeshGeometry) -> Self
fn from(value: MeshGeometry) -> Self
Converts to this type from the input type.
Source§impl From<MeshGeometry> for GeometryShapeContainer
impl From<MeshGeometry> for GeometryShapeContainer
Source§fn from(value: MeshGeometry) -> Self
fn from(value: MeshGeometry) -> Self
Converts to this type from the input type.
Source§impl GeometryInterface for MeshGeometry
impl GeometryInterface for MeshGeometry
Source§fn surface_area(&self) -> f32
fn surface_area(&self) -> f32
The surface area of a mesh is approximated by its boundingbox
Source§fn boxed_clone(&self) -> Box<dyn GeometryInterface + Sync + Send>
fn boxed_clone(&self) -> Box<dyn GeometryInterface + Sync + Send>
Allows for Cloning of Boxed Geometries. Read more
Source§fn bounding_box(&self) -> (f32, f32, f32)
fn bounding_box(&self) -> (f32, f32, f32)
Get’s the untransformed boundingbox size of the geometry from it’s center. (X, Y, Z).
Source§fn shape_container(&self) -> GeometryShapeContainer
fn shape_container(&self) -> GeometryShapeContainer
Gets a
GeometryShapeContainer
of the current Shape.Source§impl PartialEq for MeshGeometry
impl PartialEq for MeshGeometry
Source§impl ToURDF for MeshGeometry
impl ToURDF for MeshGeometry
impl StructuralPartialEq for MeshGeometry
Auto Trait Implementations§
impl Freeze for MeshGeometry
impl RefUnwindSafe for MeshGeometry
impl Send for MeshGeometry
impl Sync for MeshGeometry
impl Unpin for MeshGeometry
impl UnwindSafe for MeshGeometry
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<Geometry> BoxedMirror for Geometry
impl<Geometry> BoxedMirror for Geometry
Source§fn boxed_mirrored(
&self,
mirror_matrix: &Matrix<f32, Const<3>, Const<3>, ArrayStorage<f32, 3, 3>>,
) -> Box<dyn GeometryInterface + Sync + Send>
fn boxed_mirrored( &self, mirror_matrix: &Matrix<f32, Const<3>, Const<3>, ArrayStorage<f32, 3, 3>>, ) -> Box<dyn GeometryInterface + Sync + Send>
Performs a
Mirror::mirrored
on a Boxed Implementor.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§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.