pub struct mjsCamera_ { /* private fields */ }Implementations§
Source§impl mjsCamera_
impl mjsCamera_
Source§impl mjsCamera_
impl mjsCamera_
Sourcepub fn alt(&self) -> &MjsOrientation
pub fn alt(&self) -> &MjsOrientation
Return an immutable reference to alternative orientation.
Sourcepub fn alt_mut(&mut self) -> &mut MjsOrientation
pub fn alt_mut(&mut self) -> &mut MjsOrientation
Return a mutable reference to alternative orientation.
Sourcepub fn intrinsic_mut(&mut self) -> &mut [f32; 4]
pub fn intrinsic_mut(&mut self) -> &mut [f32; 4]
Return a mutable reference to intrinsic parameters.
Sourcepub fn sensor_size(&self) -> &[f32; 2]
pub fn sensor_size(&self) -> &[f32; 2]
Return an immutable reference to sensor size.
Sourcepub fn sensor_size_mut(&mut self) -> &mut [f32; 2]
pub fn sensor_size_mut(&mut self) -> &mut [f32; 2]
Return a mutable reference to sensor size.
Sourcepub fn resolution(&self) -> &[i32; 2]
pub fn resolution(&self) -> &[i32; 2]
Return an immutable reference to resolution.
Sourcepub fn resolution_mut(&mut self) -> &mut [i32; 2]
pub fn resolution_mut(&mut self) -> &mut [i32; 2]
Return a mutable reference to resolution.
Sourcepub fn focal_length(&self) -> &[f32; 2]
pub fn focal_length(&self) -> &[f32; 2]
Return an immutable reference to focal length (length).
Sourcepub fn focal_length_mut(&mut self) -> &mut [f32; 2]
pub fn focal_length_mut(&mut self) -> &mut [f32; 2]
Return a mutable reference to focal length (length).
Sourcepub fn focal_pixel(&self) -> &[f32; 2]
pub fn focal_pixel(&self) -> &[f32; 2]
Return an immutable reference to focal length (pixel).
Sourcepub fn focal_pixel_mut(&mut self) -> &mut [f32; 2]
pub fn focal_pixel_mut(&mut self) -> &mut [f32; 2]
Return a mutable reference to focal length (pixel).
Sourcepub fn principal_length(&self) -> &[f32; 2]
pub fn principal_length(&self) -> &[f32; 2]
Return an immutable reference to principal point (length).
Sourcepub fn principal_length_mut(&mut self) -> &mut [f32; 2]
pub fn principal_length_mut(&mut self) -> &mut [f32; 2]
Return a mutable reference to principal point (length).
Sourcepub fn principal_pixel(&self) -> &[f32; 2]
pub fn principal_pixel(&self) -> &[f32; 2]
Return an immutable reference to principal point (pixel).
Sourcepub fn principal_pixel_mut(&mut self) -> &mut [f32; 2]
pub fn principal_pixel_mut(&mut self) -> &mut [f32; 2]
Return a mutable reference to principal point (pixel).
Sourcepub fn with_pos(&mut self, value: [f64; 3]) -> &mut Self
pub fn with_pos(&mut self, value: [f64; 3]) -> &mut Self
Builder method for setting camera position.
Sourcepub fn with_quat(&mut self, value: [f64; 4]) -> &mut Self
pub fn with_quat(&mut self, value: [f64; 4]) -> &mut Self
Builder method for setting camera orientation.
Sourcepub fn with_alt(&mut self, value: MjsOrientation) -> &mut Self
pub fn with_alt(&mut self, value: MjsOrientation) -> &mut Self
Builder method for setting alternative orientation.
Sourcepub fn with_intrinsic(&mut self, value: [f32; 4]) -> &mut Self
pub fn with_intrinsic(&mut self, value: [f32; 4]) -> &mut Self
Builder method for setting intrinsic parameters.
Sourcepub fn with_sensor_size(&mut self, value: [f32; 2]) -> &mut Self
pub fn with_sensor_size(&mut self, value: [f32; 2]) -> &mut Self
Builder method for setting sensor size.
Sourcepub fn with_resolution(&mut self, value: [i32; 2]) -> &mut Self
pub fn with_resolution(&mut self, value: [i32; 2]) -> &mut Self
Builder method for setting resolution.
Sourcepub fn with_focal_length(&mut self, value: [f32; 2]) -> &mut Self
pub fn with_focal_length(&mut self, value: [f32; 2]) -> &mut Self
Builder method for setting focal length (length).
Sourcepub fn with_focal_pixel(&mut self, value: [f32; 2]) -> &mut Self
pub fn with_focal_pixel(&mut self, value: [f32; 2]) -> &mut Self
Builder method for setting focal length (pixel).
Sourcepub fn with_principal_length(&mut self, value: [f32; 2]) -> &mut Self
pub fn with_principal_length(&mut self, value: [f32; 2]) -> &mut Self
Builder method for setting principal point (length).
Sourcepub fn with_principal_pixel(&mut self, value: [f32; 2]) -> &mut Self
pub fn with_principal_pixel(&mut self, value: [f32; 2]) -> &mut Self
Builder method for setting principal point (pixel).
Sourcepub fn mode(&self) -> MjtCamLight
pub fn mode(&self) -> MjtCamLight
Return value of camera mode.
Sourcepub fn proj(&self) -> MjtProjection
pub fn proj(&self) -> MjtProjection
Return value of camera projection type.
Sourcepub fn set_mode(&mut self, value: MjtCamLight)
pub fn set_mode(&mut self, value: MjtCamLight)
Set camera mode.
Sourcepub fn set_proj(&mut self, value: MjtProjection)
pub fn set_proj(&mut self, value: MjtProjection)
Set camera projection type.
Sourcepub fn set_output(&mut self, value: i32)
pub fn set_output(&mut self, value: i32)
Set bit flags for output type.
Sourcepub fn with_mode(&mut self, value: MjtCamLight) -> &mut Self
pub fn with_mode(&mut self, value: MjtCamLight) -> &mut Self
Builder method for setting camera mode.
Sourcepub fn with_fovy(&mut self, value: f64) -> &mut Self
pub fn with_fovy(&mut self, value: f64) -> &mut Self
Builder method for setting field of view in y direction.
Sourcepub fn with_ipd(&mut self, value: f64) -> &mut Self
pub fn with_ipd(&mut self, value: f64) -> &mut Self
Builder method for setting inter-pupillary distance for stereo.
Sourcepub fn with_proj(&mut self, value: MjtProjection) -> &mut Self
pub fn with_proj(&mut self, value: MjtProjection) -> &mut Self
Builder method for setting camera projection type.
Sourcepub fn with_output(&mut self, value: i32) -> &mut Self
pub fn with_output(&mut self, value: i32) -> &mut Self
Builder method for setting bit flags for output type.
Sourcepub fn set_userdata<T: AsRef<[f64]>>(&mut self, value: T)
pub fn set_userdata<T: AsRef<[f64]>>(&mut self, value: T)
Set userdata.
Sourcepub fn with_userdata<T: AsRef<[f64]>>(&mut self, value: T) -> &mut Self
pub fn with_userdata<T: AsRef<[f64]>>(&mut self, value: T) -> &mut Self
Builder method for setting userdata.
Sourcepub fn targetbody(&self) -> &str
pub fn targetbody(&self) -> &str
Return target body for tracking/targeting.
§Panics
Panics if the stored string is not valid UTF-8, which can only happen on internal memory corruption – MuJoCo only uses ASCII values.
Sourcepub fn set_targetbody(&mut self, value: &str)
pub fn set_targetbody(&mut self, value: &str)
Set target body for tracking/targeting.
§Panics
When the value contains ‘\0’ characters, a panic occurs.
Sourcepub fn with_targetbody(&mut self, value: &str) -> &mut Self
pub fn with_targetbody(&mut self, value: &str) -> &mut Self
Builder method for setting target body for tracking/targeting.
§Panics
When the value contains ‘\0’ characters, a panic occurs.
Trait Implementations§
Auto Trait Implementations§
impl !Send for mjsCamera_
impl !Sync for mjsCamera_
impl Freeze for mjsCamera_
impl RefUnwindSafe for mjsCamera_
impl Unpin for mjsCamera_
impl UnsafeUnpin for mjsCamera_
impl UnwindSafe for mjsCamera_
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.