Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
3846e5d8
Commit
3846e5d8
authored
Sep 23, 2020
by
Kendrick, Coleman
Browse files
clang formatting
parent
b1c46f2e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Framework/Geometry/test/CSGObjectTest.h
View file @
3846e5d8
...
...
@@ -861,39 +861,39 @@ public:
sphere
->
interceptSurface
(
origin
);
TS_ASSERT_EQUALS
(
origin
.
totalDistInsideObject
(),
RADIUS
);
Track
front_midpoint
(
V3D
{
0.5
*
RADIUS
,
0.0
,
0.0
},
BEAM_X
);
Track
front_midpoint
(
V3D
{
0.5
*
RADIUS
,
0.0
,
0.0
},
BEAM_X
);
sphere
->
interceptSurface
(
front_midpoint
);
TS_ASSERT_EQUALS
(
front_midpoint
.
totalDistInsideObject
(),
0.5
*
RADIUS
);
TS_ASSERT_EQUALS
(
front_midpoint
.
totalDistInsideObject
(),
0.5
*
RADIUS
);
Track
back_midpoint
(
V3D
{
-
0.5
*
RADIUS
,
0.0
,
0.0
},
BEAM_X
);
Track
back_midpoint
(
V3D
{
-
0.5
*
RADIUS
,
0.0
,
0.0
},
BEAM_X
);
sphere
->
interceptSurface
(
back_midpoint
);
TS_ASSERT_EQUALS
(
back_midpoint
.
totalDistInsideObject
(),
1.5
*
RADIUS
);
TS_ASSERT_EQUALS
(
back_midpoint
.
totalDistInsideObject
(),
1.5
*
RADIUS
);
// Y axis tests
origin
=
Track
(
V3D
{
0.0
,
0.0
,
0.0
},
BEAM_Y
);
sphere
->
interceptSurface
(
origin
);
TS_ASSERT_EQUALS
(
origin
.
totalDistInsideObject
(),
RADIUS
);
front_midpoint
=
Track
(
V3D
{
0.0
,
0.5
*
RADIUS
,
0.0
},
BEAM_Y
);
front_midpoint
=
Track
(
V3D
{
0.0
,
0.5
*
RADIUS
,
0.0
},
BEAM_Y
);
sphere
->
interceptSurface
(
front_midpoint
);
TS_ASSERT_EQUALS
(
front_midpoint
.
totalDistInsideObject
(),
0.5
*
RADIUS
);
TS_ASSERT_EQUALS
(
front_midpoint
.
totalDistInsideObject
(),
0.5
*
RADIUS
);
back_midpoint
=
Track
(
V3D
{
0.0
,
-
0.5
*
RADIUS
,
0.0
},
BEAM_Y
);
back_midpoint
=
Track
(
V3D
{
0.0
,
-
0.5
*
RADIUS
,
0.0
},
BEAM_Y
);
sphere
->
interceptSurface
(
back_midpoint
);
TS_ASSERT_EQUALS
(
back_midpoint
.
totalDistInsideObject
(),
1.5
*
RADIUS
);
TS_ASSERT_EQUALS
(
back_midpoint
.
totalDistInsideObject
(),
1.5
*
RADIUS
);
// Z axis tests
origin
=
Track
(
V3D
{
0.0
,
0.0
,
0.0
},
BEAM_Z
);
sphere
->
interceptSurface
(
origin
);
TS_ASSERT_EQUALS
(
origin
.
totalDistInsideObject
(),
RADIUS
);
front_midpoint
=
Track
(
V3D
{
0.0
,
0.0
,
0.5
*
RADIUS
},
BEAM_Z
);
front_midpoint
=
Track
(
V3D
{
0.0
,
0.0
,
0.5
*
RADIUS
},
BEAM_Z
);
sphere
->
interceptSurface
(
front_midpoint
);
TS_ASSERT_EQUALS
(
front_midpoint
.
totalDistInsideObject
(),
0.5
*
RADIUS
);
TS_ASSERT_EQUALS
(
front_midpoint
.
totalDistInsideObject
(),
0.5
*
RADIUS
);
back_midpoint
=
Track
(
V3D
{
0.0
,
0.0
,
-
0.5
*
RADIUS
},
BEAM_Z
);
back_midpoint
=
Track
(
V3D
{
0.0
,
0.0
,
-
0.5
*
RADIUS
},
BEAM_Z
);
sphere
->
interceptSurface
(
back_midpoint
);
TS_ASSERT_EQUALS
(
back_midpoint
.
totalDistInsideObject
(),
1.5
*
RADIUS
);
TS_ASSERT_EQUALS
(
back_midpoint
.
totalDistInsideObject
(),
1.5
*
RADIUS
);
}
void
testGeneratePointInsideSphere
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment