Hi all
Is there any function to test that the point is inside a view volume (with front and back clipping)?
I tried to use mdlClip_... but it seems that these functions are made only for references...
Unknown said:I tried to use mdlClip_... but it seems that these functions are made only for references
I don't understand your conclusion. The mdlClip_xxx functions don't take a model reference argument, so how can they even know what model they refer to?
Regards, Jon Summers LA Solutions
Jon,
thank you for answer
I tried to use mdlClip_fromElement()
This function gets MSElementDescr* so there may be a model reference
Something like this:
for (i = 0; i < 8; i++)
{
MSElementDescr *edP;
ElementRef eref;
mdlView_getClipBoundaryElement (&elidView[i], i);
eref = dgnCache_findElemByID (mdlModelRef_getCache(MASTERFILE), elidView[i]);
if (eref)
mdlElmdscr_getByElemRef (&edP, eref, MASTERFILE, FALSE, 0);
mdlClip_fromElement(&arViewClip[i], edP, FALSE, NULL, -1);
}
Unknown said:This function gets MSElementDescr* so there may be a model reference
Only inasmuch as you're obtaining the element descriptor from the active model. But what are you attempting? To obtain a clip descriptor from each of MicroStation's views doesn't make sense. Also, if you're working in 3D, the clip descriptor is a 3D volume not a 2D area.
MASTERFILE, by the way, is not a macro for the long term — it won't work with V8i. In this situation, mdlView_getRootModel might be a better bet. More generally, get a DgnModelRefP from somewhere. ACTIVEMODEL remains a valid macro, but all it does is to wrap mdlModelRef_getActive.
Thank you very much for helping