* Returns the local surface normal at the current intersection point. * Note: This method will throw an error if the normal doesn't exist. Use the * hasLocalNormal() method to verify before calling this method. * * @see hasLocalNormal() * * @return A local surface normal vector, if it exists. */
| 457 | * @return A local surface normal vector, if it exists. |
| 458 | */ |
| 459 | std::vector<double> ShapeModel::localNormal() { |
| 460 | if (m_hasLocalNormal ) { |
| 461 | return m_localNormal; |
| 462 | } |
| 463 | else { |
| 464 | QString message = "The local normal has not been computed."; |
| 465 | throw IException(IException::Unknown, message, _FILEINFO_); |
| 466 | } |
| 467 | } |
| 468 | |
| 469 | /** |
| 470 | * @brief Default occulsion implementation |