本文整理汇总了C++中aiMatrix4x4::Transpose方法的典型用法代码示例。如果您正苦于以下问题:C++ aiMatrix4x4::Transpose方法的具体用法?C++ aiMatrix4x4::Transpose怎么用?C++ aiMatrix4x4::Transpose使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类aiMatrix4x4
的用法示例。
在下文中一共展示了aiMatrix4x4::Transpose方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: assembleAsset
void AssetImporter::assembleAsset(
ID3D11Device* d3dDevice,
const aiScene* scene,
unsigned int meshIndex,
aiMatrix4x4 transform,
GRAPHICS::RESOURCES::Mesh* meshArr,
GRAPHICS::RESOURCES::Material* materialArr,
GRAPHICS::Scene& outScene
)
{
GRAPHICS::RESOURCES::Renderable asset;
asset.mesh = meshArr[meshIndex];
asset.material = materialArr[scene->mMeshes[meshIndex]->mMaterialIndex];
asset.transformation = DirectX::XMFLOAT4X4((const float*)(&transform.Transpose()));
GRAPHICS::D3D11Utility::createBuffer<DirectX::XMFLOAT4X4>(
d3dDevice,
D3D11_BIND_CONSTANT_BUFFER,
D3D11_USAGE_DYNAMIC,
&asset.transformation,
1,
asset.transformationBuffer
);
outScene.addStaticRenderable(asset);
}
示例2: draw
void QMesh::draw(aiMatrix4x4 transform) const
{
glPushMatrix();
aiMatrix4x4 mult;
aiMatrix4x4::Translation(aiVector3D(0,-100,0), mult);
transform = mult * transform;
transform.Transpose(); //Transpose for some reason
glMultMatrixf(static_cast<GLfloat*>(transform[0]));
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, faceColor);
const GLuint *indices = geom->faces.constData();
glDrawElements(GL_TRIANGLES, count, GL_UNSIGNED_INT, indices + start);
glPopMatrix();
}