[Closed] SetAttachMat and SetCondenseMat from EditPolyObject
I would like to access the AttachMat and CondenseMat settings of an Editable poly object inherited from AttachMatDlgUser, i.e. these ones:
EditPolyObject::GetAttachMat
EditPolyObject::SetAttachMat
EditPolyObject::GetCondenseMat
EditPolyObject::SetCondenseMat
Looking at the SDK samples, I found
PolyObject *obj = (PolyObject *)os.obj;
EditPolyObject *pobj = (EditPolyObject *)obj;
Now, I can get the PolyObject in C#, that’s no problem, but how do I cast it there? I couldn’t find any matching type. For the record, trying to find some example of casting to AttachMatDlgUser proved to be even more futile.
Did you get it?
I don’t understand well what you want to cast in C# to try to help you (with my limited know-how…).
No, still no progress, it seems that there’s no way to get EditPolyObject C# side. There’s PolyObject, IEPoly etc. and all of them are not that hard to access. Still, I’m only interested in the base class AttachMatDlgUser which it is derived from and overrides its methods – C++ side, the pointer to the EditPolyObject can be cast to a pointer to AttachMatDlgUser and used this way – and the pointer to a PolyObject can be cast to a pointer to EditPolyObject. However, C# side, I don’t have anything to cast the PolyObject to as EditPolyObject isn’t exposed, and trying to cast the PolyObject directly to IAttachMatDlgUser results in a runtime error…