-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e912493
commit 25aa7f4
Showing
23 changed files
with
143 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
Hector/Elements/ApertureBase.h → Hector/Apertures/ApertureBase.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
Hector/Elements/ApertureType.h → Hector/Apertures/ApertureType.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#ifndef Hector_Apertures_Circular_h | ||
#define Hector_Apertures_Circular_h | ||
|
||
#include "Hector/Apertures/Elliptic.h" | ||
|
||
namespace hector { | ||
namespace aperture { | ||
/// Round shape aperture | ||
class Circular : public Elliptic { | ||
public: | ||
/// Class constructor | ||
Circular(double, const TwoVector& pos = TwoVector()); | ||
~Circular(); | ||
|
||
std::shared_ptr<ApertureBase> clone() const override { return std::make_shared<Circular>(*this); } | ||
}; | ||
} // namespace aperture | ||
} // namespace hector | ||
|
||
#endif |
14 changes: 7 additions & 7 deletions
14
Hector/Elements/EllipticAperture.h → Hector/Apertures/Elliptic.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
Hector/Elements/RectEllipticAperture.h → Hector/Apertures/RectElliptic.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
Hector/Elements/RectangularAperture.h → Hector/Apertures/Rectangular.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#include "Hector/Apertures/Circular.h" | ||
|
||
namespace hector { | ||
namespace aperture { | ||
Circular::Circular(double radius, const TwoVector& pos) : Elliptic(radius, radius, pos) {} | ||
|
||
Circular::~Circular() {} | ||
} // namespace aperture | ||
} // namespace hector |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include "Hector/Apertures/Elliptic.h" | ||
|
||
namespace hector { | ||
namespace aperture { | ||
Elliptic::Elliptic(double ell_length, double ell_height, const TwoVector& pos) | ||
: ApertureBase(anEllipticAperture, pos, {{ell_length, ell_height, 0.f, 0.f}}) {} | ||
|
||
Elliptic::~Elliptic() {} | ||
|
||
bool Elliptic::contains(const TwoVector& pos) const { | ||
const TwoVector vec((pos.x() - pos_.x()) / p(0), (pos.y() - pos_.y()) / p(1)); | ||
return (vec.mag2() < 1.); | ||
} | ||
|
||
TwoVector Elliptic::limits() const { return TwoVector(p(0), p(1)); } | ||
} // namespace aperture | ||
} // namespace hector |
10 changes: 5 additions & 5 deletions
10
src/Elements/RectEllipticAperture.cc → src/Apertures/RectElliptic.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include "Hector/Apertures/Rectangular.h" | ||
|
||
namespace hector { | ||
namespace aperture { | ||
Rectangular::Rectangular(double rect_length, double rect_height, const TwoVector& pos) | ||
: ApertureBase(aRectangularAperture, pos, {{rect_length, rect_height, 0., 0.}}) {} | ||
|
||
Rectangular::~Rectangular() {} | ||
|
||
bool Rectangular::contains(const TwoVector& pos) const { | ||
const TwoVector vec(pos - pos_); | ||
return (fabs(vec.x()) < p(0) && fabs(vec.y()) < p(1)); | ||
} | ||
|
||
TwoVector Rectangular::limits() const { return TwoVector(p(0), p(1)); } | ||
} // namespace aperture | ||
} // namespace hector |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.