Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
11edbc33
Commit
11edbc33
authored
8 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
+ namespace comment
parent
46075ec8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Core/Mask/IShape2D.h
+6
-4
6 additions, 4 deletions
Core/Mask/IShape2D.h
with
6 additions
and
4 deletions
Core/Mask/IShape2D.h
+
6
−
4
View file @
11edbc33
...
...
@@ -22,6 +22,8 @@
struct
Bin1D
;
//! Geometric shapes, used for detector masks.
namespace
Geometry
{
//! Basic class for all shapes in 2D.
...
...
@@ -30,20 +32,20 @@ namespace Geometry {
class
BA_CORE_API_
IShape2D
:
public
ICloneable
,
public
INamed
{
public:
IShape2D
(
const
std
::
string
&
name
)
:
INamed
(
name
)
{}
virtual
IShape2D
*
clone
()
const
=
0
;
virtual
IShape2D
*
clone
()
const
=
0
;
//! Returns true if point with given coordinates is inside or on border of the shape.
virtual
bool
contains
(
double
x
,
double
y
)
const
=
0
;
//! Returns true if area defined by two bins is inside or on border of polygon
//! (more precisely, if mid point of two bins satisfy this condition).
virtual
bool
contains
(
const
Bin1D
&
binx
,
const
Bin1D
&
biny
)
const
=
0
;
virtual
bool
contains
(
const
Bin1D
&
binx
,
const
Bin1D
&
biny
)
const
=
0
;
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
ostr
,
const
IShape2D
&
shape
)
{
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
ostr
,
const
IShape2D
&
shape
)
{
shape
.
print
(
ostr
);
return
ostr
;
}
protected
:
virtual
void
print
(
std
::
ostream
&
ostr
)
const
{
ostr
<<
getName
();
}
virtual
void
print
(
std
::
ostream
&
ostr
)
const
{
ostr
<<
getName
();
}
};
}
// namespace Geometry
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment