mirror of
https://github.com/storytold/texturecraft.git
synced 2026-11-28 00:59:29 +01:00
15 lines
490 B
Rust
15 lines
490 B
Rust
use std::sync::Weak;
|
|
|
|
/// A mesh map a whole-map field samples: its allocation and the size it was baked at (one allocation read as another layout reads other texels)
|
|
#[derive(Clone)]
|
|
pub(crate) struct SampledMap {
|
|
pub(crate) data: Weak<Vec<f32>>,
|
|
pub(crate) baked_size: (u32, u32),
|
|
}
|
|
|
|
impl PartialEq for SampledMap {
|
|
fn eq(&self, other: &SampledMap) -> bool {
|
|
self.data.strong_count() > 0 && self.data.ptr_eq(&other.data) && self.baked_size == other.baked_size
|
|
}
|
|
}
|