Exemplo n.º 1
0
        public static MeshSource CreateShared(float4x4 localToWorld, BlobAssetReference <MeshSourceData> sharedData, int layer, byte area, byte flag, int sharedMeshId, int customData = 0)
        {
            MeshSourceInfo info = new MeshSourceInfo {
                Layer = layer, Area = area, Flag = flag, CustomData = customData
            };

            info.Bounds       = MeshSourceData.CalculateBounds(localToWorld, sharedData);
            info.TRS          = localToWorld;
            info.SharedMeshId = sharedMeshId;

            return(new MeshSource {
                Info = info
            });
        }
Exemplo n.º 2
0
        public static MeshSource Create(float4x4 localToWorld, Mesh mesh, int layer, byte area, byte flag, int customData = 0)
        {
            MeshSource     source = new MeshSource();
            MeshSourceInfo info   = new MeshSourceInfo {
                Layer = layer, Area = area, Flag = flag, CustomData = customData
            };

            source.Value = MeshSourceData.Create(mesh, localToWorld);
            info.Bounds  = MeshSourceData.CalculateBounds(source.Value);

            source.Info = info;

            return(source);
        }