Skip to content

Commit 429889a

Browse files
authored
typos (#235)
Co-authored-by: spaette <[email protected]>
1 parent a84b168 commit 429889a

File tree

9 files changed

+24
-24
lines changed

9 files changed

+24
-24
lines changed

docs/src/primitives.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,10 @@ end
132132
```
133133

134134
To connect these points into a mesh, we need to generate a set of faces.
135-
The faces of a prallelepiped are parallelograms, which we can describe with `QuadFace`.
136-
Here we should be concious of the winding direction of faces.
135+
The faces of a parallelepiped are parallelograms, which we can describe with `QuadFace`.
136+
Here we should be conscious of the winding direction of faces.
137137
They are often used to determine the front vs the backside of a (2D) face.
138-
For example GeometryBasics normal generation and OpenGL's backface culling assume a counter-clockwise windig direction to correspond to a front-facing face.
138+
For example GeometryBasics normal generation and OpenGL's backface culling assume a counter-clockwise winding direction to correspond to a front-facing face.
139139
This means that if we look at a face from outside the shape, the positions referred to by that face should be ordered counter-clockwise.
140140
With that in mind the faces of our primitive become:
141141

src/basic_types.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ texturecoordinates(mesh::Mesh) = hasproperty(mesh, :uv) ? mesh.uv : nothing
626626
"""
627627
vertex_attributes(mesh::Mesh)
628628
629-
Returns a dictionairy containing the vertex attributes of the given mesh.
629+
Returns a dictionary containing the vertex attributes of the given mesh.
630630
Mutating these will change the mesh.
631631
"""
632632
vertex_attributes(mesh::Mesh) = getfield(mesh, :vertex_attributes)

src/boundingboxes.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ end
55
"""
66
Rect(points::AbstractArray{<: Point})
77
8-
Construct a bounding box countaining all the given points.
8+
Construct a bounding box containing all the given points.
99
"""
1010
function Rect{N1,T1}(geometry::AbstractArray{PT}) where {N1,T1,PT<:Point}
1111
N2, T2 = length(PT), eltype(PT)

src/interfaces.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function normals(primitive, nvertices=nothing; kw...)
3535
# doesn't have any specific algorithm to generate normals
3636
# so will be generated from faces + positions
3737
# which we indicate by returning nothing!
38-
# Overload normals(primitive::YourPrimitive), to calcalute the normals
38+
# Overload normals(primitive::YourPrimitive), to calculate the normals
3939
# differently
4040
return nothing
4141
end
@@ -127,7 +127,7 @@ Normal() = Normal(Vec3f)
127127
decompose(::Type{TargetType}, primitive)
128128
decompose(::Type{TargetType}, data::AbstractVector)
129129
130-
Dependent on the given type, extracts data from the primtive and converts its
130+
Dependent on the given type, extracts data from the primitive and converts its
131131
eltype to `TargetType`.
132132
133133
Possible `TargetType`s:

src/meshes.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ facetype(::Mesh{D, T, FT}) where {D, T, FT} = FT
134134
uv_mesh(primitive::GeometryPrimitive{N}[; pointtype = Point{N, Float32}, facetype = GLTriangleFace, uvtype = Vec2f])
135135
136136
Creates a triangle mesh with texture coordinates from a given `primitive`. The
137-
`pointtype`, `facetype` and `uvtype` are set by the correspondering keyword arguments.
137+
`pointtype`, `facetype` and `uvtype` are set by the corresponding keyword arguments.
138138
139139
See also: [`triangle_mesh`](@ref), [`normal_mesh`](@ref), [`uv_mesh`](@ref), [`uv_normal_mesh`](@ref)
140140
"""
@@ -154,7 +154,7 @@ end
154154
155155
Creates a triangle mesh with texture coordinates and normals from a given
156156
`primitive`. The `pointtype`, `facetype` and `uvtype` and `normaltype` are set
157-
by the correspondering keyword arguments.
157+
by the corresponding keyword arguments.
158158
159159
See also: [`triangle_mesh`](@ref), [`normal_mesh`](@ref), [`uv_mesh`](@ref), [`uv_normal_mesh`](@ref)
160160
"""
@@ -175,7 +175,7 @@ end
175175
176176
Creates a triangle mesh with texture coordinates and normals from a given
177177
`primitive`. The `pointtype`, `facetype` and `uvtype` and `normaltype` are set
178-
by the correspondering keyword arguments.
178+
by the corresponding keyword arguments.
179179
180180
See also: [`triangle_mesh`](@ref), [`normal_mesh`](@ref), [`uv_mesh`](@ref), [`uv_normal_mesh`](@ref)
181181
"""
@@ -192,7 +192,7 @@ end
192192
normal_mesh(primitive::GeometryPrimitive{N}[; pointtype = Point{N, Float32}, facetype = GLTriangleFace, normaltype = Vec3f])
193193
194194
Creates a triangle mesh with normals from a given `primitive`. The `pointtype`, `facetype` and `uvtype` and `normaltype` are set
195-
by the correspondering keyword arguments.
195+
by the corresponding keyword arguments.
196196
197197
See also: [`triangle_mesh`](@ref), [`normal_mesh`](@ref), [`uv_mesh`](@ref), [`uv_normal_mesh`](@ref)
198198
"""
@@ -333,7 +333,7 @@ end
333333
expand_faceviews(mesh::Mesh)
334334
335335
Returns the given `mesh` if it contains no FaceViews. Otherwise, generates a new
336-
mesh that contains no FaceViews, reordering and duplicating vertex atttributes
336+
mesh that contains no FaceViews, reordering and duplicating vertex attributes
337337
as necessary. If the mesh has `views` they will be adjusted as needed to produce
338338
the same submeshes.
339339
"""
@@ -417,7 +417,7 @@ function merge_vertex_indices(
417417
# indices that remap attributes
418418
attribute_indices = ntuple(n -> sizehint!(UInt32[], N_faces), N_Attrib)
419419

420-
# keep track of the remmaped indices for one vertex so we don't have to
420+
# keep track of the remapped indices for one vertex so we don't have to
421421
# query the dict twice
422422
temp = Vector{T}(undef, N)
423423

src/primitives/rectangles.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
HyperRectangle{N, T}
44
55
A `HyperRectangle` is a generalization of a rectangle into N-dimensions.
6-
Formally it is the cartesian product of intervals, which is represented by the
6+
Formally it is the Cartesian product of intervals, which is represented by the
77
`origin` and `widths` fields, whose indices correspond to each of the `N` axes.
88
"""
99
struct HyperRectangle{N,T} <: GeometryPrimitive{N,T}
@@ -17,7 +17,7 @@ end
1717
"""
1818
const Rect{N,T} = HyperRectangle{N,T}
1919
20-
A rectangle in N dimensions, formally the cartesian product of intervals. See also [`HyperRectangle`](@ref). Its aliases are
20+
A rectangle in N dimensions, formally the Cartesian product of intervals. See also [`HyperRectangle`](@ref). Its aliases are
2121
2222
| |`T`(eltype)|`Float64` |`Float32` |`Int` |
2323
|--------|-----------|----------|----------|----------|
@@ -216,12 +216,12 @@ function Base.:(*)(m::Mat{N1,N1,T1}, h::Rect{N2,T2}) where {N1,N2,T1,T2}
216216

217217
# get all points on the Rect
218218
d = decompose(Point, h)
219-
# make sure our points are sized for the tranform
219+
# make sure our points are sized for the transform
220220
pts = (Vec{N1,T}[vcat(pt, ones(Vec{D,T})) for pt in d]...,)::NTuple{2^N2,Vec{N1,T}}
221221

222222
vmin = Vec{N1,T}(typemax(T))
223223
vmax = Vec{N1,T}(typemin(T))
224-
# tranform all points, tracking min and max points
224+
# transform all points, tracking min and max points
225225
for pt in pts
226226
pn = m * pt
227227
vmin = min.(pn, vmin)
@@ -239,11 +239,11 @@ function Base.:(*)(m::Mat{N,N,T1}, h::Rect{N,T2}) where {N,T1,T2}
239239
# get all points on the Rect
240240
pts = decompose(Point, h)
241241

242-
# make sure our points are sized for the tranform
242+
# make sure our points are sized for the transform
243243
vmin = Vec{N,T}(typemax(T))
244244
vmax = Vec{N,T}(typemin(T))
245245

246-
# tranform all points, tracking min and max points
246+
# transform all points, tracking min and max points
247247
for pt in pts
248248
pn = m * Vec(pt)
249249
vmin = min.(pn, vmin)
@@ -262,13 +262,13 @@ function Base.:(*)(m::Mat{4,4,T}, h::Rect{3,T}) where {T}
262262
Vec{4,T}(0.0, 0.0, 1.0, 1.0), Vec{4,T}(1.0, 0.0, 1.0, 1.0),
263263
Vec{4,T}(0.0, 1.0, 1.0, 1.0), Vec{4,T}(1.0, 1.0, 1.0, 1.0))
264264

265-
# make sure our points are sized for the tranform
265+
# make sure our points are sized for the transform
266266
vmin = Vec{4,T}(typemax(T))
267267
vmax = Vec{4,T}(typemin(T))
268268
o, w = origin(h), widths(h)
269269
_o = Vec{4,T}(o[1], o[2], o[3], T(0))
270270
_w = Vec{4,T}(w[1], w[2], w[3], T(1))
271-
# tranform all points, tracking min and max points
271+
# transform all points, tracking min and max points
272272
for pt in pts
273273
pn = m * (_o + (pt .* _w))
274274
vmin = min.(pn, vmin)

src/triangulation.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ function decompose(::Type{F}, points::AbstractVector{<:Point}) where {F<:Abstrac
168168
t += 1
169169
end
170170
nv -= 1
171-
#= resest error detection counter =#
171+
#= reset error detection counter =#
172172
count = 2 * nv
173173
end
174174
end

src/viewtypes.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ end
6060
connect(points::AbstractVector{<: Point}, P::Type{<: Polytope{N}}, skip::Int = N)
6161
6262
Creates a view that connects a number of points to a Polytope `P`.
63-
Between each polytope, `skip` elements are skipped untill the next starts.
63+
Between each polytope, `skip` elements are skipped until the next starts.
6464
Example:
6565
```julia
6666
x = connect(Point[(1, 2), (3, 4), (5, 6), (7, 8)], Line, 2)

test/meshes.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ end
119119
@test faces(m) == fs
120120
end
121121

122-
@testset "Verifaction" begin
122+
@testset "Verification" begin
123123
# enough vertices present
124124
@test_throws ErrorException Mesh(rand(Point2f, 7), fs)
125125
m = Mesh(rand(Point2f, 12), fs)

0 commit comments

Comments
 (0)