THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 26/10/2004 at 14:41, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.206
Platform:
Language(s) : C++ ;
---------
Hi,
I have a tag expression plugin, and this tag plugin has a parameter in the AM called radius, which specifies the size of the boundry circle the tag uses to take effect.
I would like to draw this boundary circle so its clearly visible to the user. To do this I have come up with this
Bool TagPlugin::Draw(PluginTag *tag, BaseObject *op, BaseDraw *bd, BaseDrawHelp *bh)
{
BaseContainer *data = tag->GetDataInstance();
Real rRadius = data->GetReal(IDC_RADIUS, 100.0);
Vector vPos = bd->WS(op->GetMg().off);
bd->Circle2D(vPos.x,vPos.y, rRadius);
return TRUE;
}
This will draw a circle in the viewport, but when zoooming in or out, the circle stays exactly the same size in the viewport because rRadius is always (100 in this example)
How can I convert this radius variable so it correctly draws the circle the correct size no matter how much I have zoomed?
Thanks
Ian Gorse