pub struct LoadModelFlags(/* private fields */);Expand description
Use flag for loading the model. Flags can be combined with the |-operator.
Example:
let flags = LoadModelFlags::URDF_ENABLE_CACHED_GRAPHICS_SHAPES | LoadModelFlags::URDF_PRINT_URDF_INFO;
assert!(flags.contains(LoadModelFlags::URDF_PRINT_URDF_INFO));Implementations§
Source§impl LoadModelFlags
impl LoadModelFlags
Sourcepub const URDF_USE_INERTIA_FROM_FILE: Self
pub const URDF_USE_INERTIA_FROM_FILE: Self
Use the inertia tensor provided in the URDF.
By default, Bullet will recompute the inertial tensor based on the mass and volume of the collision shape. Use this is you can provide a more accurate inertia tensor.
Sourcepub const URDF_USE_SELF_COLLISION: Self
pub const URDF_USE_SELF_COLLISION: Self
Enables self-collision.
pub const URDF_USE_SELF_COLLISION_EXCLUDE_PARENT: Self
Sourcepub const URDF_USE_SELF_COLLISION_EXCLUDE_ALL_PARENTS: Self
pub const URDF_USE_SELF_COLLISION_EXCLUDE_ALL_PARENTS: Self
will discard self-collisions between a child link and any of its ancestors
(parents, parents of parents, up to the base).
Needs to be used together with URDF_USE_SELF_COLLISION.
pub const URDF_RESERVED: Self
Sourcepub const URDF_USE_IMPLICIT_CYLINDER: Self
pub const URDF_USE_IMPLICIT_CYLINDER: Self
will use a smooth implicit cylinder. By default, Bullet will tesselate the cylinder into a convex hull.
pub const URDF_GLOBAL_VELOCITIES_MB: Self
pub const MJCF_COLORS_FROM_FILE: Self
Sourcepub const URDF_ENABLE_CACHED_GRAPHICS_SHAPES: Self
pub const URDF_ENABLE_CACHED_GRAPHICS_SHAPES: Self
Caches as reuses graphics shapes. This will decrease loading times for similar objects
Sourcepub const URDF_ENABLE_SLEEPING: Self
pub const URDF_ENABLE_SLEEPING: Self
Allow the disabling of simulation after a body hasn’t moved for a while.
Interaction with active bodies will re-enable simulation.
Sourcepub const URDF_INITIALIZE_SAT_FEATURES: Self
pub const URDF_INITIALIZE_SAT_FEATURES: Self
will create triangle meshes for convex shapes. This will improve visualization and also allow usage of the separating axis test (SAT) instead of GJK/EPA. Requires to enable_SAT using set_physics_engine_parameter. TODO
Sourcepub const URDF_USE_SELF_COLLISION_INCLUDE_PARENT: Self
pub const URDF_USE_SELF_COLLISION_INCLUDE_PARENT: Self
will enable collision between child and parent, it is disabled by default.
Needs to be used together with URDF_USE_SELF_COLLISION flag.
pub const URDF_PARSE_SENSORS: Self
Sourcepub const URDF_USE_MATERIAL_COLORS_FROM_MTL: Self
pub const URDF_USE_MATERIAL_COLORS_FROM_MTL: Self
will use the RGB color from the Wavefront OBJ file, instead of from the URDF file.
pub const URDF_USE_MATERIAL_TRANSPARANCY_FROM_MTL: Self
Sourcepub const URDF_MAINTAIN_LINK_ORDER: Self
pub const URDF_MAINTAIN_LINK_ORDER: Self
Try to maintain the link order from the URDF file.
pub const URDF_ENABLE_WAKEUP: Self
Sourcepub const URDF_MERGE_FIXED_LINKS: Self
pub const URDF_MERGE_FIXED_LINKS: Self
this will remove fixed links from the URDF file and merge the resulting links. This is good for performance, since various algorithms (articulated body algorithm, forward kinematics etc) have linear complexity in the number of joints, including fixed joints.
pub const URDF_IGNORE_VISUAL_SHAPES: Self
pub const URDF_IGNORE_COLLISION_SHAPES: Self
pub const URDF_PRINT_URDF_INFO: Self
pub const URDF_GOOGLEY_UNDEFINED_COLORS: Self
Source§impl LoadModelFlags
impl LoadModelFlags
Sourcepub const fn bits(&self) -> i32
pub const fn bits(&self) -> i32
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
Sourcepub const fn from_bits(bits: i32) -> Option<Self>
pub const fn from_bits(bits: i32) -> Option<Self>
Convert from a bits value.
This method will return None if any unknown bits are set.
Sourcepub const fn from_bits_truncate(bits: i32) -> Self
pub const fn from_bits_truncate(bits: i32) -> Self
Convert from a bits value, unsetting any unknown bits.
Sourcepub const fn from_bits_retain(bits: i32) -> Self
pub const fn from_bits_retain(bits: i32) -> Self
Convert from a bits value exactly.
Sourcepub fn from_name(name: &str) -> Option<Self>
pub fn from_name(name: &str) -> Option<Self>
Get a flags value with the bits of a flag with the given name set.
This method will return None if name is empty or doesn’t
correspond to any named flag.
Sourcepub const fn intersects(&self, other: Self) -> bool
pub const fn intersects(&self, other: Self) -> bool
Whether any set bits in a source flags value are also set in a target flags value.
Sourcepub const fn contains(&self, other: Self) -> bool
pub const fn contains(&self, other: Self) -> bool
Whether all set bits in a source flags value are also set in a target flags value.
Sourcepub fn remove(&mut self, other: Self)
pub fn remove(&mut self, other: Self)
The intersection of a source flags value with the complement of a target flags
value (&!).
This method is not equivalent to self & !other when other has unknown bits set.
remove won’t truncate other, but the ! operator will.
Sourcepub fn toggle(&mut self, other: Self)
pub fn toggle(&mut self, other: Self)
The bitwise exclusive-or (^) of the bits in two flags values.
Sourcepub fn set(&mut self, other: Self, value: bool)
pub fn set(&mut self, other: Self, value: bool)
Call insert when value is true or remove when value is false.
Sourcepub const fn intersection(self, other: Self) -> Self
pub const fn intersection(self, other: Self) -> Self
The bitwise and (&) of the bits in two flags values.
Sourcepub const fn union(self, other: Self) -> Self
pub const fn union(self, other: Self) -> Self
The bitwise or (|) of the bits in two flags values.
Sourcepub const fn difference(self, other: Self) -> Self
pub const fn difference(self, other: Self) -> Self
The intersection of a source flags value with the complement of a target flags
value (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
Sourcepub const fn symmetric_difference(self, other: Self) -> Self
pub const fn symmetric_difference(self, other: Self) -> Self
The bitwise exclusive-or (^) of the bits in two flags values.
Sourcepub const fn complement(self) -> Self
pub const fn complement(self) -> Self
The bitwise negation (!) of the bits in a flags value, truncating the result.
Source§impl LoadModelFlags
impl LoadModelFlags
Sourcepub const fn iter(&self) -> Iter<LoadModelFlags>
pub const fn iter(&self) -> Iter<LoadModelFlags>
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
Sourcepub const fn iter_names(&self) -> IterNames<LoadModelFlags>
pub const fn iter_names(&self) -> IterNames<LoadModelFlags>
Yield a set of contained named flags values.
This method is like iter, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
Trait Implementations§
Source§impl Binary for LoadModelFlags
impl Binary for LoadModelFlags
Source§impl BitAnd for LoadModelFlags
impl BitAnd for LoadModelFlags
Source§impl BitAndAssign for LoadModelFlags
impl BitAndAssign for LoadModelFlags
Source§fn bitand_assign(&mut self, other: Self)
fn bitand_assign(&mut self, other: Self)
The bitwise and (&) of the bits in two flags values.
Source§impl BitOr for LoadModelFlags
impl BitOr for LoadModelFlags
Source§fn bitor(self, other: LoadModelFlags) -> Self
fn bitor(self, other: LoadModelFlags) -> Self
The bitwise or (|) of the bits in two flags values.
Source§type Output = LoadModelFlags
type Output = LoadModelFlags
| operator.Source§impl BitOrAssign for LoadModelFlags
impl BitOrAssign for LoadModelFlags
Source§fn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
The bitwise or (|) of the bits in two flags values.
Source§impl BitXor for LoadModelFlags
impl BitXor for LoadModelFlags
Source§impl BitXorAssign for LoadModelFlags
impl BitXorAssign for LoadModelFlags
Source§fn bitxor_assign(&mut self, other: Self)
fn bitxor_assign(&mut self, other: Self)
The bitwise exclusive-or (^) of the bits in two flags values.
Source§impl Clone for LoadModelFlags
impl Clone for LoadModelFlags
Source§fn clone(&self) -> LoadModelFlags
fn clone(&self) -> LoadModelFlags
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LoadModelFlags
impl Debug for LoadModelFlags
Source§impl Extend<LoadModelFlags> for LoadModelFlags
impl Extend<LoadModelFlags> for LoadModelFlags
Source§fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
The bitwise or (|) of the bits in each flags value.
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl Flags for LoadModelFlags
impl Flags for LoadModelFlags
Source§const FLAGS: &'static [Flag<LoadModelFlags>]
const FLAGS: &'static [Flag<LoadModelFlags>]
Source§fn from_bits_retain(bits: i32) -> LoadModelFlags
fn from_bits_retain(bits: i32) -> LoadModelFlags
Source§fn contains_unknown_bits(&self) -> bool
fn contains_unknown_bits(&self) -> bool
true if any unknown bits are set.Source§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
Source§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
Source§fn iter_names(&self) -> IterNames<Self>
fn iter_names(&self) -> IterNames<Self>
Source§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
Source§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
Source§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|) of the bits in two flags values.Source§fn remove(&mut self, other: Self)where
Self: Sized,
fn remove(&mut self, other: Self)where
Self: Sized,
&!). Read moreSource§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^) of the bits in two flags values.Source§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&) of the bits in two flags values.Source§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
&!). Read moreSource§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^) of the bits in two flags values.Source§fn complement(self) -> Self
fn complement(self) -> Self
!) of the bits in a flags value, truncating the result.Source§impl From<LoadModelFlags> for Option<MjcfOptions>
impl From<LoadModelFlags> for Option<MjcfOptions>
Source§fn from(flags: LoadModelFlags) -> Self
fn from(flags: LoadModelFlags) -> Self
Source§impl From<LoadModelFlags> for UrdfOptions
impl From<LoadModelFlags> for UrdfOptions
Source§fn from(flags: LoadModelFlags) -> Self
fn from(flags: LoadModelFlags) -> Self
Source§impl FromIterator<LoadModelFlags> for LoadModelFlags
impl FromIterator<LoadModelFlags> for LoadModelFlags
Source§fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
The bitwise or (|) of the bits in each flags value.
Source§impl IntoIterator for LoadModelFlags
impl IntoIterator for LoadModelFlags
Source§impl LowerHex for LoadModelFlags
impl LowerHex for LoadModelFlags
Source§impl Not for LoadModelFlags
impl Not for LoadModelFlags
Source§impl Octal for LoadModelFlags
impl Octal for LoadModelFlags
Source§impl PublicFlags for LoadModelFlags
impl PublicFlags for LoadModelFlags
Source§impl Sub for LoadModelFlags
impl Sub for LoadModelFlags
Source§fn sub(self, other: Self) -> Self
fn sub(self, other: Self) -> Self
The intersection of a source flags value with the complement of a target flags value (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
Source§type Output = LoadModelFlags
type Output = LoadModelFlags
- operator.Source§impl SubAssign for LoadModelFlags
impl SubAssign for LoadModelFlags
Source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
The intersection of a source flags value with the complement of a target flags value (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
Auto Trait Implementations§
impl Freeze for LoadModelFlags
impl RefUnwindSafe for LoadModelFlags
impl Send for LoadModelFlags
impl Sync for LoadModelFlags
impl Unpin for LoadModelFlags
impl UnwindSafe for LoadModelFlags
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<X> Pipe for X
impl<X> Pipe for X
Source§fn pipe_ref<'a, Return, Function>(&'a self, f: Function) -> Returnwhere
Function: FnOnce(&'a Self) -> Return,
fn pipe_ref<'a, Return, Function>(&'a self, f: Function) -> Returnwhere
Function: FnOnce(&'a Self) -> Return,
Source§fn pipe_mut<'a, Return, Function>(&'a mut self, f: Function) -> Returnwhere
Function: FnOnce(&'a mut Self) -> Return,
fn pipe_mut<'a, Return, Function>(&'a mut self, f: Function) -> Returnwhere
Function: FnOnce(&'a mut Self) -> Return,
Source§fn pipe_as_ref<'a, Param, Return, Function>(&'a self, f: Function) -> Return
fn pipe_as_ref<'a, Param, Return, Function>(&'a self, f: Function) -> Return
f to &self where f takes a single parameter of type Param
and Self implements trait AsRef<Param>. Read moreSource§fn pipe_as_mut<'a, Param, Return, Function>(&'a mut self, f: Function) -> Return
fn pipe_as_mut<'a, Param, Return, Function>(&'a mut self, f: Function) -> Return
f to &mut self where f takes a single parameter of type Param
and Self implements trait AsMut<Param>. Read moreSource§fn pipe_deref<'a, Param, Return, Function>(&'a self, f: Function) -> Return
fn pipe_deref<'a, Param, Return, Function>(&'a self, f: Function) -> Return
f to &self where f takes a single parameter of type Param
and Self implements trait Deref<Target = Param>. Read moreSource§fn pipe_deref_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function,
) -> Returnwhere
Self: DerefMut<Target = Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
fn pipe_deref_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function,
) -> Returnwhere
Self: DerefMut<Target = Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
f to &mut self where f takes a single parameter of type Param
and Self implements trait DerefMut<Target = Param>. Read moreSource§fn pipe_borrow<'a, Param, Return, Function>(&'a self, f: Function) -> Return
fn pipe_borrow<'a, Param, Return, Function>(&'a self, f: Function) -> Return
f to &self where f takes a single parameter of type Param
and Self implements trait Borrow<Param>. Read moreSource§fn pipe_borrow_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function,
) -> Return
fn pipe_borrow_mut<'a, Param, Return, Function>( &'a mut self, f: Function, ) -> Return
f to &mut self where f takes a single parameter of type Param
and Self implements trait BorrowMut<Param>. 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>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.