private static MeshDraft GenerateFacade(Vector3 a, Vector3 b, FacadeLayout facadeLayout)
        {
            var facadeDraft = facadeLayout.GetMeshDraft();

            Vector3 normal   = Vector3.Cross(Vector3.up, (b - a).normalized).normalized;
            var     rotation = Quaternion.LookRotation(-normal);

            facadeDraft.Rotate(rotation);
            facadeDraft.Move(a);
            return(facadeDraft);
        }
Exemplo n.º 2
0
        private static CompoundMeshDraft GenerateFacadeCompoundMeshDraft(Vector3 a, Vector3 b, FacadeLayout facadeLayout)
        {
            var facadeCompoundDraft = facadeLayout.GetCompoundMeshDraft();

            Vector3 normal   = Vector3.Cross(Vector3.up, (b - a).normalized).normalized;
            var     rotation = Quaternion.LookRotation(-normal);

            foreach (var draft in facadeCompoundDraft)
            {
                draft.Rotate(rotation);
                draft.Move(a);
            }
            return(facadeCompoundDraft);
        }