@@ -317,12 +317,39 @@ end
317
317
face_target = TriangleFace{Int}[[1 , 2 , 5 ], [1 , 5 , 4 ], [2 , 3 , 6 ], [2 , 6 , 5 ], [4 , 5 , 8 ],
318
318
[4 , 8 , 7 ], [5 , 6 , 9 ], [5 , 9 , 8 ]]
319
319
@test f == face_target
320
+
321
+ uv = decompose_uv (Tesselation (sphere, 3 ))
322
+ uv_target = Vec{2 , Float32}[[0.0 , 1.0 ], [0.0 , 0.5 ], [0.0 , 0.0 ], [0.5 , 1.0 ], [0.5 , 0.5 ],
323
+ [0.5 , 0.0 ], [1.0 , 1.0 ], [1.0 , 0.5 ], [1.0 , 0.0 ]]
324
+ @test uv == uv_target
325
+
326
+ @test minimum (sphere) == Point3f (- 1 )
327
+ @test maximum (sphere) == Point3f (1 )
328
+ @test origin (sphere) == Point3f (0 )
329
+ @test widths (sphere) == Vec3f (2 )
330
+ @test radius (sphere) == 1f0
331
+ @test ! (Point3f (1 ) in sphere)
332
+ @test Point3f (0.5 ) in sphere
333
+ @test centered (HyperSphere) == Sphere (Point3f (0 ), 0.5f0 )
334
+ @test centered (Sphere) == Sphere (Point3f (0 ), 0.5f0 )
335
+ @test centered (Sphere{Float64}) == Sphere (Point3 (0.0 ), 0.5 )
336
+
320
337
circle = Circle (Point2f (0 ), 1.0f0 )
321
338
points = decompose (Point2f, Tessellation (circle, 20 ))
322
339
@test length (points) == 20
323
340
tess_circle = Tessellation (circle, 32 )
324
341
mesh = triangle_mesh (tess_circle)
325
342
@test decompose (Point2f, mesh) ≈ decompose (Point2f, tess_circle)
343
+
344
+ @test minimum (circle) == Point2f (- 1 )
345
+ @test maximum (circle) == Point2f (1 )
346
+ @test origin (circle) == Point2f (0 )
347
+ @test widths (circle) == Vec2f (2 )
348
+ @test radius (circle) == 1f0
349
+ @test ! (Point2f (- 1 ) in circle)
350
+ @test Point2f (- 0.5 ) in circle
351
+ @test centered (Circle) == Circle (Point2f (0 ), 0.5f0 )
352
+ @test centered (Circle{Float64}) == Circle (Point2 (0.0 ), 0.5 )
326
353
end
327
354
328
355
@testset " Rectangles" begin
0 commit comments