THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/04/2009 at 08:06, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R11.026
Platform: Windows ; Mac OSX ;
Language(s) : C++ ;
---------
Hello,
i want to visualize ngons with the GetVirtualObject-Method in my generatorobject after i already visualized normal polygons. In principle my "datatype" has the same information as the code from the documentation below.
> \> BaseObject \*ret = BaseObject::Alloc(Onull); \> \> AutoAlloc<PolygonObject> obj(0,0); //begin of example \> if (!obj) return FALSE; \> \> AutoAlloc<Modeling> mod; \> if (!mod || !mod->InitObject(obj)) return FALSE; \> \> LONG a = mod->AddPoint(obj, Vector(0,0,0)); \> LONG b = mod->AddPoint(obj, Vector(100,0,0)); \> LONG c = mod->AddPoint(obj, Vector(150,50,0)); \> LONG d = mod->AddPoint(obj, Vector(100,100,0)); \> LONG e = mod->AddPoint(obj, Vector(0,100,0)); \> if (!a || !b || !c || !d || !e) return FALSE; \> \> LONG padr[] = {a,b,c,d,e}; \> LONG cnt = sizeof(padr)/sizeof(padr[0]); \> \> LONG i = mod->CreateNgon(obj, padr, cnt); \> if (!i) return FALSE; \> \> if (!mod->Commit()) return FALSE; //end of example \> \> obj->InsertUnderLast(ret); \>
Did i forget something or did i overlook a fault?
Thanks for help