pub struct MjsCompiler { /* private fields */ }Expand description
Compiler options. An opaque handle for the FFI type mjsCompiler, reached through ffi.
Implementations§
Source§impl MjsCompiler
impl MjsCompiler
Sourcepub fn ffi(&self) -> &mjsCompiler
pub fn ffi(&self) -> &mjsCompiler
Returns the FFI struct that the handle stands on.
Sourcepub unsafe fn ffi_mut(&mut self) -> &mut mjsCompiler
pub unsafe fn ffi_mut(&mut self) -> &mut mjsCompiler
Returns the FFI struct that the handle stands on, mutably.
§Safety
The caller must not exchange the contents of the struct with another element’s.
Source§impl MjsCompiler
impl MjsCompiler
Sourcepub fn autolimits(&self) -> bool
pub fn autolimits(&self) -> bool
Check infer “limited” attribute based on range.
Sourcepub fn balanceinertia(&self) -> bool
pub fn balanceinertia(&self) -> bool
Check automatically impose A + B >= C rule.
Sourcepub fn discardvisual(&self) -> bool
pub fn discardvisual(&self) -> bool
Check discard visual geoms in parser.
Sourcepub fn fusestatic(&self) -> bool
pub fn fusestatic(&self) -> bool
Check fuse static bodies with parent.
Sourcepub fn saveinertial(&self) -> bool
pub fn saveinertial(&self) -> bool
Check save explicit inertial clause for all bodies to XML.
Sourcepub fn set_autolimits(&mut self, value: bool)
pub fn set_autolimits(&mut self, value: bool)
Set infer “limited” attribute based on range.
Sourcepub fn set_balanceinertia(&mut self, value: bool)
pub fn set_balanceinertia(&mut self, value: bool)
Set automatically impose A + B >= C rule.
Sourcepub fn set_fitaabb(&mut self, value: bool)
pub fn set_fitaabb(&mut self, value: bool)
Set meshfit to aabb instead of inertia box.
Sourcepub fn set_degree(&mut self, value: bool)
pub fn set_degree(&mut self, value: bool)
Set angles in radians or degrees.
Sourcepub fn set_discardvisual(&mut self, value: bool)
pub fn set_discardvisual(&mut self, value: bool)
Set discard visual geoms in parser.
Sourcepub fn set_usethread(&mut self, value: bool)
pub fn set_usethread(&mut self, value: bool)
Set use multiple threads to speed up compiler.
Sourcepub fn set_fusestatic(&mut self, value: bool)
pub fn set_fusestatic(&mut self, value: bool)
Set fuse static bodies with parent.
Sourcepub fn set_saveinertial(&mut self, value: bool)
pub fn set_saveinertial(&mut self, value: bool)
Set save explicit inertial clause for all bodies to XML.
Sourcepub fn set_alignfree(&mut self, value: bool)
pub fn set_alignfree(&mut self, value: bool)
Set align free joints with inertial frame.
Sourcepub fn with_autolimits(&mut self, value: bool) -> &mut Self
pub fn with_autolimits(&mut self, value: bool) -> &mut Self
Builder method for setting infer “limited” attribute based on range.
Sourcepub fn with_balanceinertia(&mut self, value: bool) -> &mut Self
pub fn with_balanceinertia(&mut self, value: bool) -> &mut Self
Builder method for setting automatically impose A + B >= C rule.
Sourcepub fn with_fitaabb(&mut self, value: bool) -> &mut Self
pub fn with_fitaabb(&mut self, value: bool) -> &mut Self
Builder method for setting meshfit to aabb instead of inertia box.
Sourcepub fn with_degree(&mut self, value: bool) -> &mut Self
pub fn with_degree(&mut self, value: bool) -> &mut Self
Builder method for setting angles in radians or degrees.
Sourcepub fn with_discardvisual(&mut self, value: bool) -> &mut Self
pub fn with_discardvisual(&mut self, value: bool) -> &mut Self
Builder method for setting discard visual geoms in parser.
Sourcepub fn with_usethread(&mut self, value: bool) -> &mut Self
pub fn with_usethread(&mut self, value: bool) -> &mut Self
Builder method for setting use multiple threads to speed up compiler.
Sourcepub fn with_fusestatic(&mut self, value: bool) -> &mut Self
pub fn with_fusestatic(&mut self, value: bool) -> &mut Self
Builder method for setting fuse static bodies with parent.
Sourcepub fn with_saveinertial(&mut self, value: bool) -> &mut Self
pub fn with_saveinertial(&mut self, value: bool) -> &mut Self
Builder method for setting save explicit inertial clause for all bodies to XML.
Sourcepub fn with_alignfree(&mut self, value: bool) -> &mut Self
pub fn with_alignfree(&mut self, value: bool) -> &mut Self
Builder method for setting align free joints with inertial frame.
Sourcepub fn boundinertia(&self) -> f64
pub fn boundinertia(&self) -> f64
Return value of enforce minimum body diagonal inertia.
Sourcepub fn settotalmass(&self) -> f64
pub fn settotalmass(&self) -> f64
Return value of rescale masses and inertias; <=0: ignore.
Sourcepub fn set_boundmass(&mut self, value: f64)
pub fn set_boundmass(&mut self, value: f64)
Set enforce minimum body mass.
Sourcepub fn set_boundinertia(&mut self, value: f64)
pub fn set_boundinertia(&mut self, value: f64)
Set enforce minimum body diagonal inertia.
Sourcepub fn set_settotalmass(&mut self, value: f64)
pub fn set_settotalmass(&mut self, value: f64)
Set rescale masses and inertias; <=0: ignore.
Sourcepub fn with_boundmass(&mut self, value: f64) -> &mut Self
pub fn with_boundmass(&mut self, value: f64) -> &mut Self
Builder method for setting enforce minimum body mass.
Sourcepub fn with_boundinertia(&mut self, value: f64) -> &mut Self
pub fn with_boundinertia(&mut self, value: f64) -> &mut Self
Builder method for setting enforce minimum body diagonal inertia.
Sourcepub fn with_settotalmass(&mut self, value: f64) -> &mut Self
pub fn with_settotalmass(&mut self, value: f64) -> &mut Self
Builder method for setting rescale masses and inertias; <=0: ignore.
Sourcepub fn inertiafromgeom(&self) -> MjtInertiaFromGeom
pub fn inertiafromgeom(&self) -> MjtInertiaFromGeom
Return value of use geom inertias.
Sourcepub fn conflict(&self) -> MjtConflict
pub fn conflict(&self) -> MjtConflict
Return value of conflict-resolution policy for attach.
Sourcepub fn set_inertiafromgeom(&mut self, value: MjtInertiaFromGeom)
pub fn set_inertiafromgeom(&mut self, value: MjtInertiaFromGeom)
Set use geom inertias.
Sourcepub fn set_conflict(&mut self, value: MjtConflict)
pub fn set_conflict(&mut self, value: MjtConflict)
Set conflict-resolution policy for attach.
Sourcepub fn with_inertiafromgeom(&mut self, value: MjtInertiaFromGeom) -> &mut Self
pub fn with_inertiafromgeom(&mut self, value: MjtInertiaFromGeom) -> &mut Self
Builder method for setting use geom inertias.
Sourcepub fn with_conflict(&mut self, value: MjtConflict) -> &mut Self
pub fn with_conflict(&mut self, value: MjtConflict) -> &mut Self
Builder method for setting conflict-resolution policy for attach.
Sourcepub fn inertiagrouprange(&self) -> &[i32; 2]
pub fn inertiagrouprange(&self) -> &[i32; 2]
Return an immutable reference to range of geom groups used to compute inertia.
Sourcepub fn inertiagrouprange_mut(&mut self) -> &mut [i32; 2]
pub fn inertiagrouprange_mut(&mut self) -> &mut [i32; 2]
Return a mutable reference to range of geom groups used to compute inertia.
Sourcepub fn eulerseq(&self) -> &[c_char; 3]
pub fn eulerseq(&self) -> &[c_char; 3]
Return an immutable reference to sequence for euler rotations.
Sourcepub fn eulerseq_mut(&mut self) -> &mut [c_char; 3]
pub fn eulerseq_mut(&mut self) -> &mut [c_char; 3]
Return a mutable reference to sequence for euler rotations.
Sourcepub fn lropt(&self) -> &MjLROpt
pub fn lropt(&self) -> &MjLROpt
Return an immutable reference to options for lengthrange computation.
Sourcepub fn lropt_mut(&mut self) -> &mut MjLROpt
pub fn lropt_mut(&mut self) -> &mut MjLROpt
Return a mutable reference to options for lengthrange computation.
Sourcepub fn with_inertiagrouprange(&mut self, value: [i32; 2]) -> &mut Self
pub fn with_inertiagrouprange(&mut self, value: [i32; 2]) -> &mut Self
Builder method for setting range of geom groups used to compute inertia.
Sourcepub fn with_eulerseq(&mut self, value: [c_char; 3]) -> &mut Self
pub fn with_eulerseq(&mut self, value: [c_char; 3]) -> &mut Self
Builder method for setting sequence for euler rotations.
Sourcepub fn with_lropt(&mut self, value: MjLROpt) -> &mut Self
pub fn with_lropt(&mut self, value: MjLROpt) -> &mut Self
Builder method for setting options for lengthrange computation.
Sourcepub fn set_meshdir(&mut self, value: &str)
pub fn set_meshdir(&mut self, value: &str)
Sourcepub fn with_meshdir(&mut self, value: &str) -> &mut Self
pub fn with_meshdir(&mut self, value: &str) -> &mut Self
Builder method for setting mesh and hfield directory.
§Panics
When the value contains ‘\0’ characters, a panic occurs.
Sourcepub fn texturedir(&self) -> &str
pub fn texturedir(&self) -> &str
Sourcepub fn set_texturedir(&mut self, value: &str)
pub fn set_texturedir(&mut self, value: &str)
Sourcepub fn with_texturedir(&mut self, value: &str) -> &mut Self
pub fn with_texturedir(&mut self, value: &str) -> &mut Self
Builder method for setting texture directory.
§Panics
When the value contains ‘\0’ characters, a panic occurs.
Return value of bitmask of authored compiler fields.
Trait Implementations§
Auto Trait Implementations§
impl !Send for MjsCompiler
impl !Sync for MjsCompiler
impl !Unpin for MjsCompiler
impl Freeze for MjsCompiler
impl RefUnwindSafe for MjsCompiler
impl UnsafeUnpin for MjsCompiler
impl UnwindSafe for MjsCompiler
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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