Struct las::Transform
[−]
[src]
pub struct Transform { pub scale: f64, pub offset: f64, }
A scale and an offset that transforms xyz coordinates.
Fields
scale: f64
The scale.
offset: f64
The offset.
Methods
impl Transform
[src]
fn direct(&self, n: i32) -> f64
[src]
Applies this transform to an i32, returning a float.
Examples
use las::Transform; let transform = Transform { scale: 2., offset: 1. }; assert_eq!(3., transform.direct(1));
fn inverse(&self, n: f64) -> Result<i32>
[src]
Applies the inverse transform, and rounds the result.
Returns an error if the resultant value can't be represented as an i32.
Examples
use las::Transform; let transform = Transform { scale: 2., offset: 1. }; assert_eq!(1, transform.inverse(2.9).unwrap());
Trait Implementations
impl Clone for Transform
[src]
fn clone(&self) -> Transform
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for Transform
[src]
impl Debug for Transform
[src]
impl PartialEq for Transform
[src]
fn eq(&self, __arg_0: &Transform) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Transform) -> bool
[src]
This method tests for !=
.