THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 01/10/2005 at 10:57, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.2+
Platform: Windows ; Mac ; Mac OSX ;
Language(s) : C++ ;
---------
Howdy,
I've made a tool to go with a tag that will select points on an object. It works ok so far except that I'm not sure how to get it to not select the points on the back side of the object that can't be seen from the point of view of the camera. I did a search here and in the archive but couldn't come up with any answers.
I tried this but it doesn't seem to be working:
while (win->MouseDrag(&dx;,&dy;,&device;)==MOUSEDRAG_CONTINUE)
{
mx+=dx;
my+=dy;
mDrag = TRUE;
for(i=0; i<ptCount; i++)
{
if(bd->TestPointZ(bd->WC(opActive->GetMg() * padr{i})))
{
opt = bd->WS(opActive->GetMg() * padr{i});
opt.z = 0.0;
mpt.x = mx;
mpt.y = my;
mpt.z = 0.0;
if(Len(opt-mpt) < rad) bs->Select({i});
}
}
DrawViews(DA_ONLY_ACTIVE_VIEW|DA_NO_THREAD|DA_NO_ANIMATION);
}
I don't know if that is the correct function to use but it was the only thing I could find in the SDK that looked like the right function.
How do I test to see if the point is on the back side of the object?
Adios,
Cactus Dan
P.S. the regular brackets for the arrays are supposed to be square brackets, but it looks like that's forum code for italic type. I had to edit the post 5 times. :(