Adding a polygon id getter for propagation shapes

parent fd01286c
......@@ -115,6 +115,8 @@ namespace ITAPropagationPathSim
size_t GetIdentifier() const;
int GetPolygonID() const;
};
......
......@@ -445,7 +445,7 @@ void ITAPropagationPathSim::CombinedModel::CPathEngine::ConvertShapeListsToPropa
shared_ptr<CSpecularReflection> pReflectionAnchor = make_shared<CSpecularReflection>();
pReflectionAnchor->v3InteractionPoint = *pFace->v3InteractionPoint;
pReflectionAnchor->v3FaceNormal = pFace->pPlane->GetNormVector();
pReflectionAnchor->iPolygonID = (int) pFace->GetIdentifier();
pReflectionAnchor->iPolygonID = (int) pFace->GetPolygonID();
oPath.push_back(pReflectionAnchor);
break;
......
......@@ -75,7 +75,15 @@ bool ITAPropagationPathSim::CombinedModel::CPropagationShape::SetMinimumDistance
return true;
}
bool CPropagationShape::SetMinimumDistance(const VistaVector3D & v3Point)
int ITAPropagationPathSim::CombinedModel::CPropagationShape::GetPolygonID() const
{
if( hShape.is_valid() )
return hShape.idx();
else
return -1;
}
bool CPropagationShape::SetMinimumDistance( const VistaVector3D & v3Point )
{
if (v3Barycenter == nullptr)
return false;
......
......@@ -226,6 +226,7 @@ void CEngine::ConstructReflectionsPath(CImageNode* pNode, std::shared_ptr< const
std::shared_ptr< ITAGeo::CSpecularReflection > pReflectionAnchor = std::make_shared < ITAGeo::CSpecularReflection >();
pReflectionAnchor->v3InteractionPoint = v3IntersectionPoint;
pReflectionAnchor->v3FaceNormal = pNode->pImage->v3MirrorNormal;
pReflectionAnchor->iPolygonID = pNode->pImage->iPolygonIndex;
//Add reflection to path
oPath[pNode->pImage->iOrder] = pReflectionAnchor;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment