@@ -317,12 +317,39 @@ end
317317 face_target = TriangleFace{Int}[[1 , 2 , 5 ], [1 , 5 , 4 ], [2 , 3 , 6 ], [2 , 6 , 5 ], [4 , 5 , 8 ],
318318 [4 , 8 , 7 ], [5 , 6 , 9 ], [5 , 9 , 8 ]]
319319 @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+
320337 circle = Circle (Point2f (0 ), 1.0f0 )
321338 points = decompose (Point2f, Tessellation (circle, 20 ))
322339 @test length (points) == 20
323340 tess_circle = Tessellation (circle, 32 )
324341 mesh = triangle_mesh (tess_circle)
325342 @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 )
326353end
327354
328355@testset " Rectangles" begin
0 commit comments