How To use DrawPolygonObject ?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/06/2012 at 09:52, xxxxxxxx wrote:
Ack!Sorry again.
There's so many versions of code in this thread I was getting them mixed up.Earlier Matthias posted this:
sphere = (PolygonObject* )GeneratePrimitive(bh->GetDocument(), Osphere, BaseContainer(), 1.0, FALSE, NULL);
Which converts a BaseObject to a polygon Object.
But I now just noticed that you used this differently:sphere = (BaseObject* )GeneratePrimitive(node->GetDocument(), Osphere, BaseContainer(), 1.0, FALSE, NULL);
Which should be ok.
But I'm not sure you actually need to have the (BaseObject* ) code in there.I've never created a primitive object with a C++ generator plugin. But I do have a python example of doing that. And it's created in the GetVirtualObjects() method.
Based on how "return" is used the same way to generate an object in both the pyGenerator object. And the C++ GetVirtualObjects() method. My guess is that GetVirtualObjects() is where we are supposed to do it.
But that's just a guess.-ScottA