Trait Sim

Source
pub trait Sim {
    // Required methods
    fn draw_geom(
        &self,
        geom: *mut dxGeom,
        pos: Option<*const f64>,
        rot: Option<*const f64>,
        ws: i32,
    );
    fn draw_objects(&mut self);
    fn start_callback(&mut self);
    fn near_callback(
        &mut self,
        dat: *mut c_void,
        o1: *mut dxGeom,
        o2: *mut dxGeom,
    );
    fn step_callback(&mut self, pause: i32);
    fn command_callback(&mut self, cmd: i32);
    fn stop_callback(&mut self);

    // Provided methods
    fn super_mut(&mut self) -> &mut ODE { ... }
    fn super_get(&self) -> &ODE { ... }
    fn set_pos_R(&mut self, b: *mut dxBody, p: [f64; 4], m: [f64; 12]) { ... }
    fn set_pos_Q(&mut self, b: *mut dxBody, p: [f64; 4], q: [f64; 4]) { ... }
}
Expand description

trait Sim must have callback functions

Required Methods§

Source

fn draw_geom( &self, geom: *mut dxGeom, pos: Option<*const f64>, rot: Option<*const f64>, ws: i32, )

draw_geom function

Source

fn draw_objects(&mut self)

draw default function

Source

fn start_callback(&mut self)

start default callback function

Source

fn near_callback(&mut self, dat: *mut c_void, o1: *mut dxGeom, o2: *mut dxGeom)

near default callback function

Source

fn step_callback(&mut self, pause: i32)

step default callback function

Source

fn command_callback(&mut self, cmd: i32)

command default callback function

Source

fn stop_callback(&mut self)

stop default callback function

Provided Methods§

Source

fn super_mut(&mut self) -> &mut ODE

self.super mutable

Source

fn super_get(&self) -> &ODE

self.super immutable

Source

fn set_pos_R(&mut self, b: *mut dxBody, p: [f64; 4], m: [f64; 12])

set pos and rotation (dMatrix3)

Source

fn set_pos_Q(&mut self, b: *mut dxBody, p: [f64; 4], q: [f64; 4])

set pos and rotation (dQuaternion)

Implementors§

Source§

impl Sim for ODE

trait Sim must have callback functions