DirectXMesh几何处理库
DirectXMesh 是微软开发的 DirectX 的几何处理库。
示例代码:
std::unique_ptr<WaveFrontReader<uint16_t>> mesh( new WaveFrontReader<uint16_t>() ); if ( FAILED( mesh->Load( L"test.obj" ) ) ) // Error if ( mesh->hasNormals ) // Skip next computation size_t nFaces = mesh->indices.size() / 3; size_t nVerts = mesh->vertices.size(); std::unique_ptr<XMFLOAT3[]> pos( new XMFLOAT3[ nVerts ] ); for( size_t j = 0; j < nVerts; ++j ) pos[ j ] = mesh->vertices[ j ].position; std::unique_ptr<XMFLOAT3[]> normals( new XMFLOAT3[ nVerts ] ); if ( FAILED( ComputeNormals( &mesh->indices.front(), nFaces, pos.get(), nVerts, CNORM_DEFAULT, normals.get() ) ) ) // Error if ( !mesh->hasTexcoords ) // Skip next computation std::unique_ptr<XMFLOAT2[]> texcoords( new XMFLOAT2[ nVerts ] ); for( size_t j = 0; j < nVerts; ++j ) texcoords[ j ] = mesh->vertices[ j ].textureCoordinate; std::unique_ptr<XMFLOAT3[]> tangents( new XMFLOAT3[ nVerts ] ); std::unique_ptr<XMFLOAT3[]> bitangents( new XMFLOAT3[ nVerts ] ); if ( FAILED( ComputeTangentFrame( &mesh->indices.front(), nFaces, pos.get(), normals.get(), texcoords.get(), nVerts, tangents.get(), bitangents.get() ) ) ) // Error
评论
PymeshPython 几何处理库
PyMesh 是一个专注于几何处理的快速原型平台。 PyMesh采用C++和Python编写的,其中计算密集型功能是用C++实现的,而Python用于创建简约且易于使用的界面。下载源要检索代码:git
PymeshPython 几何处理库
0
LagrangeAdobe 开源的几何处理库
Lagrange是Adobe开源的几何处理库,目标是将强大的几何处理能力引入Adobe产品。它将尖端的研究工作与前沿的产品联系起来。Lagrange 计划建立在以下设计原则之上:模块化设计大型
LagrangeAdobe 开源的几何处理库
0