pub trait Transform {
// Required methods
fn transform_mut(&mut self, mat: &Matrix3<f64>);
fn rotate_mut(&mut self, angle: f64, axis: &Vector3<f64>);
fn improper_rotate_mut(
&mut self,
angle: f64,
axis: &Vector3<f64>,
kind: &ImproperRotationKind,
);
fn translate_mut(&mut self, tvec: &Vector3<f64>);
fn recentre_mut(&mut self);
fn reverse_time_mut(&mut self);
fn transform(&self, mat: &Matrix3<f64>) -> Self;
fn rotate(&self, angle: f64, axis: &Vector3<f64>) -> Self;
fn improper_rotate(
&self,
angle: f64,
axis: &Vector3<f64>,
kind: &ImproperRotationKind,
) -> Self;
fn translate(&self, tvec: &Vector3<f64>) -> Self;
fn recentre(&self) -> Self;
fn reverse_time(&self) -> Self;
}
Expand description
Geometrical transformability in three dimensions.
Required Methods§
sourcefn transform_mut(&mut self, mat: &Matrix3<f64>)
fn transform_mut(&mut self, mat: &Matrix3<f64>)
Transforms in-place the coordinates about the origin by a given transformation.
§Arguments
- mat - A three-dimensional transformation matrix.
sourcefn rotate_mut(&mut self, angle: f64, axis: &Vector3<f64>)
fn rotate_mut(&mut self, angle: f64, axis: &Vector3<f64>)
Rotates in-place the coordinates through angle
about axis
.
§Arguments
- angle - The angle of rotation.
- axis - The axis of rotation.
sourcefn improper_rotate_mut(
&mut self,
angle: f64,
axis: &Vector3<f64>,
kind: &ImproperRotationKind,
)
fn improper_rotate_mut( &mut self, angle: f64, axis: &Vector3<f64>, kind: &ImproperRotationKind, )
Improper-rotates in-place the coordinates through angle
about axis
.
§Arguments
angle
- The angle of rotation.axis
- The axis of rotation.kind
- The convention in which the improper rotation is defined.
sourcefn translate_mut(&mut self, tvec: &Vector3<f64>)
fn translate_mut(&mut self, tvec: &Vector3<f64>)
Translates in-place the coordinates by a specified translation vector in three dimensions.
§Arguments
tvec
- The translation vector.
sourcefn recentre_mut(&mut self)
fn recentre_mut(&mut self)
Recentres in-place to put the centre of mass at the origin.
sourcefn reverse_time_mut(&mut self)
fn reverse_time_mut(&mut self)
Reverses time by reversing in-place the polarity of any magnetic special atoms.
sourcefn improper_rotate(
&self,
angle: f64,
axis: &Vector3<f64>,
kind: &ImproperRotationKind,
) -> Self
fn improper_rotate( &self, angle: f64, axis: &Vector3<f64>, kind: &ImproperRotationKind, ) -> Self
sourcefn reverse_time(&self) -> Self
fn reverse_time(&self) -> Self
Clones the molecule and reverses time by reversing the polarity of any magnetic special atoms.
§Returns
A time-reversed copy.
Object Safety§
This trait is not object safe.