pub trait Orientation {
type Rotation;
// Required methods
fn orientation(&self) -> &Self::Rotation;
fn orientation_mut(&mut self) -> &mut Self::Rotation;
}Expand description
Rotate sites and bodies.
When applied to site properties, Orientation describes the rotation from the
site’s local coordinates to the body frame.
When applied to body properties, Orientation describes the rotation from the
body frame to the system.
§Units
The units of Orientation depend on the representation chosen for R.
For example, hoomd_vector::Angle has units of radians while
hoomd_vector::Versor is unitless.
§Derive macro
Use the Orientation derive macro to automatically implement
the Orientation trait on a type. The type must have a field named orientation.
use hoomd_microstate::property::Orientation;
use hoomd_vector::Versor;
#[derive(Orientation)]
struct Custom {
orientation: Versor,
}Required Associated Types§
Required Methods§
Sourcefn orientation(&self) -> &Self::Rotation
fn orientation(&self) -> &Self::Rotation
The orientation of this body or site.
Sourcefn orientation_mut(&mut self) -> &mut Self::Rotation
fn orientation_mut(&mut self) -> &mut Self::Rotation
The orientation of this body or site (mutable).