Notifications
Clear all

[Closed] remaking geometry theory c++

the face center is for collecting faces for constraining a ray intersect for a conform plugin I set the range and collect a subset of faces to do a more precise ray trace on. Obviously I know the types of mesh it’s used on so I don’t have to worry about some troublesome scenarios

as i have a time i will write a mxs kbtree class and share the code

Is it better to work with a PolyObject vs TriObject when making fresh Geo? When using a PolyObject can you use Mesh and MNMesh or is it MNMesh only?

neither the best approach is to do it as a modifier and if its a PolyObject you handle the mnmesh and if it’s a TriObject you handle the mesh…

if(obj->IsSubClassOf(triObjectClassID))  // Handle any triobject types
 	{
 		ObjectModify((TriObject*)obj, p,t);
 	}
 	else if(obj->IsSubClassOf(polyObjectClassID)) // Handle any PolyObject types
 	{
 		ObjectModify((PolyObject*)obj,p, t);
 	}
 	else if(obj->IsSubClassOf(patchObjectClassID))  // Handle any PatchObject types
 	{
 		ObjectModify((PatchObject*)obj, p, t);
 	}
 	else if(obj->CanConvertToType(triObjectClassID)) // all others should try to convert to a triobject, 
 	{
 		TriObject  *triOb = (TriObject *)obj->ConvertToType(t, triObjectClassID);
 		os->obj = triOb; // Now stuff this into the pipeline!
 		ObjectModify(triOb, p ,t);
 	}

It does look like MNMesh has so may more options than Mesh. But is seems like most people go down to Mesh. Any pitfalls working with MNMesh to repair or build new Geo?

Page 2 / 2