Skip to content
This repository was archived by the owner on Oct 12, 2019. It is now read-only.

Commit b864ad8

Browse files
committed
make face type parametric. helps #21
1 parent ea3d742 commit b864ad8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/core.jl

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@ export Vertex,
88

99
typealias Vertex Vector3{Float64}
1010

11-
immutable Face
12-
v1 :: Int64
13-
v2 :: Int64
14-
v3 :: Int64
11+
immutable Face{T}
12+
v1::T
13+
v2::T
14+
v3::T
1515
end
1616

1717
Face(v::AbstractArray) = Face(v[1], v[2], v[3])
1818

1919

2020
abstract AbstractMesh
2121

22-
type Mesh <: AbstractMesh
22+
type Mesh{F} <: AbstractMesh
2323
vertices :: Vector{Vertex}
24-
faces :: Vector{Face}
24+
faces :: Vector{F}
2525
has_topology :: Bool
2626
end
2727

0 commit comments

Comments
 (0)