[−][src]Struct pdbtbx::OrigX
A transformation of the orthogonal coordinates to submitted
Implementations
impl OrigX
[src]
pub fn new() -> OrigX
[src]
Create an empty transformation (identity)
pub fn transformation(&self) -> &TransformationMatrix
[src]
Get the transformation from orthogonal to submitted coordinates
pub fn set_transformation(&mut self, transformation: TransformationMatrix)
[src]
Set the transformation from orthogonal to submitted coordinates
pub fn set_row(&mut self, row: usize, data: [f64; 4])
[src]
Set a row to the given data, this invalidates all other rows if the origx was valid before otherwise it validates the row given. To have a valid origx all rows have to be set.
Arguments
row
- 0-based row to fill the data intodata
- the row of data
Example
use pdbtbx::TransformationMatrix; use pdbtbx::OrigX; let mut example = OrigX::new(); example.set_row(1, [0.0, 1.0, 0.0, 0.0]); example.set_row(2, [0.0, 0.0, 1.0, 0.0]); example.set_row(0, [1.0, 0.0, 0.0, 0.0]); // The order does not matter assert_eq!(example.transformation(), &TransformationMatrix::identity()); assert!(example.valid());
pub fn valid(&self) -> bool
[src]
Checks if this OrigX is valid, for this all rows have to be set (also see set_row
).
Mainly used to validate a structure after parsing.
Trait Implementations
impl Clone for OrigX
[src]
impl Debug for OrigX
[src]
impl Default for OrigX
[src]
impl PartialEq<OrigX> for OrigX
[src]
Auto Trait Implementations
impl RefUnwindSafe for OrigX
[src]
impl Send for OrigX
[src]
impl Sync for OrigX
[src]
impl Unpin for OrigX
[src]
impl UnwindSafe for OrigX
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,