pub struct TextureUV<Width, Height, AtlasWidth, AtlasHeight> {
pub begin_u: f32,
pub begin_v: f32,
pub end_u: f32,
pub end_v: f32,
/* private fields */
}
Expand description
テクスチャアトラス内での、始点と終点のUV座標を表す
Fields§
§begin_u: f32
§begin_v: f32
§end_u: f32
§end_v: f32
Implementations§
Source§impl<Width, Height, AtlasWidth, AtlasHeight> TextureUV<Width, Height, AtlasWidth, AtlasHeight>
impl<Width, Height, AtlasWidth, AtlasHeight> TextureUV<Width, Height, AtlasWidth, AtlasHeight>
Source§impl<const W: u32, const H: u32, const ATLAS_W: u32, const ATLAS_H: u32> TextureUV<Const<W>, Const<H>, Const<ATLAS_W>, Const<ATLAS_H>>
impl<const W: u32, const H: u32, const ATLAS_W: u32, const ATLAS_H: u32> TextureUV<Const<W>, Const<H>, Const<ATLAS_W>, Const<ATLAS_H>>
Sourcepub fn of_atlas(pos: &TextureAtlasPos) -> Self
pub fn of_atlas(pos: &TextureAtlasPos) -> Self
ATLAS_W
×ATLAS_H
のテクスチャアトラスをW
×H
のサイズに分割した時、pos.row
行目pos.column
列目のパーツの始点と終点のUV座標
Trait Implementations§
Source§impl<Width: Debug, Height: Debug, AtlasWidth: Debug, AtlasHeight: Debug> Debug for TextureUV<Width, Height, AtlasWidth, AtlasHeight>
impl<Width: Debug, Height: Debug, AtlasWidth: Debug, AtlasHeight: Debug> Debug for TextureUV<Width, Height, AtlasWidth, AtlasHeight>
Source§impl<Width, Height, AtlasWidth, AtlasHeight> VaoBuilder2DGui<TextureUV<Width, Height, AtlasWidth, AtlasHeight>> for VaoBuffer<VertexWithNormUv>
impl<Width, Height, AtlasWidth, AtlasHeight> VaoBuilder2DGui<TextureUV<Width, Height, AtlasWidth, AtlasHeight>> for VaoBuffer<VertexWithNormUv>
fn add_rectangle( &mut self, texture: &TextureUV<Width, Height, AtlasWidth, AtlasHeight>, dst: &Rect<i32, u32>, )
fn add_layout_rectangle( &mut self, texture: &TextureUV<Width, Height, AtlasWidth, AtlasHeight>, parent_width: u32, parent_height: u32, origin: &Origin, position_x: &Position<i32>, position_y: &Position<i32>, inner_width: u32, inner_height: u32, )
fn add_biggest_rectangle( &mut self, texture: &TextureUV<Width, Height, AtlasWidth, AtlasHeight>, parent_width: u32, parent_height: u32, inner_width: u32, inner_height: u32, )
Source§impl<Width, Height, AtlasWidth, AtlasHeight> VaoBuilder3DGeometry<TextureUV<Width, Height, AtlasWidth, AtlasHeight>> for VaoBuffer<VertexWithNormUv>
impl<Width, Height, AtlasWidth, AtlasHeight> VaoBuilder3DGeometry<TextureUV<Width, Height, AtlasWidth, AtlasHeight>> for VaoBuffer<VertexWithNormUv>
Source§fn add_cuboid(
&mut self,
begin: &Point3,
end: &Point3,
textures: &CuboidTextures<'_, TextureUV<Width, Height, AtlasWidth, AtlasHeight>>,
)
fn add_cuboid( &mut self, begin: &Point3, end: &Point3, textures: &CuboidTextures<'_, TextureUV<Width, Height, AtlasWidth, AtlasHeight>>, )
各辺が軸に並行な直方体を追加する Read more
Auto Trait Implementations§
impl<Width, Height, AtlasWidth, AtlasHeight> Freeze for TextureUV<Width, Height, AtlasWidth, AtlasHeight>
impl<Width, Height, AtlasWidth, AtlasHeight> RefUnwindSafe for TextureUV<Width, Height, AtlasWidth, AtlasHeight>where
Width: RefUnwindSafe,
Height: RefUnwindSafe,
AtlasWidth: RefUnwindSafe,
AtlasHeight: RefUnwindSafe,
impl<Width, Height, AtlasWidth, AtlasHeight> Send for TextureUV<Width, Height, AtlasWidth, AtlasHeight>
impl<Width, Height, AtlasWidth, AtlasHeight> Sync for TextureUV<Width, Height, AtlasWidth, AtlasHeight>
impl<Width, Height, AtlasWidth, AtlasHeight> Unpin for TextureUV<Width, Height, AtlasWidth, AtlasHeight>
impl<Width, Height, AtlasWidth, AtlasHeight> UnwindSafe for TextureUV<Width, Height, AtlasWidth, AtlasHeight>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.