Chris Cai's Tech Blog

博客园 首页 新随笔 联系 订阅 管理

2009年11月14日 #

摘要: http://freespace.virgin.net/hugo.elias/routines/rotate.htm 阅读全文
posted @ 2009-11-14 12:41 Chris Cai 阅读(280) 评论(0) 推荐(0) 编辑

摘要: A Dot product is a very useful tool in both mechanics and 3D graphics. It calculates the cosine of the angle between two vectors. It is used in the lighting calculations and backface removal in 3D gr... 阅读全文
posted @ 2009-11-14 12:11 Chris Cai 阅读(458) 评论(0) 推荐(0) 编辑

摘要: The world is an unpredictable place. Even more so than Mr Gump's box of choclates. It would be terribly boring of there was only 1 shape of tree in the world, and every one looked the same. Likewise, ... 阅读全文
posted @ 2009-11-14 12:06 Chris Cai 阅读(323) 评论(0) 推荐(0) 编辑

摘要: This small operation calcuates the distance between two points. The routine can work in any number of dimensions, so you cold apply it to 2D or 3D. In 2D Define your two points. Point 1 at (x1, y1) a... 阅读全文
posted @ 2009-11-14 12:06 Chris Cai 阅读(347) 评论(0) 推荐(0) 编辑

摘要: Separating axis theorem:http://en.wikipedia.org/wiki/Separating_axis_theoremPolygon Collision: http://gpwiki.org/index.php/Polygon_Collision 阅读全文
posted @ 2009-11-14 11:56 Chris Cai 阅读(192) 评论(0) 推荐(0) 编辑

摘要: Dot Prodcut The dot product (inner product) of two vectors is a measure of how similar the two vectors are (how much one is projected onto the other), multiplied by the magnitudes. Two vectors that ar... 阅读全文
posted @ 2009-11-14 11:53 Chris Cai 阅读(487) 评论(0) 推荐(0) 编辑