Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
d8fa6464
Commit
d8fa6464
authored
Mar 27, 2019
by
Andre Bamidele
Browse files
Refactored get object geometry to take inner radius. Refs: #25149
parent
f211f36e
Changes
17
Hide whitespace changes
Inline
Side-by-side
Framework/Geometry/inc/MantidGeometry/Instrument/Container.h
View file @
d8fa6464
...
...
@@ -89,9 +89,9 @@ public:
}
void
GetObjectGeom
(
detail
::
ShapeInfo
::
GeometryShape
&
type
,
std
::
vector
<
Kernel
::
V3D
>
&
vectors
,
double
&
myr
adius
,
double
&
my
height
)
const
override
{
m_shape
->
GetObjectGeom
(
type
,
vectors
,
my
radius
,
my
height
);
std
::
vector
<
Kernel
::
V3D
>
&
vectors
,
double
&
innerR
adius
,
double
&
radius
,
double
&
height
)
const
override
{
m_shape
->
GetObjectGeom
(
type
,
vectors
,
innerRadius
,
radius
,
height
);
}
boost
::
shared_ptr
<
GeometryHandler
>
getGeometryHandler
()
const
override
{
return
m_shape
->
getGeometryHandler
();
...
...
Framework/Geometry/inc/MantidGeometry/Objects/CSGObject.h
View file @
d8fa6464
...
...
@@ -186,8 +186,8 @@ public:
detail
::
ShapeInfo
::
GeometryShape
shape
()
const
override
;
const
detail
::
ShapeInfo
&
shapeInfo
()
const
;
void
GetObjectGeom
(
detail
::
ShapeInfo
::
GeometryShape
&
type
,
std
::
vector
<
Kernel
::
V3D
>
&
vectors
,
double
&
myr
adius
,
double
&
my
height
)
const
override
;
std
::
vector
<
Kernel
::
V3D
>
&
vectors
,
double
&
innerR
adius
,
double
&
radius
,
double
&
height
)
const
override
;
/// Getter for the shape xml
std
::
string
getShapeXML
()
const
;
...
...
Framework/Geometry/inc/MantidGeometry/Objects/IObject.h
View file @
d8fa6464
...
...
@@ -78,8 +78,8 @@ public:
virtual
detail
::
ShapeInfo
::
GeometryShape
shape
()
const
=
0
;
virtual
void
GetObjectGeom
(
detail
::
ShapeInfo
::
GeometryShape
&
type
,
std
::
vector
<
Kernel
::
V3D
>
&
vectors
,
double
&
my
radius
,
double
&
my
height
)
const
=
0
;
std
::
vector
<
Kernel
::
V3D
>
&
vectors
,
double
&
innerRadius
,
double
&
radius
,
double
&
height
)
const
=
0
;
// Rendering
virtual
void
draw
()
const
=
0
;
virtual
void
initDraw
()
const
=
0
;
...
...
Framework/Geometry/inc/MantidGeometry/Objects/MeshObject.h
View file @
d8fa6464
...
...
@@ -126,8 +126,8 @@ public:
detail
::
ShapeInfo
::
GeometryShape
shape
()
const
override
;
void
GetObjectGeom
(
detail
::
ShapeInfo
::
GeometryShape
&
type
,
std
::
vector
<
Kernel
::
V3D
>
&
vectors
,
double
&
myr
adius
,
double
&
my
height
)
const
override
;
std
::
vector
<
Kernel
::
V3D
>
&
vectors
,
double
&
innerR
adius
,
double
&
radius
,
double
&
height
)
const
override
;
/// Read access to mesh object for rendering
size_t
numberOfVertices
()
const
;
...
...
Framework/Geometry/inc/MantidGeometry/Objects/MeshObject2D.h
View file @
d8fa6464
...
...
@@ -70,8 +70,8 @@ public:
const
size_t
)
const
override
;
detail
::
ShapeInfo
::
GeometryShape
shape
()
const
override
;
void
GetObjectGeom
(
detail
::
ShapeInfo
::
GeometryShape
&
type
,
std
::
vector
<
Kernel
::
V3D
>
&
vectors
,
double
&
myr
adius
,
double
&
my
height
)
const
override
;
std
::
vector
<
Kernel
::
V3D
>
&
vectors
,
double
&
innerR
adius
,
double
&
radius
,
double
&
height
)
const
override
;
void
draw
()
const
override
;
void
initDraw
()
const
override
;
const
Kernel
::
Material
&
material
()
const
override
;
...
...
Framework/Geometry/inc/MantidGeometry/Rendering/ShapeInfo.h
View file @
d8fa6464
...
...
@@ -92,10 +92,8 @@ public:
GeometryShape
shape
()
const
;
void
getObjectGeometry
(
GeometryShape
&
shape
,
std
::
vector
<
Kernel
::
V3D
>
&
points
,
double
&
innerRadius
,
double
&
outerR
adius
,
double
&
innerRadius
,
double
&
r
adius
,
double
&
height
)
const
;
void
getObjectGeometry
(
GeometryShape
&
shape
,
std
::
vector
<
Kernel
::
V3D
>
&
points
,
double
&
radius
,
double
&
height
)
const
;
CuboidGeometry
cuboidGeometry
()
const
;
HexahedronGeometry
hexahedronGeometry
()
const
;
...
...
Framework/Geometry/src/Instrument/ObjCompAssembly.cpp
View file @
d8fa6464
...
...
@@ -388,13 +388,13 @@ boost::shared_ptr<IObject> ObjCompAssembly::createOutline() {
std
::
string
type
;
detail
::
ShapeInfo
::
GeometryShape
otype
;
std
::
vector
<
Kernel
::
V3D
>
vectors
;
double
radius
,
height
;
double
radius
,
height
,
innerRadius
;
boost
::
shared_ptr
<
const
IObject
>
obj
=
group
.
front
()
->
shape
();
if
(
!
obj
)
{
throw
Kernel
::
Exception
::
InstrumentDefinitionError
(
"Found ObjComponent without shape"
);
}
obj
->
GetObjectGeom
(
otype
,
vectors
,
radius
,
height
);
obj
->
GetObjectGeom
(
otype
,
vectors
,
innerRadius
,
radius
,
height
);
if
(
otype
==
detail
::
ShapeInfo
::
GeometryShape
::
CUBOID
)
{
type
=
"box"
;
}
else
if
(
otype
==
detail
::
ShapeInfo
::
GeometryShape
::
CYLINDER
)
{
...
...
Framework/Geometry/src/Objects/CSGObject.cpp
View file @
d8fa6464
...
...
@@ -1014,12 +1014,12 @@ double CSGObject::triangleSolidAngle(const V3D &observer) const {
}
// If the object is a simple shape use the special methods
double
height
(
0.0
),
radius
(
0.0
);
double
height
(
0.0
),
radius
(
0.0
)
,
innerRadius
(
0.0
)
;
detail
::
ShapeInfo
::
GeometryShape
type
;
std
::
vector
<
Mantid
::
Kernel
::
V3D
>
geometry_vectors
;
// Maximum of 4 vectors depending on the type
geometry_vectors
.
reserve
(
4
);
this
->
GetObjectGeom
(
type
,
geometry_vectors
,
radius
,
height
);
this
->
GetObjectGeom
(
type
,
geometry_vectors
,
innerRadius
,
radius
,
height
);
auto
nTri
=
this
->
numberOfTriangles
();
// Cylinders are by far the most frequently used
switch
(
type
)
{
...
...
@@ -1113,10 +1113,10 @@ double CSGObject::triangleSolidAngle(const V3D &observer,
// and Cone cases as well.
//
if
(
nTri
==
0
)
{
double
height
=
0.0
,
radius
(
0.0
);
double
height
=
0.0
,
radius
(
0.0
)
,
innerRadius
;
detail
::
ShapeInfo
::
GeometryShape
type
;
std
::
vector
<
Kernel
::
V3D
>
vectors
;
this
->
GetObjectGeom
(
type
,
vectors
,
radius
,
height
);
this
->
GetObjectGeom
(
type
,
vectors
,
innerRadius
,
radius
,
height
);
switch
(
type
)
{
case
detail
::
ShapeInfo
::
GeometryShape
::
CUBOID
:
for
(
auto
&
vector
:
vectors
)
...
...
@@ -1506,8 +1506,9 @@ double CSGObject::volume() const {
detail
::
ShapeInfo
::
GeometryShape
type
;
double
height
;
double
radius
;
double
innerRadius
;
std
::
vector
<
Kernel
::
V3D
>
vectors
;
this
->
GetObjectGeom
(
type
,
vectors
,
radius
,
height
);
this
->
GetObjectGeom
(
type
,
vectors
,
innerRadius
,
radius
,
height
);
switch
(
type
)
{
case
detail
::
ShapeInfo
::
GeometryShape
::
CUBOID
:
{
// Here, the volume is calculated by the triangular method.
...
...
@@ -1543,6 +1544,8 @@ double CSGObject::volume() const {
return
4.0
/
3.0
*
M_PI
*
radius
*
radius
*
radius
;
case
detail
::
ShapeInfo
::
GeometryShape
::
CYLINDER
:
return
M_PI
*
radius
*
radius
*
height
;
case
detail
::
ShapeInfo
::
GeometryShape
::
HOLLOWCYLINDER
:
return
M_PI
*
height
*
(
radius
*
radius
-
innerRadius
*
innerRadius
);
default:
// Fall back to Monte Carlo method.
return
monteCarloVolume
();
...
...
@@ -1774,9 +1777,10 @@ void CSGObject::calcBoundingBoxByGeometry() {
std
::
vector
<
Kernel
::
V3D
>
vectors
;
double
radius
;
double
height
;
double
innerRadius
;
// Will only work for shapes with ShapeInfo
m_handler
->
GetObjectGeom
(
type
,
vectors
,
radius
,
height
);
m_handler
->
GetObjectGeom
(
type
,
vectors
,
innerRadius
,
radius
,
height
);
// Type of shape is given as a simple integer
switch
(
type
)
{
case
detail
::
ShapeInfo
::
GeometryShape
::
CUBOID
:
{
...
...
@@ -2022,6 +2026,7 @@ V3D CSGObject::generatePointInObject(PseudoRandomNumberGenerator &rng,
break
;
case
detail
::
ShapeInfo
::
GeometryShape
::
HOLLOWCYLINDER
:
point
=
RandomPoint
::
inHollowCylinder
(
m_handler
->
shapeInfo
(),
rng
);
break
;
case
detail
::
ShapeInfo
::
GeometryShape
::
SPHERE
:
point
=
RandomPoint
::
inSphere
(
m_handler
->
shapeInfo
(),
rng
);
break
;
...
...
@@ -2067,7 +2072,8 @@ V3D CSGObject::generatePointInObject(Kernel::PseudoRandomNumberGenerator &rng,
std
::
vector
<
Kernel
::
V3D
>
shapeVectors
;
double
radius
;
double
height
;
GetObjectGeom
(
shape
,
shapeVectors
,
radius
,
height
);
double
innerRadius
;
GetObjectGeom
(
shape
,
shapeVectors
,
innerRadius
,
radius
,
height
);
switch
(
shape
)
{
case
detail
::
ShapeInfo
::
GeometryShape
::
CUBOID
:
point
=
RandomPoint
::
bounded
<
RandomPoint
::
inCuboid
>
(
...
...
@@ -2077,6 +2083,10 @@ V3D CSGObject::generatePointInObject(Kernel::PseudoRandomNumberGenerator &rng,
point
=
RandomPoint
::
bounded
<
RandomPoint
::
inCylinder
>
(
m_handler
->
shapeInfo
(),
rng
,
activeRegion
,
maxAttempts
);
break
;
case
detail
::
ShapeInfo
::
GeometryShape
::
HOLLOWCYLINDER
:
point
=
RandomPoint
::
bounded
<
RandomPoint
::
inHollowCylinder
>
(
m_handler
->
shapeInfo
(),
rng
,
activeRegion
,
maxAttempts
);
break
;
case
detail
::
ShapeInfo
::
GeometryShape
::
SPHERE
:
point
=
RandomPoint
::
bounded
<
RandomPoint
::
inSphere
>
(
m_handler
->
shapeInfo
(),
rng
,
activeRegion
,
maxAttempts
);
...
...
@@ -2253,11 +2263,12 @@ const detail::ShapeInfo &CSGObject::shapeInfo() const {
*/
void
CSGObject
::
GetObjectGeom
(
detail
::
ShapeInfo
::
GeometryShape
&
type
,
std
::
vector
<
Kernel
::
V3D
>
&
vectors
,
double
&
myradius
,
double
&
myheight
)
const
{
double
&
innerRadius
,
double
&
radius
,
double
&
height
)
const
{
type
=
detail
::
ShapeInfo
::
GeometryShape
::
NOSHAPE
;
if
(
m_handler
==
nullptr
)
return
;
m_handler
->
GetObjectGeom
(
type
,
vectors
,
my
radius
,
my
height
);
m_handler
->
GetObjectGeom
(
type
,
vectors
,
innerRadius
,
radius
,
height
);
}
/** Getter for the shape xml
...
...
Framework/Geometry/src/Objects/MeshObject.cpp
View file @
d8fa6464
...
...
@@ -520,14 +520,15 @@ detail::ShapeInfo::GeometryShape MeshObject::shape() const {
*/
void
MeshObject
::
GetObjectGeom
(
detail
::
ShapeInfo
::
GeometryShape
&
type
,
std
::
vector
<
Kernel
::
V3D
>
&
vectors
,
double
&
myradius
,
double
&
myheight
)
const
{
double
&
innerRadius
,
double
&
radius
,
double
&
height
)
const
{
// In practice, this outputs type = -1,
// to indicate not a "standard" object (cuboid/cone/cyl/sphere).
// Retained for possible future use.
type
=
detail
::
ShapeInfo
::
GeometryShape
::
NOSHAPE
;
if
(
m_handler
==
nullptr
)
return
;
m_handler
->
GetObjectGeom
(
type
,
vectors
,
my
radius
,
my
height
);
m_handler
->
GetObjectGeom
(
type
,
vectors
,
innerRadius
,
radius
,
height
);
}
}
// NAMESPACE Geometry
...
...
Framework/Geometry/src/Objects/MeshObject2D.cpp
View file @
d8fa6464
...
...
@@ -401,7 +401,7 @@ detail::ShapeInfo::GeometryShape MeshObject2D::shape() const {
}
void
MeshObject2D
::
GetObjectGeom
(
detail
::
ShapeInfo
::
GeometryShape
&
,
std
::
vector
<
Kernel
::
V3D
>
&
,
double
&
,
std
::
vector
<
Kernel
::
V3D
>
&
,
double
&
,
double
&
,
double
&
)
const
{
throw
std
::
runtime_error
(
"Not implemented"
);
...
...
Framework/Geometry/src/Rendering/GeometryHandler.cpp
View file @
d8fa6464
...
...
@@ -103,14 +103,6 @@ void GeometryHandler::setGeometryCache(size_t nPts, size_t nFaces,
}
}
void
GeometryHandler
::
GetObjectGeom
(
detail
::
ShapeInfo
::
GeometryShape
&
type
,
std
::
vector
<
Kernel
::
V3D
>
&
vectors
,
double
&
radius
,
double
&
height
)
const
{
type
=
detail
::
ShapeInfo
::
GeometryShape
::
NOSHAPE
;
if
(
m_shapeInfo
)
m_shapeInfo
->
getObjectGeometry
(
type
,
vectors
,
radius
,
height
);
}
void
GeometryHandler
::
GetObjectGeom
(
detail
::
ShapeInfo
::
GeometryShape
&
type
,
std
::
vector
<
Kernel
::
V3D
>
&
vectors
,
double
&
innerRadius
,
double
&
radius
,
...
...
Framework/Geometry/src/Rendering/ShapeInfo.cpp
View file @
d8fa6464
...
...
@@ -30,21 +30,12 @@ ShapeInfo::GeometryShape ShapeInfo::shape() const { return m_shape; }
void
ShapeInfo
::
getObjectGeometry
(
ShapeInfo
::
GeometryShape
&
shape
,
std
::
vector
<
Kernel
::
V3D
>
&
points
,
double
&
radius
,
double
&
height
)
const
{
shape
=
m_shape
;
points
=
m_points
;
radius
=
m_radius
;
height
=
m_height
;
}
void
ShapeInfo
::
getObjectGeometry
(
ShapeInfo
::
GeometryShape
&
shape
,
std
::
vector
<
Kernel
::
V3D
>
&
points
,
double
&
innerRadius
,
double
&
outerRadius
,
double
&
innerRadius
,
double
&
radius
,
double
&
height
)
const
{
shape
=
m_shape
;
points
=
m_points
;
innerRadius
=
m_innerRadius
;
outerR
adius
=
m_radius
;
r
adius
=
m_radius
;
height
=
m_height
;
}
...
...
Framework/Geometry/test/CSGObjectTest.h
View file @
d8fa6464
...
...
@@ -63,16 +63,16 @@ public:
auto
&
original
=
dynamic_cast
<
CSGObject
&>
(
*
original_ptr
);
original
.
setID
(
"sp-1"
);
ShapeInfo
::
GeometryShape
objType
;
double
radius
(
-
1.0
),
height
(
-
1.0
);
double
radius
(
-
1.0
),
height
(
-
1.0
)
,
innerRadius
(
0.0
)
;
std
::
vector
<
V3D
>
pts
;
auto
handler
=
original
.
getGeometryHandler
();
TS_ASSERT
(
handler
->
hasShapeInfo
());
original
.
GetObjectGeom
(
objType
,
pts
,
radius
,
height
);
original
.
GetObjectGeom
(
objType
,
pts
,
innerRadius
,
radius
,
height
);
TS_ASSERT_EQUALS
(
ShapeInfo
::
GeometryShape
::
SPHERE
,
objType
);
CSGObject
copy
(
original
);
// The copy should be a primitive object with a GeometryHandler
copy
.
GetObjectGeom
(
objType
,
pts
,
radius
,
height
);
copy
.
GetObjectGeom
(
objType
,
pts
,
innerRadius
,
radius
,
height
);
TS_ASSERT_EQUALS
(
"sp-1"
,
copy
.
id
());
auto
handlerCopy
=
copy
.
getGeometryHandler
();
...
...
@@ -89,17 +89,17 @@ public:
auto
&
original
=
dynamic_cast
<
CSGObject
&>
(
*
original_ptr
);
original
.
setID
(
"sp-1"
);
ShapeInfo
::
GeometryShape
objType
;
double
radius
(
-
1.0
),
height
(
-
1.0
);
double
radius
(
-
1.0
),
height
(
-
1.0
)
,
innerRadius
(
0.0
)
;
std
::
vector
<
V3D
>
pts
;
auto
handler
=
original
.
getGeometryHandler
();
TS_ASSERT
(
handler
->
hasShapeInfo
());
original
.
GetObjectGeom
(
objType
,
pts
,
radius
,
height
);
original
.
GetObjectGeom
(
objType
,
pts
,
innerRadius
,
radius
,
height
);
TS_ASSERT_EQUALS
(
ShapeInfo
::
GeometryShape
::
SPHERE
,
objType
);
CSGObject
lhs
;
// initialize
lhs
=
original
;
// assign
// The copy should be a primitive object with a GluGeometryHandler
lhs
.
GetObjectGeom
(
objType
,
pts
,
radius
,
height
);
lhs
.
GetObjectGeom
(
objType
,
pts
,
innerRadius
,
radius
,
height
);
TS_ASSERT_EQUALS
(
"sp-1"
,
lhs
.
id
());
TS_ASSERT_EQUALS
(
ShapeInfo
::
GeometryShape
::
SPHERE
,
objType
);
...
...
Framework/Geometry/test/MeshObject2DTest.h
View file @
d8fa6464
...
...
@@ -350,10 +350,10 @@ public:
void
test_GetObjGeom_not_implemented
()
{
auto
mesh
=
makeSimpleTriangleMesh
();
std
::
vector
<
V3D
>
vectors
;
double
radius
,
height
;
double
radius
,
height
,
innerRadius
;
Mantid
::
Geometry
::
detail
::
ShapeInfo
::
GeometryShape
shape
;
TS_ASSERT_THROWS
(
mesh
.
GetObjectGeom
(
shape
,
vectors
,
radius
,
height
),
TS_ASSERT_THROWS
(
mesh
.
GetObjectGeom
(
shape
,
vectors
,
innerRadius
,
radius
,
height
),
std
::
runtime_error
&
);
}
...
...
Framework/Geometry/test/ObjCompAssemblyTest.h
View file @
d8fa6464
...
...
@@ -367,8 +367,8 @@ public:
detail
::
ShapeInfo
::
GeometryShape
otype
;
std
::
vector
<
V3D
>
vectors
;
double
radius
,
height
;
shape
->
GetObjectGeom
(
otype
,
vectors
,
radius
,
height
);
double
radius
,
height
,
innerRadius
;
shape
->
GetObjectGeom
(
otype
,
vectors
,
innerRadius
,
radius
,
height
);
TS_ASSERT_EQUALS
(
otype
,
detail
::
ShapeInfo
::
GeometryShape
::
CYLINDER
);
TS_ASSERT_EQUALS
(
radius
,
0.1
);
...
...
Framework/Geometry/test/ParObjCompAssemblyTest.h
View file @
d8fa6464
...
...
@@ -141,8 +141,8 @@ public:
detail
::
ShapeInfo
::
GeometryShape
otype
;
std
::
vector
<
V3D
>
vectors
;
double
radius
,
height
;
shape
->
GetObjectGeom
(
otype
,
vectors
,
radius
,
height
);
double
radius
,
height
,
innerRadius
;
shape
->
GetObjectGeom
(
otype
,
vectors
,
innerRadius
,
radius
,
height
);
TS_ASSERT_EQUALS
(
otype
,
detail
::
ShapeInfo
::
GeometryShape
::
CYLINDER
);
TS_ASSERT_EQUALS
(
radius
,
0.1
);
...
...
Framework/Geometry/test/ShapeInfoTest.h
View file @
d8fa6464
...
...
@@ -135,17 +135,20 @@ public:
double
radius
=
10
;
shapeInfo
.
setSphere
(
center
,
radius
);
ShapeInfo
::
GeometryShape
tshape
;
std
::
vector
<
V3D
>
tpoints
;
double
theight
;
double
tradius
;
shapeInfo
.
getObjectGeometry
(
tshape
,
tpoints
,
tradius
,
theight
);
TS_ASSERT_EQUALS
(
tradius
,
radius
);
TS_ASSERT
(
theight
==
0
);
TS_ASSERT
(
tpoints
.
size
()
==
1
);
TS_ASSERT_EQUALS
(
tpoints
[
0
],
center
);
TS_ASSERT_EQUALS
(
tshape
,
ShapeInfo
::
GeometryShape
::
SPHERE
);
ShapeInfo
::
GeometryShape
testShape
;
std
::
vector
<
V3D
>
testPoints
;
double
testHeight
;
double
testRadius
;
double
testInnerRadius
;
shapeInfo
.
getObjectGeometry
(
testShape
,
testPoints
,
testInnerRadius
,
testRadius
,
testHeight
);
TS_ASSERT_EQUALS
(
testRadius
,
radius
);
TS_ASSERT_EQUALS
(
testHeight
,
0
);
TS_ASSERT_EQUALS
(
testInnerRadius
,
0
);
TS_ASSERT
(
testPoints
.
size
()
==
1
);
TS_ASSERT_EQUALS
(
testPoints
[
0
],
center
);
TS_ASSERT_EQUALS
(
testShape
,
ShapeInfo
::
GeometryShape
::
SPHERE
);
}
void
testGetObjectGeometryForCylinders
()
{
...
...
@@ -158,21 +161,21 @@ public:
shapeInfo
.
setHollowCylinder
(
centreBottomBase
,
symmetryAxis
,
innerRadius
,
outerRadius
,
height
);
ShapeInfo
::
GeometryShape
t
s
hape
;
std
::
vector
<
V3D
>
t
p
oints
;
double
t
h
eight
;
ShapeInfo
::
GeometryShape
t
estS
hape
;
std
::
vector
<
V3D
>
t
estP
oints
;
double
t
estH
eight
;
double
tinnerRadius
;
double
touterRadius
;
shapeInfo
.
getObjectGeometry
(
t
s
hape
,
t
p
oints
,
tinnerRadius
,
touterRadius
,
t
h
eight
);
shapeInfo
.
getObjectGeometry
(
t
estS
hape
,
t
estP
oints
,
tinnerRadius
,
t
outerRadius
,
testH
eight
);
TS_ASSERT_EQUALS
(
tinnerRadius
,
innerRadius
);
TS_ASSERT_EQUALS
(
touterRadius
,
outerRadius
);
TS_ASSERT_EQUALS
(
t
h
eight
,
height
);
TS_ASSERT
(
t
p
oints
.
size
()
==
2
);
TS_ASSERT_EQUALS
(
t
p
oints
[
0
],
centreBottomBase
);
TS_ASSERT_EQUALS
(
t
p
oints
[
1
],
symmetryAxis
);
TS_ASSERT_EQUALS
(
t
s
hape
,
ShapeInfo
::
GeometryShape
::
HOLLOWCYLINDER
);
TS_ASSERT_EQUALS
(
t
estH
eight
,
height
);
TS_ASSERT
(
t
estP
oints
.
size
()
==
2
);
TS_ASSERT_EQUALS
(
t
estP
oints
[
0
],
centreBottomBase
);
TS_ASSERT_EQUALS
(
t
estP
oints
[
1
],
symmetryAxis
);
TS_ASSERT_EQUALS
(
t
estS
hape
,
ShapeInfo
::
GeometryShape
::
HOLLOWCYLINDER
);
}
void
testCuboidGeometry
()
{
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment