@@ -1203,15 +1203,15 @@ TEST_F(TestPointRasterizeSDF, testRasterizeEllipsoids)
12031203 Ellipse ellipse (Vec3d (0 ), (stretch * (s.radiusScale /sdf->voxelSize ()[0 ])), rot);
12041204
12051205 for (auto iter = sdf->cbeginValueOn (); iter; ++iter) {
1206- const float distance = ellipse.project (iter.getCoord ().asVec3d ()) * float (sdf->voxelSize ()[0 ]);
1206+ const float distance = float ( ellipse.project (iter.getCoord ().asVec3d ()) * float (sdf->voxelSize ()[0 ]) );
12071207 EXPECT_NEAR (distance, *iter, 1e-6f );
12081208 }
12091209
12101210 // check off values (because we're also squashing the halfband we
12111211 // just compre the overal length to 0.0)
12121212 size_t interiorOff = 0 , exteriorOff = 0 ;
12131213 for (auto iter = sdf->cbeginValueOff (); iter; ++iter) {
1214- const float distance = ellipse.project (iter.getCoord ().asVec3d ()) * float (sdf->voxelSize ()[0 ]);
1214+ const float distance = float ( ellipse.project (iter.getCoord ().asVec3d ()) * float (sdf->voxelSize ()[0 ]) );
12151215 const bool interior = (distance <= 0.0 );
12161216 if (interior) EXPECT_EQ (-sdf->background (), *iter);
12171217 else EXPECT_EQ (sdf->background (), *iter);
@@ -1262,8 +1262,6 @@ TEST_F(TestPointRasterizeSDF, testRasterizeEllipsoids)
12621262 c.setToRotation ({0 ,0 ,1 }, 66 );
12631263 rot = a * b * c;
12641264
1265- // The transform that defines how we go from each voxel back to the source point
1266- const math::Mat3s inv = rot.timesDiagonal (1.0 / stretch) * rot.transpose ();
12671265 //
12681266
12691267 // / 1) test with a single ellips with Y stretch/rotation
@@ -1289,15 +1287,15 @@ TEST_F(TestPointRasterizeSDF, testRasterizeEllipsoids)
12891287 const Ellipse ellipse (sdf->worldToIndex (center), stretch * (1 /sdf->voxelSize ()[0 ]), rot);
12901288
12911289 for (auto iter = sdf->cbeginValueOn (); iter; ++iter) {
1292- const float distance = ellipse.project (iter.getCoord ().asVec3d ()) * float (sdf->voxelSize ()[0 ]);
1290+ const float distance = float ( ellipse.project (iter.getCoord ().asVec3d ()) * float (sdf->voxelSize ()[0 ]) );
12931291 EXPECT_NEAR (distance, *iter, 1e-6f );
12941292 }
12951293
12961294 // check off values (because we're also squashing the halfband we
12971295 // just compre the overal length to 0.0)
12981296 size_t interiorOff = 0 , exteriorOff = 0 ;
12991297 for (auto iter = sdf->cbeginValueOff (); iter; ++iter) {
1300- const float distance = ellipse.project (iter.getCoord ().asVec3d ()) * float (sdf->voxelSize ()[0 ]);
1298+ const float distance = float ( ellipse.project (iter.getCoord ().asVec3d ()) * float (sdf->voxelSize ()[0 ]) );
13011299 const bool interior = (distance <= 0.0 );
13021300 if (interior) EXPECT_EQ (-sdf->background (), *iter);
13031301 else EXPECT_EQ (sdf->background (), *iter);
0 commit comments