Exemplo n.º 1
0
        protected static ColliderSliceResult PrepareSliceCollider(Vector3 locPos, Collider collider, Mesh mesh, Plane plane)
        {
            var                 result        = new ColliderSliceResult();
            IBzSliceAdapter     adapter       = new BzSliceColliderAdapter(mesh.vertices, collider.gameObject);
            BzMeshDataDissector meshDissector = new BzMeshDataDissector(mesh, plane, null, adapter, null);

            result.SliceResult      = SliceResult.Sliced;
            result.OriginalCollider = collider;
            result.meshDissector    = meshDissector;

            return(result);
        }
Exemplo n.º 2
0
        protected static ColliderSliceResult PrepareSliceCollider(Collider collider, Mesh mesh, Plane plane)
        {
            var                   result        = new ColliderSliceResult();
            IBzSliceAdapter       adapter       = new BzSliceColliderAdapter(mesh.vertices, collider.gameObject);
            SliceConfigurationDto conf          = BzSliceConfiguration.GetDefault();
            BzMeshDataDissector   meshDissector = new BzMeshDataDissector(mesh, plane, null, adapter, conf);

            result.SliceResult      = SliceResult.Sliced;
            result.OriginalCollider = collider;
            result.meshDissector    = meshDissector;

            return(result);
        }