示例#1
0
文件: base.py 项目: yymath/menpo
class AssimpImporter(MeshImporter):
    """
    Uses assimp to import meshes. The assimp importing is wrapped via cython,

    Parameters
    ----------
    filepath : string
        Absolute filepath of the mesh.
    """
    def __init__(self, filepath, texture=True):
        MeshImporter.__init__(self, filepath, texture=texture)
        self.ai_importer = AIImporter(filepath)

    def _parse_format(self):
        r"""
        Use assimp to build the mesh and get the relative texture path.
        """
        self.ai_importer.build_scene()
        self.meshes = self.ai_importer.meshes
        self.relative_texture_path = self.ai_importer.assimp_texture_path
示例#2
0
文件: base.py 项目: dubzzz/menpo
class AssimpImporter(MeshImporter):
    """
    Uses assimp to import meshes. The assimp importing is wrapped via cython,

    Parameters
    ----------
    filepath : string
        Absolute filepath of the mesh.
    """
    def __init__(self, filepath, texture=True):
        MeshImporter.__init__(self, filepath, texture=texture)
        self.ai_importer = AIImporter(filepath)

    def _parse_format(self):
        r"""
        Use assimp to build the mesh and get the relative texture path.
        """
        self.ai_importer.build_scene()
        self.meshes = self.ai_importer.meshes
        self.relative_texture_path = self.ai_importer.assimp_texture_path
示例#3
0
文件: base.py 项目: yymath/menpo
 def __init__(self, filepath, texture=True):
     MeshImporter.__init__(self, filepath, texture=texture)
     self.ai_importer = AIImporter(filepath)
示例#4
0
文件: base.py 项目: dubzzz/menpo
 def __init__(self, filepath, texture=True):
     MeshImporter.__init__(self, filepath, texture=texture)
     self.ai_importer = AIImporter(filepath)
示例#5
0
 def __init__(self, filepath, texture=True):
     from cyassimp import AIImporter  # expensive import
     MeshImporter.__init__(self, filepath, texture=texture)
     self.ai_importer = AIImporter(filepath)