Struct Obg

Source
pub struct Obg {
    pub key: String,
    pub col: [f64; 4],
    /* private fields */
}
Expand description

object(s) of ODE, obgs: HashMap<dBodyID, Obg>

Fields§

§key: String

key

§col: [f64; 4]

color (low priority obg.col < tcm.col)

Implementations§

Source§

impl Obg

body geom

Source

pub fn new( key: &str, body: *mut dxBody, geom: *mut dxGeom, col: [f64; 4], ) -> Obg

construct

Source

pub fn body_(&mut self, id: *mut dxBody)

setter

Source

pub fn body(&self) -> *mut dxBody

getter

Source

pub fn geom_(&mut self, id: *mut dxGeom)

setter

Source

pub fn geom(&self) -> *mut dxGeom

getter

Source

pub fn get_mass_by_id(id: *mut dxBody, mass: &mut dMass)

get mass to mut dMass by id

Source

pub fn get_mass(&self, mass: &mut dMass)

get mass to mut dMass

Source

pub fn get_linear_vel_mut_by_id(id: *mut dxBody) -> [f64; 4]

get linear vel dVector3 as mut by id

Source

pub fn linear_vel_ptr_mut(&mut self) -> *mut [f64; 4]

linear vel dVector3 as *mut [dReal; 4]

Source

pub fn linear_vel_(&mut self) -> &mut [f64]

linear vel dVector3 as &mut dReal 4 usize

Source

pub fn linear_vel(&self) -> &[f64]

linear vel dVector3 as &dReal 4 usize

Source

pub fn linear_vel_vec(&self) -> ODEMat<'_>

linear vel dVector3 as ODEMat

Source

pub fn get_angular_vel_mut_by_id(id: *mut dxBody) -> [f64; 4]

get angular vel dVector3 as mut by id

Source

pub fn angular_vel_ptr_mut(&mut self) -> *mut [f64; 4]

angular vel dVector3 as *mut [dReal; 4]

Source

pub fn angular_vel_(&mut self) -> &mut [f64]

angular vel dVector3 as &mut dReal 4 usize

Source

pub fn angular_vel(&self) -> &[f64]

angular vel dVector3 as &dReal 4 usize

Source

pub fn angular_vel_vec(&self) -> ODEMat<'_>

angular vel dVector3 as ODEMat

Source

pub fn get_pos_mut_by_id(id: *mut dxBody) -> [f64; 4]

get pos dVector3 as mut by id

Source

pub fn pos_ptr_mut(&mut self) -> *mut [f64; 4]

pos dVector3 as *mut [dReal; 4]

Source

pub fn pos_(&mut self) -> &mut [f64]

pos dVector3 as &mut dReal 4 usize

Source

pub fn pos(&self) -> &[f64]

pos dVector3 as &dReal 4 usize

Source

pub fn pos_vec(&self) -> ODEMat<'_>

pos dVector3 as ODEMat

Source

pub fn get_quaternion_mut_by_id(id: *mut dxBody) -> [f64; 4]

get quaternion dVector4 as mut by id

Source

pub fn quaternion_ptr_mut(&mut self) -> *mut [f64; 4]

quaternion dQuaternion as *mut [dReal; 4]

Source

pub fn quaternion_(&mut self) -> &mut [f64]

quaternion dQuaternion as &mut dReal 4 usize

Source

pub fn quaternion(&self) -> &[f64]

quaternion dQuaternion as &dReal 4 usize

Source

pub fn quaternion_vec(&self) -> ODEMat<'_>

quaternion dQuaternion as ODEMat

Source

pub fn get_rot_mut_by_id(id: *mut dxBody) -> [f64; 12]

get rot dMatrix3 as mut by id

Source

pub fn rot_ptr_mut(&mut self) -> *mut [[f64; 4]; 3]

rot dMatrix3 as *mut [[dReal; 4]; 3]

Source

pub fn rot_(&mut self) -> &mut [f64]

rot dMatrix3 as &mut dReal 12 usize

Source

pub fn rot(&self) -> &[f64]

rot dMatrix3 as &dReal 12 usize

Source

pub fn rot_mat3(&self) -> ODEMat<'_>

rot dMatrix3 as ODEMat

