pub struct DynamicVertex2d { /* private fields */ }Expand description
One world-space vertex in a dynamic triangle-list mesh.
Dynamic meshes use plain filled triangles. Positions are measured in world
units, depth uses the active camera projection, and colors are linear RGBA.
Implementations§
Source§impl DynamicVertex2d
impl DynamicVertex2d
Sourcepub fn new(
world_position: Vec2,
depth: f32,
color: Color,
) -> Result<Self, DynamicMeshError>
pub fn new( world_position: Vec2, depth: f32, color: Color, ) -> Result<Self, DynamicMeshError>
Builds a finite dynamic vertex.
Sourcepub fn world_position(self) -> Vec2
pub fn world_position(self) -> Vec2
Returns the world-space triangle position.
Trait Implementations§
Source§impl Clone for DynamicVertex2d
impl Clone for DynamicVertex2d
Source§fn clone(&self) -> DynamicVertex2d
fn clone(&self) -> DynamicVertex2d
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 moreimpl Copy for DynamicVertex2d
Source§impl Debug for DynamicVertex2d
impl Debug for DynamicVertex2d
Source§impl PartialEq for DynamicVertex2d
impl PartialEq for DynamicVertex2d
impl StructuralPartialEq for DynamicVertex2d
Auto Trait Implementations§
impl Freeze for DynamicVertex2d
impl RefUnwindSafe for DynamicVertex2d
impl Send for DynamicVertex2d
impl Sync for DynamicVertex2d
impl Unpin for DynamicVertex2d
impl UnsafeUnpin for DynamicVertex2d
impl UnwindSafe for DynamicVertex2d
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