how to call "GetNodeNormal" instead of "GetNormal" in my own MeshVS_DataSource?

surface = new mySurface(str);
surface->Triangulation(true);
Handle(myDataSource) aDS = new myDataSource(surface->CoordData,surface->NormalData,surface->Ele2NodeData);
this->AddMesh(aDS);
for (auto m : m_meshvses)
{
    Handle(MeshVS_Mesh) mesh = Handle(MeshVS_Mesh)::DownCast(m);
    m_hAisContext->Display(mesh, Standard_True);
}

I'm showing it this way while I rewrite the function "GetNodeNormal" :

Standard_Boolean myDataSource::GetNodeNormal(const Standard_Integer ranknode, const Standard_Integer ElementId, Standard_Real& nx, Standard_Real& ny, Standard_Real& nz) const
{
    if (ElementId >= 1 && ElementId <= myElements.Extent() && ranknode >= 1 && ranknode <= 3)
    {
        auto index = myElemNodes->Value(ElementId, ranknode);
        nx = myNodeCoords->Value(index, 1);
        ny = myNodeCoords->Value(index, 2);
        nz = myNodeCoords->Value(index, 3);
        return Standard_True;
    }
    else
        return Standard_False;
}
yang698's picture

hello~