Struct reverie_engine_opengl::vao::buffer::VaoBuffer
source · pub struct VaoBuffer<V: VertexType> { /* private fields */ }
Expand description
頂点の情報を動的に追加・削除するためのバッファ
Implementations§
source§impl<V: VertexType> VaoBuffer<V>
impl<V: VertexType> VaoBuffer<V>
sourcepub fn with_num_vertex(num_vertex_to_reserve: usize) -> Self
pub fn with_num_vertex(num_vertex_to_reserve: usize) -> Self
初期のバッファーサイズを指定してVaoBuffer
を作る
num_vertex_to_reserve
個の頂点が確保できるだけの初期容量になる。
sourcepub fn append(&mut self, v: &mut Vec<f32>)
pub fn append(&mut self, v: &mut Vec<f32>)
頂点群を追加する
v
- 頂点の情報がフラットに繰り返されるVec
。したがってv.len()
は[VERTEX_SIZE
]の倍数になる。 ※頂点情報の仕様については[VERTEX_SIZE
]を参照
sourcepub fn reserve(&mut self, additional_num_vertex: usize)
pub fn reserve(&mut self, additional_num_vertex: usize)
バッファの容量を予め確保する
少なくともadditional_num_vertex
個の頂点が格納できるように確保する。
sourcepub fn clear_preserving_first(&mut self, num_vertex_to_preserve: usize)
pub fn clear_preserving_first(&mut self, num_vertex_to_preserve: usize)
先頭のnum_vertex_to_preserve
個の頂点以外の頂点を削除する
Trait Implementations§
source§impl<V: VertexType> Default for VaoBuffer<V>
impl<V: VertexType> Default for VaoBuffer<V>
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<V> Freeze for VaoBuffer<V>
impl<V> RefUnwindSafe for VaoBuffer<V>where
V: RefUnwindSafe,
impl<V> Send for VaoBuffer<V>where
V: Send,
impl<V> Sync for VaoBuffer<V>where
V: Sync,
impl<V> Unpin for VaoBuffer<V>where
V: Unpin,
impl<V> UnwindSafe for VaoBuffer<V>where
V: UnwindSafe,
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.