| 252 | } |
| 253 | |
| 254 | double PlanarSurface_Impl::azimuth() const { |
| 255 | OptionalVector3d on = outwardNormal(); |
| 256 | if (!on) { |
| 257 | LOG_AND_THROW("Cannot calculate PlanarSurface azimuth because there is no outwardNormal."); |
| 258 | } |
| 259 | Vector3d n = *on; |
| 260 | Vector3d north(0.0, 1.0, 0.0); |
| 261 | double rawAngle = getAngle(n, north); |
| 262 | if (on->x() < 0.0) { |
| 263 | return -rawAngle + 2.0 * boost::math::constants::pi<double>(); |
| 264 | } |
| 265 | return rawAngle; |
| 266 | } |
| 267 | |
| 268 | boost::optional<double> PlanarSurface_Impl::uFactor() const { |
| 269 | return boost::none; |