32 SensorUtilities::Intersection
IsisShape::intersect(
const SensorUtilities::Vec &sensorPos,
const SensorUtilities::Vec &lookVec,
bool computeLocalNormal) {
33 vector<double> pos = {sensorPos.x, sensorPos.y, sensorPos.z};
34 vector<double> look = {lookVec.x, lookVec.y, lookVec.z};
35 m_shape->intersectSurface(pos, look);
37 if (computeLocalNormal && !m_shape->
isDEM()) {
38 QVector<double *> unusedNeighborPoints(4);
39 double origin[3] = {0, 0, 0};
40 unusedNeighborPoints.fill(origin);
41 m_shape->calculateLocalNormal(unusedNeighborPoints);
44 m_shape->calculateSurfaceNormal();
46 vector<double> normal = m_shape->
normal();
48 {intersection->GetX().
meters(), intersection->GetY().
meters(), intersection->GetZ().
meters()},
49 {normal[0], normal[1], normal[2]}};
virtual SensorUtilities::Intersection intersect(const SensorUtilities::Vec &sensorPos, const SensorUtilities::Vec &lookVec, bool computeLocalNormal=true)
Intersect the ShapeModel.