pub struct GeometryGen {
pub vertices: Vec<f32>,
pub indices: Vec<u32>,
}
Fields§
§vertices: Vec<f32>
§indices: Vec<u32>
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 for GeometryGen
impl PartialEq for GeometryGen
impl StructuralPartialEq for GeometryGen
Auto Trait Implementations§
impl Freeze for GeometryGen
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> ActionTrait for T
impl<T> ActionTrait for T
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