void EChamferMod::ModifyObject (TimeValue t, ModContext &mc, ObjectState *os, INode *node) { if (os->obj->IsSubClassOf(triObjectClassID)) ModifyTriObject (t, mc, (TriObject *)os->obj); else { if (os->obj->IsSubClassOf (polyObjectClassID)) ModifyPolyObject (t, mc, (PolyObject *)os->obj); else { if (os->obj->CanConvertToType (triObjectClassID)) { TriObject *tobj = (TriObject *) os->obj->ConvertToType (t, triObjectClassID); ModifyTriObject (t, mc, tobj); os->obj = (Object *) tobj; } } } }
void ApplyVCMod::ModifyObject(TimeValue t, ModContext &mc, ObjectState * os, INode *node) { // handle TriObjects if (os->obj->IsSubClassOf(triObjectClassID)) { TriObject *tobj = (TriObject*)os->obj; ModifyTriObject(tobj, t); } // handle PolyObjects else if (os->obj->IsSubClassOf(polyObjectClassID)) { PolyObject *pPolyObj = (PolyObject*)os->obj; ModifyPolyObject(pPolyObj, t); } // Convert to a tri mesh if possible else if(os->obj->CanConvertToType(triObjectClassID)) { TriObject *triOb = (TriObject *)os->obj->ConvertToType(t, triObjectClassID); // Now stuff this into the pipeline! os->obj = triOb; ModifyTriObject(triOb, t); } }
void VWeldMod::ModifyObject (TimeValue t, ModContext &mc, ObjectState *os, INode *node) { if (os->obj->IsSubClassOf(triObjectClassID)) ModifyTriObject (t, mc, (TriObject *)os->obj); else { if (os->obj->IsSubClassOf (polyObjectClassID)) ModifyPolyObject (t, mc, (PolyObject *)os->obj); else { #ifndef NO_PATCHES if (os->obj->IsSubClassOf (patchObjectClassID)) ModifyPatchObject (t, mc, (PatchObject *) os->obj); else #endif { if (os->obj->CanConvertToType (triObjectClassID)) { TriObject *tobj = (TriObject *) os->obj->ConvertToType (t, triObjectClassID); ModifyTriObject (t, mc, tobj); os->obj = (Object *) tobj; } } } } }