Skip to content

Commit 7fc8760

Browse files
committed
bring back shorthand types
1 parent 1f0f270 commit 7fc8760

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/basic_types.jl

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,12 +633,22 @@ function Mesh(; kwargs...)
633633
return Mesh(va, fs)
634634
end
635635

636+
# Shorthand types
637+
const SimpleMesh{N, T, FT} = Mesh{N, T, FT, (:position,), Tuple{Vector{Point{N, T}}}, Vector{FT}}
638+
const NormalMesh{N, T, FT} = Mesh{N, T, FT, (:position, :normal), Tuple{Vector{Point{N, T}}, Vector{Vec3f}}, Vector{FT}}
639+
const NormalUVMesh{N, T, FT} = Mesh{N, T, FT, (:position, :normal, :uv), Tuple{Vector{Point{N, T}}, Vector{Vec3f}, Vector{Vec2f}}, Vector{FT}}
640+
641+
const GLSimpleMesh{N} = SimpleMesh{N, Float32, GLTriangleFace}
642+
const GLNormalMesh{N} = NormalMesh{N, Float32, GLTriangleFace}
643+
const GLNormalUVMesh{N} = NormalUVMesh{N, Float32, GLTriangleFace}
644+
645+
646+
636647
struct MetaMesh{Dim, T, M <: AbstractMesh{Dim, T}} <: AbstractMesh{Dim, T}
637648
mesh::M
638649
meta::Dict{Symbol, Any}
639650
end
640651

641-
642652
"""
643653
MetaMesh(mesh; metadata...)
644654
MetaMesh(positions, faces; metadata...)

0 commit comments

Comments
 (0)