pub fn quad(allocator: &Rc<RefCell<vk_mem::Allocator>>, uv_scale: [f32; 2]) -> Self {
        let vertices = vec![
            Vertex {
                pos: na::Vector3::new(-0.5, -0.5, 0.0),
                color: Color::white(),
                normal: na::Vector3::new(0.0, 0.0, 1.0),
                uv: na::Vector2::new(0.0 * uv_scale[0], 1.0 * uv_scale[1]),
            },
            Vertex {
                pos: na::Vector3::new(0.5, -0.5, 0.0),
                color: Color::white(),
                normal: na::Vector3::new(0.0, 0.0, 1.0),
                uv: na::Vector2::new(1.0 * uv_scale[0], 1.0 * uv_scale[1]),
            },
            Vertex {
                pos: na::Vector3::new(0.5, 0.5, 0.0),
                color: Color::white(),
                normal: na::Vector3::new(0.0, 0.0, 1.0),
                uv: na::Vector2::new(1.0 * uv_scale[0], 0.0 * uv_scale[1]),
            },
            Vertex {
                pos: na::Vector3::new(-0.5, 0.5, 0.0),
                color: Color::white(),
                normal: na::Vector3::new(0.0, 0.0, 1.0),
                uv: na::Vector2::new(0.0 * uv_scale[0], 0.0 * uv_scale[1]),
            },
        ];
        let indices = vec![0, 1, 2, 2, 3, 0];

        let mut ret = Self::new(allocator, &vertices);
        ret.set_indices(&indices);
        ret
    }
/// Returns a new primitive quad with side length 1 centered at the origin
Returns a new primitive quad with side length 1 centered at the origin
Returns a new primitive quad with side length 1 centered at the origin
pub fn quad(allocator: &Rc<RefCell<vk_mem::Allocator>>, uv_scale: [f32; 2]) -> Self {
        let vertices = vec![
            Vertex {
                pos: na::Vector3::new(-0.5, -0.5, 0.0),
                color: Color::white(),
                normal: na::Vector3::new(0.0, 0.0, 1.0),
                uv: na::Vector2::new(0.0 * uv_scale[0], 1.0 * uv_scale[1]),
            },
            Vertex {
                pos: na::Vector3::new(0.5, -0.5, 0.0),
                color: Color::white(),
                normal: na::Vector3::new(0.0, 0.0, 1.0),
                uv: na::Vector2::new(1.0 * uv_scale[0], 1.0 * uv_scale[1]),
            },
            Vertex {
                pos: na::Vector3::new(0.5, 0.5, 0.0),
                color: Color::white(),
                normal: na::Vector3::new(0.0, 0.0, 1.0),
                uv: na::Vector2::new(1.0 * uv_scale[0], 0.0 * uv_scale[1]),
            },
            Vertex {
                pos: na::Vector3::new(-0.5, 0.5, 0.0),
                color: Color::white(),
                normal: na::Vector3::new(0.0, 0.0, 1.0),
                uv: na::Vector2::new(0.0 * uv_scale[0], 0.0 * uv_scale[1]),
            },
        ];
        let indices = vec![0, 1, 2, 2, 3, 0];
        let mut ret = Self::new(allocator, &vertices);
        ret.set_indices(&indices);
        ret
    }
pub fn quad ( allocator : & Rc < RefCell < vk_mem :: Allocator > > , uv_scale : [ f32 ; 2 ] ) -> Self { let vertices = vec ! [ Vertex { pos na Vector3 new ( 0.5 0.5 0.0 ) color Color white ( ) normal na Vector3 new ( 0.0 0.0 1.0 ) uv na Vector2 new ( 0.0 uv_scale [ 0 ] 1.0 uv_scale [ 1 ] ) } Vertex { pos na Vector3 new ( 0.5 0.5 0.0 ) color Color white ( ) normal na Vector3 new ( 0.0 0.0 1.0 ) uv na Vector2 new ( 1.0 uv_scale [ 0 ] 1.0 uv_scale [ 1 ] ) } Vertex { pos na Vector3 new ( 0.5 0.5 0.0 ) color Color white ( ) normal na Vector3 new ( 0.0 0.0 1.0 ) uv na Vector2 new ( 1.0 uv_scale [ 0 ] 0.0 uv_scale [ 1 ] ) } Vertex { pos na Vector3 new ( 0.5 0.5 0.0 ) color Color white ( ) normal na Vector3 new ( 0.0 0.0 1.0 ) uv na Vector2 new ( 0.0 uv_scale [ 0 ] 0.0 uv_scale [ 1 ] ) } ] ; let indices = vec ! [ 0 1 2 2 3 0 ] ; let mut ret = Self :: new ( allocator , & vertices ) ; ret . set_indices ( & indices ) ; ret }
Returns a new primitive quad with side length 1 centered at the origin
Returns a new primitive quad with side length 1 centered at the origin
allocator
&Rc<RefCell<vk_mem::Allocator>>
uv_scale
[f32; 2]
allocator
&Rc<RefCell<vk_mem::Allocator>>
uv_scale
[f32; 2]