Struct las::Transform [] [src]

pub struct Transform {
    pub scale: f64,
    pub offset: f64,
}

A scale and an offset that transforms xyz coordinates.

Fields

The scale.

The offset.

Methods

impl Transform
[src]

[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));

[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]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for Transform
[src]

impl Debug for Transform
[src]

[src]

Formats the value using the given formatter.

impl PartialEq for Transform
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Default for Transform
[src]

[src]

Returns the "default value" for a type. Read more

impl Display for Transform
[src]

[src]

Formats the value using the given formatter. Read more