コード例 #1
0
        public static SHP1 Create(Scene scene, Dictionary <string, int> boneNames, VertexData vertData,
                                  EVP1 evp1, DRW1 drw1, string tristrip_mode = "static")
        {
            SHP1 shp1 = new SHP1(scene, vertData, boneNames, evp1, drw1, tristrip_mode);

            return(shp1);
        }
コード例 #2
0
ファイル: MAT3.cs プロジェクト: darealwhitechocolate/SuperBMD
        public MAT3(Assimp.Scene scene, TEX1 textures, SHP1 shapes)
        {
            InitLists();

            for (int i = 0; i < scene.MeshCount; i++)
            {
                Assimp.Material    meshMat     = scene.Materials[scene.Meshes[i].MaterialIndex];
                Materials.Material bmdMaterial = new Material();

                bool hasVtxColor0 = shapes.Shapes[i].AttributeData.CheckAttribute(GXVertexAttribute.Color0);
                int  texIndex     = -1;
                if (meshMat.HasTextureDiffuse)
                {
                    string texName = Path.GetFileNameWithoutExtension(meshMat.TextureDiffuse.FilePath);
                    texIndex = textures.Textures.IndexOf(textures[texName]);
                }

                bmdMaterial.SetUpTev(meshMat.HasTextureDiffuse, hasVtxColor0, texIndex);

                m_Materials.Add(bmdMaterial);
                m_RemapIndices.Add(i);
                m_MaterialNames.Add(meshMat.Name);
            }

            FillMaterialDataBlocks();
        }
コード例 #3
0
        public static SHP1 Create(Scene scene, Dictionary <string, int> boneNames, VertexData vertData, EVP1 evp1, DRW1 drw1,
                                  string tristrip_mode = "static", bool degenerateTriangles = false)
        {
            SHP1 shp1 = new SHP1(scene, vertData, boneNames, evp1, drw1, tristrip_mode, degenerateTriangles);

            return(shp1);
        }