[][src]Trait myelin_engine::simulation::world::rotation_translator::NphysicsRotationTranslator

pub trait NphysicsRotationTranslator: Debug {
    fn to_nphysics_rotation(&self, orientation: Radians) -> f64;
fn to_radians(
        &self,
        nphysics_rotation: f64
    ) -> Result<Radians, NphysicsRotationTranslatorError>; }

This trait translates the rotation from Radians to the range (-π; π] defined by nphysics

Required methods

fn to_nphysics_rotation(&self, orientation: Radians) -> f64

Converts an orientation into a representation that is suitable for nphysics

fn to_radians(
    &self,
    nphysics_rotation: f64
) -> Result<Radians, NphysicsRotationTranslatorError>

Converts a rotation that originates from nphysics into Radians

Loading content...

Implementors

impl NphysicsRotationTranslator for NphysicsRotationTranslatorImpl[src]

Loading content...