6 #include "GeoModelKernel/GeoDefinitions.h" 7 #include "GeoModelKernel/GeoShapeAction.h" 8 #include "GeoModelKernel/GeoPara.h" 10 const std::string GeoPara::s_classType =
"Para";
11 const ShapeType GeoPara::s_classTypeID = 0x12;
12 GeoPara::GeoPara (
double XHalfLength,
double YHalfLength,
double ZHalfLength,
double Alpha,
double Theta,
double Phi)
14 m_xHalfLength (XHalfLength),
15 m_yHalfLength (YHalfLength),
16 m_zHalfLength (ZHalfLength),
25 double GeoPara::volume ()
const 30 v1 (sin (m_alpha), cos (m_alpha), 0),
31 v2 (sin (m_theta) * cos (m_phi), sin (m_theta) * sin (m_phi), cos (m_theta));
32 double factor = (v0.cross (v1).dot (v2));
34 return 8.0 * factor * m_xHalfLength * m_yHalfLength * m_zHalfLength;
37 const std::string & GeoPara::type ()
const 42 ShapeType GeoPara::typeID ()
const 49 action->handlePara(
this);
This class is a visitor for shapes. It allows a navigation of the boolean expression tree for shapes...