mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-06 10:58:28 +00:00
Simplify name of struct
This commit is contained in:
parent
81e4cb130c
commit
4e543901a3
@ -50,7 +50,7 @@ impl Geometry<vertices::Vertex> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Geometry<triangles::TrianglesVertex> {
|
impl Geometry<triangles::Vertex> {
|
||||||
pub fn triangles(
|
pub fn triangles(
|
||||||
device: &wgpu::Device,
|
device: &wgpu::Device,
|
||||||
operation: &impl Operation,
|
operation: &impl Operation,
|
||||||
@ -82,7 +82,7 @@ impl Geometry<triangles::TrianglesVertex> {
|
|||||||
|
|
||||||
for point in triangle {
|
for point in triangle {
|
||||||
let index = vertices.len() as u32;
|
let index = vertices.len() as u32;
|
||||||
let vertex = triangles::TrianglesVertex {
|
let vertex = triangles::Vertex {
|
||||||
position: point.into(),
|
position: point.into(),
|
||||||
normal: normal.into(),
|
normal: normal.into(),
|
||||||
};
|
};
|
||||||
|
@ -7,7 +7,7 @@ use super::{triangles, vertices, Pipeline};
|
|||||||
|
|
||||||
pub struct Pipelines {
|
pub struct Pipelines {
|
||||||
pub vertices: Pipeline<vertices::Vertex>,
|
pub vertices: Pipeline<vertices::Vertex>,
|
||||||
pub triangles: Pipeline<triangles::TrianglesVertex>,
|
pub triangles: Pipeline<triangles::Vertex>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Pipelines {
|
impl Pipelines {
|
||||||
|
@ -2,12 +2,12 @@ use super::pipeline::IsVertex;
|
|||||||
|
|
||||||
#[derive(Clone, Copy, bytemuck::Pod, bytemuck::Zeroable)]
|
#[derive(Clone, Copy, bytemuck::Pod, bytemuck::Zeroable)]
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
pub struct TrianglesVertex {
|
pub struct Vertex {
|
||||||
pub position: [f32; 3],
|
pub position: [f32; 3],
|
||||||
pub normal: [f32; 3],
|
pub normal: [f32; 3],
|
||||||
}
|
}
|
||||||
|
|
||||||
impl IsVertex for TrianglesVertex {
|
impl IsVertex for Vertex {
|
||||||
const ATTRIBUTES: &[wgpu::VertexAttribute] = &wgpu::vertex_attr_array![
|
const ATTRIBUTES: &[wgpu::VertexAttribute] = &wgpu::vertex_attr_array![
|
||||||
0 => Float32x3,
|
0 => Float32x3,
|
||||||
1 => Float32x3,
|
1 => Float32x3,
|
||||||
|
Loading…
Reference in New Issue
Block a user