Ejemplo n.º 1
0
Archivo: base.py Proyecto: 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
Ejemplo n.º 2
0
Archivo: base.py Proyecto: 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
Ejemplo n.º 3
0
Archivo: base.py Proyecto: yymath/menpo
 def __init__(self, filepath, texture=True):
     MeshImporter.__init__(self, filepath, texture=texture)
     self.ai_importer = AIImporter(filepath)
Ejemplo n.º 4
0
Archivo: base.py Proyecto: dubzzz/menpo
 def __init__(self, filepath, texture=True):
     MeshImporter.__init__(self, filepath, texture=texture)
     self.ai_importer = AIImporter(filepath)
Ejemplo n.º 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)