最新评论

re: 打造属于自己的sample framework(一) 血琉璃 2009-03-28 18:06  
十分欣慰能和大家交流学习!我的qq是1052118871
能不能把整份代码给我发一份?感激不尽……我要好好学习一下 spline2002@hotmail.com
楼主有没有关于sample framework的资料,我最近正在学习,有的话发我一份吧,spline2002@hotmail.com
请问能不能把整份代码给我发一份?感激不尽…… hefujun0212@163.com
re: 打造属于自己的sample framework(一) 等鹰的鱼 2007-05-16 23:15  
楼上关于全面点是指什么方面呢?
是sample framework,还是关于上面的文章的代码之类
能全面点么
re: 打造属于自己的sample framework(一) .net专题网 2007-05-16 20:44  
现在还是关心 xna
re: 打造属于自己的sample framework(一) 等鹰的鱼 2007-05-16 10:43  
@CristalWood
modelRotation *= viewMatrix * modelLastRotInv * localModel * invView;
是由于 模型在上一帧的时候已经旋转了lastModelRotation 所以要乘以逆矩阵modelLastRotInv 。
arcball是sample framework的旋转引擎,然后还要乘以世界坐标系的旋转矩阵。
然后在乘以观察矩阵的逆矩阵。
由于每帧之间是modelRotation的基础上再旋转的所有就有了上面的表达示。

至于为什么invView.M41 = invView.M42 = invView.M43 = 0;
我也不是很清楚,因为没有这一步,也可以达到一样的运行效果.
建议建一个QQ群,大家交流学习一下;
QQ:68140637
:)
受益匪浅,楼主是否考虑写一系列的关于directx的文章
re: 打造属于自己的sample framework(一) CristalWood 2007-05-15 21:03  
各位为这么关注Sample framework,建一个QQ群怎么样?
re: 打造属于自己的sample framework(一) CristalWood 2007-05-15 20:21  
请教,对于ModelViewerCamera的void FrameMove(float elapsedTime)函数里面的:
// Update the view matrix
viewMatrix = Matrix.LookAtLH(eye, lookAt, worldUp);
Matrix invView = Matrix.Invert(viewMatrix);
invView.M41 = invView.M42 = invView.M43 = 0; // 这里发生了什么事情?
Matrix modelLastRotInv = Matrix.Invert(lastModelRotation);

// Accumulate the delta of the arcball's rotation in view space.
// Note that per-frame delta rotations could be problematic over long periods of time.
Matrix localModel = worldArcball.RotationMatrix;
modelRotation *= viewMatrix * modelLastRotInv * localModel * invView; // 这里是什么意思?