Struct makepad_widgets::GeometryGen
source · pub struct GeometryGen {
pub vertices: Vec<f32, Global>,
pub indices: Vec<u32, Global>,
}
Fields§
§vertices: Vec<f32, Global>
§indices: Vec<u32, Global>
Implementations§
source§impl GeometryGen
impl GeometryGen
pub fn to_geometry(self, cx: &mut Cx, geometry: &Geometry)
pub fn from_quad_2d(x1: f32, y1: f32, x2: f32, y2: f32) -> GeometryGen
pub fn from_cube_3d( width: f32, height: f32, depth: f32, width_segments: usize, height_segments: usize, depth_segments: usize ) -> GeometryGen
pub fn add_quad_2d(&mut self, x1: f32, y1: f32, x2: f32, y2: f32)
pub fn add_cube_3d( &mut self, width: f32, height: f32, depth: f32, width_segments: usize, height_segments: usize, depth_segments: usize )
pub fn add_plane_3d( &mut self, u: GeometryAxis, v: GeometryAxis, w: GeometryAxis, udir: f32, vdir: f32, width: f32, height: f32, depth: f32, grid_x: usize, grid_y: usize, id: f32 )
Trait Implementations§
source§impl Clone for GeometryGen
impl Clone for GeometryGen
source§fn clone(&self) -> GeometryGen
fn clone(&self) -> GeometryGen
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for GeometryGen
impl Debug for GeometryGen
source§impl Default for GeometryGen
impl Default for GeometryGen
source§fn default() -> GeometryGen
fn default() -> GeometryGen
Returns the “default value” for a type. Read more
source§impl PartialEq<GeometryGen> for GeometryGen
impl PartialEq<GeometryGen> for GeometryGen
source§fn eq(&self, other: &GeometryGen) -> bool
fn eq(&self, other: &GeometryGen) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for GeometryGen
Auto Trait Implementations§
impl RefUnwindSafe for GeometryGen
impl Send for GeometryGen
impl Sync for GeometryGen
impl Unpin for GeometryGen
impl UnwindSafe for GeometryGen
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