pub struct ClippingGeometry {
pub vertex_buffer: Vec<Vertex>,
pub triangle_buffer: Vec<TriangleDefinition>,
}Expand description
A set of triangles that will be used for clipping.
Fields§
§vertex_buffer: Vec<Vertex>§triangle_buffer: Vec<TriangleDefinition>Implementations§
Source§impl ClippingGeometry
impl ClippingGeometry
pub fn is_contains_point(&self, pos: Vector2<f32>) -> bool
pub fn triangle_points( &self, triangle: &TriangleDefinition, ) -> Option<(&Vertex, &Vertex, &Vertex)>
Trait Implementations§
Source§impl Clone for ClippingGeometry
impl Clone for ClippingGeometry
Source§fn clone(&self) -> ClippingGeometry
fn clone(&self) -> ClippingGeometry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Draw for ClippingGeometry
impl Draw for ClippingGeometry
fn push_vertex(&mut self, pos: Vector2<f32>, tex_coord: Vector2<f32>)
fn push_vertex_raw(&mut self, vertex: Vertex)
fn push_triangle(&mut self, a: u32, b: u32, c: u32)
fn last_vertex_index(&self) -> u32
fn push_triangle_multicolor(&mut self, vertices: [(Vector2<f32>, Color); 3])
fn push_triangle_filled(&mut self, vertices: [Vector2<f32>; 3])
fn push_line(&mut self, a: Vector2<f32>, b: Vector2<f32>, thickness: f32)
fn push_rect(&mut self, rect: &Rect<f32>, thickness: f32)
fn push_rect_vary(&mut self, rect: &Rect<f32>, thickness: Thickness)
fn push_rect_filled( &mut self, rect: &Rect<f32>, tex_coords: Option<&[Vector2<f32>; 4]>, )
fn push_rect_multicolor(&mut self, rect: &Rect<f32>, colors: [Color; 4])
fn push_circle( &mut self, origin: Vector2<f32>, radius: f32, segments: usize, color: Color, )
Auto Trait Implementations§
impl Freeze for ClippingGeometry
impl RefUnwindSafe for ClippingGeometry
impl Send for ClippingGeometry
impl Sync for ClippingGeometry
impl Unpin for ClippingGeometry
impl UnsafeUnpin for ClippingGeometry
impl UnwindSafe for ClippingGeometry
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
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.