Commit ff88134c authored by Daniil Rastorguev's avatar Daniil Rastorguev
Browse files

renamed the clipping function

parent 069de599
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -117,7 +117,8 @@ ROOT::Math::XYZPoint PixelDetectorModel::getSensorIntercept(const ROOT::Math::XY
    // We have to be centered around the sensor box. This means we need to shift by the matrix center
    auto translation_local = ROOT::Math::Translation3D(static_cast<ROOT::Math::XYZVector>(getMatrixCenter()));

    auto intersection_point = LiangBarsky(direction, translation_local.Inverse()(inside), getSensorSize());
    auto intersection_point =
        LiangBarskyClosestIntersection(direction, translation_local.Inverse()(inside), getSensorSize());

    // Get intersection from Liang-Barsky line clipping and re-transform to local coordinates:
    if(intersection_point) {
+3 −3
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ namespace allpix {
     * direction from the given position.
     *
     */
    inline std::optional<ROOT::Math::XYZPoint> LiangBarsky(const ROOT::Math::XYZVector& direction,
    inline std::optional<ROOT::Math::XYZPoint> LiangBarskyClosestIntersection(const ROOT::Math::XYZVector& direction,
                                                                              const ROOT::Math::XYZPoint& position,
                                                                              const ROOT::Math::XYZVector& box) {