示例#1
0
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;
			}
		}
	}
}
示例#2
0
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);
	}
}		
示例#3
0
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;
				}
			}
		}
	}
}