The one sided triangles and cullmodes are a v0.15.0 feature, so you can't change them now. In v0.15.0, meshes and individual triangle entities will have a TriangleCullMode property.
You can find the special case handlers dictionary at Space.SimulationSettings.CollisionDetection.SpecialCaseCollisionDetectionHandlers. You will need to create a handler for every entity type pair that you will be using (e.g. hollow-sphere, hollow-box, etc.).
For simplicity, let's assume that your shape can only be kinematic. That way, we don't have to worry about inertia tensor calculations. Put this in your initialize method:
Code: Select all
ForceBoundingBoxRefit(0);
InitializeNonDynamicData();
maximumRadiusFromCenterPosition = outerRadius;
maximumRadius = maximumRadiusFromCenterPosition + centerOfMassOffset.Length();
For the get extreme points methods, normalize the direction and multiply it by the radius + margin. Add the positionToUse to that. The extreme point method won't be used for any of the collision algorithms since you will be using a special case for all of them to support concavity.
Create a collision handling delegate for the desired entity types. You can access the collision pair's Contacts list to see what's already in it. Do not add/remove contacts directly from the Contacts list; use the AddContact and RemoveContact overloads instead.
You will need to develop the algorithms to handle the pairs yourself unfortunately; I don't have time to write them up at the moment. Your hollow sphere will have an inner and outer radius. Testing other normal spheres against it will be pretty simple since it comes down to radius comparisons. You can assume that the hollow sphere and a normal sphere would only have 1 contact. Boxes will be trickier.