游戏开发论坛

 找回密码
 立即注册
搜索
12
返回列表 发新帖
楼主: Devil

矩阵求逆函数实现,继续扫盲

[复制链接]

35

主题

1735

帖子

1739

积分

金牌会员

Rank: 6Rank: 6

积分
1739
QQ
发表于 2007-1-26 18:52:00 | 显示全部楼层

Re:矩阵求逆函数实现,继续扫盲

顶啦

3

主题

17

帖子

23

积分

注册会员

Rank: 2

积分
23
发表于 2007-1-27 14:49:00 | 显示全部楼层

Re:矩阵求逆函数实现,继续扫盲

//检验原矩阵的有效性     if(fabs(a._44 - 1.0f) > 0.001f)         return false;     if(fabs(a._14)>0.001f || fabs(a._24)>0.001f || fabs(a._34)>0.001f)         return false;


为什么是a._44?a是什么?source?

35

主题

1735

帖子

1739

积分

金牌会员

Rank: 6Rank: 6

积分
1739
QQ
发表于 2007-1-27 15:52:00 | 显示全部楼层

Re:矩阵求逆函数实现,继续扫盲

LS,a._44是矩阵a第四行第四列的元素,a是一个四阶矩阵。

32

主题

1259

帖子

1351

积分

金牌会员

Rank: 6Rank: 6

积分
1351
 楼主| 发表于 2007-1-27 20:40:00 | 显示全部楼层

Re:矩阵求逆函数实现,继续扫盲

a 是 source, 写的时候错掉了。

9

主题

688

帖子

688

积分

高级会员

Rank: 4

积分
688
发表于 2007-1-27 22:14:00 | 显示全部楼层

Re:矩阵求逆函数实现,继续扫盲

This matrix inverse algorithm assume that the fourth column of the matrix is[0 0 0 1].

The matrix generated by applying inversable transformation on identity matrix is always inversable.
In 3D games, most of us just use three kinds of inversable matrix transformation: translation, rotation and scale.of course, you can also use other kinds of inversable transformation.
So we needn't worry about that the matrix is uninversable in most times.

45

主题

1163

帖子

1165

积分

金牌会员

Rank: 6Rank: 6

积分
1165
发表于 2007-1-28 09:59:00 | 显示全部楼层

Re:矩阵求逆函数实现,继续扫盲

求逆在《3D游戏的数学方法》中讲得很清楚

15

主题

83

帖子

123

积分

注册会员

Rank: 2

积分
123
发表于 2007-1-29 01:49:00 | 显示全部楼层

Re: Re:矩阵求逆函数实现,继续扫盲

corpus: Re:矩阵求逆函数实现,继续扫盲

不可逆咋办?

求广义逆
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

GMT+8, 2026-1-26 08:05

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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