Skip to content

Commit 7edf0fa

Browse files
committed
reuse docstring
1 parent 4109645 commit 7edf0fa

File tree

2 files changed

+3
-23
lines changed

2 files changed

+3
-23
lines changed

docs/src/meshes.md

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,10 @@ GeometryBasics defines two mesh types to work with - `Mesh` and `MetaMesh`
44

55
## Mesh
66

7-
A `Mesh` is defined by the following struct:
8-
9-
```julia
10-
struct Mesh{
11-
Dim, T <: Real, # TODO: Number?
12-
FT <: AbstractFace,
13-
Names,
14-
VAT <: Tuple{<: AbstractVector{Point{Dim, T}}, Vararg{VertexAttributeType}},
15-
FVT <: AbstractVector{FT}
16-
} <: AbstractMesh{Dim, T}
17-
18-
vertex_attributes::NamedTuple{Names, VAT}
19-
faces::FVT
20-
views::Vector{UnitRange{Int}}
21-
end
7+
```@docs
8+
Mesh
229
```
2310

24-
`mesh.vertex_attributes` contains all the per-vertex data like positions, normals, texture coordinates, etc.
25-
They must always contain at least positions.
26-
`mesh.faces` defines a set of (default) faces to use for each vertex attribute.
27-
If a vertex attribute is a `FaceView` it carries its own set of faces which are used instead of `mesh.faces`.
28-
In this case the number of faces and length of each face must match between them.
29-
`mesh.views` is a set of views into the `mesh.faces` which can be used to separate the mesh into smaller submeshes.
30-
3111
You can get data from a mesh using a few interface functions:
3212
- `vertex_attributes(mesh) = mesh.vertex_attributes`
3313
- `coordinates(mesh) = mesh.vertex_attributes[:position]`

src/basic_types.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ results in an empty `views` vector.
540540
See also: [`merge`](@ref), [`split_mesh`](@ref)
541541
"""
542542
struct Mesh{
543-
Dim, T <: Real, # TODO: Number?
543+
Dim, T <: Real,
544544
FT <: AbstractFace,
545545
Names,
546546
VAT <: Tuple{<: AbstractVector{Point{Dim, T}}, Vararg{VertexAttributeType}},

0 commit comments

Comments
 (0)