I'm attempting to utilize a std::vector<DPoint3d> as a parameter to mdlLinear_extract() without success. Is this even possible? I'd trying to avoid using dlmSystem_mdlMalloc() type functions for allocating/freeing memory...
int maxVerts=MAX_VERTICES; mdlLinear_extract( NULL, &maxVerts, elHandle.GetElementP(), elHandle.GetModelRef() ); //std::vector<DPoint3d> shapePts(maxVerts); // tried this as well std::vector<DPoint3d> shapePts; shapePts.reserve(maxVerts); //mdlLinear_extract( (DPoint3d*)&shapePts, &maxVerts, elHandle.GetElementP(), elHandle.GetModelRef() ); // bombs here mdlLinear_extract( (DPoint3d*)&shapePts[0], &maxVerts, elHandle.GetElementP(), elHandle.GetModelRef() ); // bombs here
Can a std::vector<DPoint3d> be passed into mdl functions looking "*Dpoint3d" ?
Thanks,
Bruce