游戏开发论坛

 找回密码
 立即注册
搜索
查看: 3693|回复: 0

D3DXMatrixInverse用法疑惑

[复制链接]

1

主题

1

帖子

7

积分

新手上路

Rank: 1

积分
7
发表于 2007-11-16 10:30:00 | 显示全部楼层 |阅读模式
D3DXMatrixInverse通常用来求视图矩阵的逆阵,但是donuts4中这一段是什么用意呢?
    float Ixx, Iyy, Izz;   
    Ixx = m_fMass/12.0f * (fWidth*fWidth + fLength*fLength);
    Iyy = m_fMass/12.0f * (fHeight*fHeight + fLength*fLength);
    Izz = m_fMass/12.0f * (fWidth*fWidth + fHeight*fHeight);

    D3DXMATRIX mInertia;
    D3DXMatrixIdentity( &mInertia );
    mInertia._11 = Ixx;
    mInertia._22 = Iyy;
    mInertia._33 = Izz;

    // Store the inverse of the inertia tensor
    D3DXMatrixInverse( &m_mInertiaInv, NULL, &mInertia );

还是不明白D3DXMatrixInverse的灵活运用!!
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2025-6-18 03:12

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表