資源簡介
3D數學基礎:圖形與游戲開發(3D Math Primer for graphics and game development)中文版
3D游戲開發的經典基礎教程,數學是游戲開發的基礎啊,值得好好學習下:-)
因為上傳大小限制,我將中文版英文版分開了,想要英文版的搜索一下即可。
中文版容易看,但是掃描質量比英文版差些。
代碼片段和文件信息
/////////////////////////////////////////////////////////////////////////////
//
//?3D?Math?Primer?for?Games?and?Graphics?Development
//
//?AABB3.cpp?-?Implementation?for?class?AABB3
//
//?Visit?gamemath.com?for?the?latest?version?of?this?file.
//
//?For?more?details?see?Chapter?12
//
/////////////////////////////////////////////////////////////////////////////
#include?
#include?
#include?“AABB3.h“
#include?“Matrix4x3.h“
#include?“CommonStuff.h“
/////////////////////////////////////////////////////////////////////////////
//
//?class?AABB3?member?functions
//
/////////////////////////////////////////////////////////////////////////////
//---------------------------------------------------------------------------
//?AABB3::corner
//
//?Return?one?of?the?8?corner?points.??The?points?are?numbered?as?follows:
//
//????????????6????????????????????????????????7
//??????????????------------------------------
//?????????????/|???????????????????????????/|
//????????????/?|??????????????????????????/?|
//???????????/??|?????????????????????????/??|
//??????????/???|????????????????????????/???|
//?????????/????|???????????????????????/????|
//????????/?????|??????????????????????/?????|
//???????/??????|?????????????????????/??????|
//??????/???????|????????????????????/???????|
//?????/????????|???????????????????/????????|
//??2?/?????????|????????????????3?/?????????|
//???/----------------------------/??????????|
//???|??????????|?????????????????|??????????|
//???|??????????|?????????????????|??????????|??????+Y
//???|????????4?|?????????????????|??????????|?
//???|??????????|-----------------|----------|??????|
//???|?????????/??????????????????|?????????/??5????|
//???|????????/???????????????????|????????/????????|???????+Z
//???|???????/????????????????????|???????/?????????|
//???|??????/?????????????????????|??????/??????????|?????/
//???|?????/??????????????????????|?????/???????????|????/
//???|????/???????????????????????|????/????????????|???/
//???|???/????????????????????????|???/?????????????|??/
//???|??/?????????????????????????|??/??????????????|?/
//???|?/??????????????????????????|?/???????????????|/
//???|/???????????????????????????|/????????????????-----------------?+X
//???------------------------------
//??0??????????????????????????????1
//
//?Bit?0?selects?min.x?vs.?max.x
//?Bit?1?selects?min.y?vs.?max.y
//?Bit?2?selects?min.z?vs.?max.z
Vector3 AABB3::corner(int?i)?const?{
//?Make?sure?index?is?in?range...
assert(i?>=?0);
assert(i?<=?7);
//?Return?it
return?Vector3(
(i?&?1)???max.x?:?min.x
(i?&?2)???max.y?:?min.y
(i?&?4)???max.z?:?min.z
);
}
//---------------------------------------------------------------------------
//?AABB3::empty
//
//?“Empty“?the?box?by?setting?the?values?to?really
//?large/small?numbers
void AABB3::empty()?{
const?float?kBigNumber?=?1e37f;
min.x?=?min.y?=?min.z?=?kBi
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???14236735??2007-01-05?15:12??3D數學基礎:圖形與游戲開發.pdf
?????文件??????19525??2002-09-10?10:18??code\common\AABB3.cpp
?????文件???????2968??2002-09-10?10:18??code\common\AABB3.h
?????文件???????8100??2002-12-22?13:56??code\common\Bitmap.cpp
?????文件???????1892??2002-12-22?13:54??code\common\Bitmap.h
?????文件???????3174??2002-12-21?00:26??code\common\CommonStuff.cpp
?????文件???????1872??2003-01-07?14:33??code\common\CommonStuff.h
?????文件??????52158??2002-12-22?14:12??code\common\EditTriMesh.cpp
?????文件???????8198??2002-12-21?17:34??code\common\EditTriMesh.h
?????文件???????7687??2002-09-10?10:18??code\common\EulerAngles.cpp
?????文件???????2302??2002-09-10?10:18??code\common\EulerAngles.h
?????文件???????1800??2003-01-10?20:17??code\common\Font.h
?????文件???????5865??2003-05-24?11:32??code\common\Input.cpp
?????文件???????8024??2003-05-24?11:32??code\common\Input.h
?????文件???????1238??2002-09-10?10:18??code\common\MathUtil.cpp
?????文件???????1935??2002-12-21?00:31??code\common\MathUtil.h
?????文件??????23367??2002-09-10?10:18??code\common\Matrix4x3.cpp
?????文件???????4141??2002-09-10?10:19??code\common\Matrix4x3.h
?????文件???????7667??2002-12-22?13:23??code\common\Model.cpp
?????文件???????1972??2002-12-21?20:08??code\common\Model.h
?????文件??????10958??2002-09-10?10:19??code\common\Quaternion.cpp
?????文件???????2588??2002-09-10?10:19??code\common\Quaternion.h
?????文件??????82457??2002-12-22?13:20??code\common\Renderer.cpp
?????文件??????16087??2003-01-07?13:16??code\common\Renderer.h
?????文件???????5476??2002-09-10?10:19??code\common\RotationMatrix.cpp
?????文件???????1760??2002-09-10?10:19??code\common\RotationMatrix.h
?????文件???????5043??2002-12-22?13:07??code\common\TriMesh.cpp
?????文件???????2078??2002-12-22?13:05??code\common\TriMesh.h
?????文件???????4779??2002-09-10?10:28??code\common\vector3.h
?????文件???????6112??2003-01-07?14:44??code\common\WinMain.cpp
............此處省略14個文件信息
- 上一篇:Learning Jupyter 5
- 下一篇:高等電力網絡分析習題解答
評論
共有 條評論