Skip to content

Commit

Permalink
Restore method privacy
Browse files Browse the repository at this point in the history
  • Loading branch information
victorreijgwart committed Oct 2, 2023
1 parent 72010a7 commit 71bae42
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,6 @@ class ProjectorBase {
const Transformation3D::RotationMatrix& R_C_W,
const Point3D& t_W_C) const = 0;

Vector2D imageToIndexReal(const ImageCoordinates& image_coordinates) const;
const Vector2D& getIndexToImageScaleFactor() const {
return index_to_image_scale_factor_;
}

protected:
const Index2D dimensions_;
const Vector2D index_to_image_scale_factor_;
Expand All @@ -125,6 +120,13 @@ class ProjectorBase {

const ImageCoordinates min_image_coordinates_;
const ImageCoordinates max_image_coordinates_;

Vector2D imageToIndexReal(const ImageCoordinates& image_coordinates) const;

// Give test 'imageToNearestIndicesAndOffsets' of gtest test suite
// 'Image2DProjectorTypedTest' access to private methods and members
template <typename T>
friend class Image2DProjectorTypedTest_imageToNearestIndicesAndOffsets_Test;
};
} // namespace wavemap

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ TYPED_TEST(Image2DProjectorTypedTest, imageToNearestIndicesAndOffsets) {
neighbox_idx & 0b10 ? index_upper[1] : index_lower[1]};
const Index2D index_expected = index_rounded.cast<IndexElement>();
const Vector2D offset_expected =
projector.getIndexToImageScaleFactor().cwiseProduct(index_rounded -
projector.index_to_image_scale_factor_.cwiseProduct(index_rounded -
index_real);

EXPECT_EQ(indices(0, neighbox_idx), index_expected[0]);
Expand Down

0 comments on commit 71bae42

Please sign in to comment.