Struct acacia::partition::UnitQuad
[−]
[src]
pub struct UnitQuad { /* fields omitted */ }
A partition of the unit quad [0, 1) × [0, 1)
Methods
impl UnitQuad
[src]
fn new(scale: u8, offset: (u32, u32)) -> UnitQuad
Create a new UnitQuad
This asserts that the offset is valid given the scale level.
fn scale(&self) -> u8
Integer scale
fn offset(&self) -> (u32, u32)
Integer offset
fn coordinate<T: BaseFloat + NumCast + Float>(&self, coord: (T, T)) -> Vector2<T>
Get coordinate within the partition from (u, v) coordinates
fn center<T: BaseFloat + NumCast + Float>(&self) -> Vector2<T>
Center of the partitioned region
fn width<T: BaseFloat + NumCast + Float>(&self) -> T
Width of the partitioned region
Trait Implementations
impl Copy for UnitQuad
[src]
impl Clone for UnitQuad
[src]
fn clone(&self) -> UnitQuad
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Debug for UnitQuad
[src]
impl PartialEq for UnitQuad
[src]
fn eq(&self, __arg_0: &UnitQuad) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &UnitQuad) -> bool
This method tests for !=
.
impl Hash for UnitQuad
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0
Feeds a slice of this type into the state provided.