Hi,
using the following code, I had unexpected returned values .
foobar(MSElementDescr* curElm,List lineList) {
DPoint3d* linePts;
int numVert =0, elemType;
elemType = mdlElement_getType (&curElm->el);
if( LINE_ELM == elemType ) {
linePts = (DPoint3d*) malloc(2*(sizeof(DPoint3d)));
memset(linePts, 0, 2*(sizeof(DPoint3d)));
mdlLinear_extract(linePts,&numVert,&curElm-
>el,mdlModelRef_getActive());
printf("linePts[0].x=%f\tlinePts[1].x=%f
\n",linePts[0].x,linePts[1].x);
}
}
Printed values are: linePts[0].x=-1.#QNAN0 and
linePts[1].x=-1235866245348632500000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000.000000
What is my error?
I hope you can help me.
Thanks
Biagio


|