Faster Python bindings for Assimp.
Project description
It uses the same naming as the original library, so examples from the official docs can be used directly (minus C
sintaxis, of course).
_Example usage:_
from assimpcy import aiImportFile, aiPostProcessSteps as pp
flags = pp.aiProcess_JoinIdenticalVertices | pp.aiProcess_Triangulate
scene = aiImportFile('model.x', flags)
print('\tHas {} meshes, {} textures, {} materials, {} animations.'.format(scene.mNumMeshes, scene.mNumTextures,
scene.mNumMaterials, scene.mNumAnimations))
# Check mesh.Has* before extracting corresponding mesh.m* (Vertices, Normals, etc)
if scene.HasMeshes and scene.mMeshes[0].HasPositions:
v = scene.mMeshes[0].mNumVertices / 2
print('Vertex {} = {}'.format(v, scene.mMeshes[0].mVertices[v]))
Matrices, quaternions and vectors are returned as Numpy arrays.
sintaxis, of course).
_Example usage:_
from assimpcy import aiImportFile, aiPostProcessSteps as pp
flags = pp.aiProcess_JoinIdenticalVertices | pp.aiProcess_Triangulate
scene = aiImportFile('model.x', flags)
print('\tHas {} meshes, {} textures, {} materials, {} animations.'.format(scene.mNumMeshes, scene.mNumTextures,
scene.mNumMaterials, scene.mNumAnimations))
# Check mesh.Has* before extracting corresponding mesh.m* (Vertices, Normals, etc)
if scene.HasMeshes and scene.mMeshes[0].HasPositions:
v = scene.mMeshes[0].mNumVertices / 2
print('Vertex {} = {}'.format(v, scene.mMeshes[0].mVertices[v]))
Matrices, quaternions and vectors are returned as Numpy arrays.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
AssimpCy-1.0.0.tar.gz
(7.7 kB
view hashes)
Built Distribution
Close
Hashes for AssimpCy-1.0.0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7264f96c7404aaa15c3addcc53358d8a202954b7dc95ceb4f2f765e9651fae37 |
|
MD5 | 9a78657b61a58d83ad8487d53c0c70d0 |
|
BLAKE2b-256 | 33097685a6b7de1cb27cc5c79475871b0605e5d6aa7bae7c67e185014d1fb4aa |