Source

pub fn set_mass_by_id(id: *mut dxBody, mass: &dMass)

set mass by id

Source

pub fn set_mass(&mut self, mass: &dMass) -> &mut Obg

set mass

Source

pub fn set_linear_vel_by_id(id: *mut dxBody, xyz: &[f64; 4])

set linear vel by id

Source

pub fn set_linear_vel(&mut self, xyz: [f64; 4]) -> &mut Obg

set linear vel

Source

pub fn set_angular_vel_by_id(id: *mut dxBody, xyz: &[f64; 4])

set angular vel by id

Source

pub fn set_angular_vel(&mut self, xyz: [f64; 4]) -> &mut Obg

set angular vel

Source

pub fn set_pos_by_id(id: *mut dxBody, pos: &[f64; 4])

set position by id

Source

pub fn set_pos(&mut self, pos: [f64; 4]) -> &mut Obg

set position

Source

pub fn set_quaternion_by_id(id: *mut dxBody, q: &[f64; 4])

set quaternion by id

Source

pub fn set_quaternion(&mut self, q: [f64; 4]) -> &mut Obg

set quaternion

Source

pub fn set_rot_by_id(id: *mut dxBody, rot: &[f64; 12])

set rotation by id

Source

pub fn set_rot(&mut self, rot: [f64; 12]) -> &mut Obg

set rotation

Source

pub fn set_torque_by_id(id: *mut dxBody, t: &[f64; 3])

set torque by id

Source

pub fn set_torque(&mut self, t: [f64; 3]) -> &mut Obg

set torque

Source

pub fn add_torque_by_id(id: *mut dxBody, t: &[f64; 3])

add torque by id

Source

pub fn add_torque(&mut self, t: [f64; 3]) -> &mut Obg

add torque

Source

pub fn add_rel_torque_by_id(id: *mut dxBody, t: &[f64; 3])

add rel torque by id

Source

pub fn add_rel_torque(&mut self, t: [f64; 3]) -> &mut Obg

add rel torque

Source

pub fn set_force_by_id(id: *mut dxBody, f: &[f64; 3])

set force by id

Source

pub fn set_force(&mut self, f: [f64; 3]) -> &mut Obg

set force

Source

pub fn add_force_by_id(id: *mut dxBody, f: &[f64; 3])

add force by id

Source

pub fn add_force(&mut self, f: [f64; 3]) -> &mut Obg

add force

Source

pub fn add_rel_force_by_id(id: *mut dxBody, f: &[f64; 3])

add rel force by id

Source

pub fn add_rel_force(&mut self, f: [f64; 3]) -> &mut Obg

add rel force

Source

pub fn add_force_at_by_id(id: *mut dxBody, f: &[f64; 3], p: &[f64; 3])

add force at pos by id

Source

pub fn add_force_at(&mut self, f: [f64; 3], p: [f64; 3]) -> &mut Obg

add force at pos

Source

pub fn add_rel_force_at_by_id(id: *mut dxBody, f: &[f64; 3], p: &[f64; 3])

add rel force at pos by id

Source

pub fn add_rel_force_at(&mut self, f: [f64; 3], p: [f64; 3]) -> &mut Obg

add rel force at pos

Source

pub fn add_force_rel_by_id(id: *mut dxBody, f: &[f64; 3], p: &[f64; 3])

add force at rel pos by id

Source

pub fn add_force_rel(&mut self, f: [f64; 3], p: [f64; 3]) -> &mut Obg

add force at rel pos

Source

pub fn add_rel_force_rel_by_id(id: *mut dxBody, f: &[f64; 3], p: &[f64; 3])

add rel force at rel pos by id

Source

pub fn add_rel_force_rel(&mut self, f: [f64; 3], p: [f64; 3]) -> &mut Obg

add rel force at rel pos

Source

pub fn is_enabled(&self) -> bool

is enabled

Source

pub fn disable(&mut self)

disable

Source

pub fn enable(&mut self)

enable

Auto Trait Implementations§

§

impl Freeze for Obg

§

impl RefUnwindSafe for Obg

§

impl Send for Obg

§

impl Sync for Obg

§

impl Unpin for Obg

§

impl UnwindSafe for Obg

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.