예제 #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)