Math XNA

posted on 11 Oct 2007 11:52 by xnanoob  in Math

Math


XNA มีความสามารถทางคณิตศาสตร์ที่จำเป็นสำหรับเกม เช่น Vector2, Vector3, Vector4, Matrix, Plane, Ray เป็นต้น รวมถึง bounding volume เช่น BoundingBox, BoundingSphere และ BoundingFrustum ซึ่งสามารถคำนวณ intersection และ containment test ได้ ที่ต้องสังเกตคือ Math ทั้งหมดเป็น right-handed เพื่อให้ไม่ต้องทำ function ให้เป็นสองชุดจึงสะดวกต่อการสร้าง content ตลอดจนการใช้ middleware ด้วย (แต่ถ้าต้องการจริงๆ ก็เรียก Left-handded API ได้ด้วย)

 

The XNA Framework provides the Vector2, Vector3, and Vector4 classes for representing and manipulating vectors. Each vector class has methods for performing standard vector operations such as dot product, cross product, normalization, transformation, and interpolation.

Matrix Creation and Manipulation

The XNA Framework provides the Matrix class for transformation of vectors. The Matrix class provides methods for performing standard matrix operations such as addition, subtraction, and multiplication, in addition to helper methods for creating scale, translation, and rotation matrices.

Testing for Intersection and Containment of Geometry

The XNA Framework provides the BoundingBox, BoundingFrustum, BoundingSphere, Plane, and Ray classes for representing world geometry. These classes have methods for checking for intersection and containment with each other.

Mathematical Constants and Scalar Manipulation

The XNA Framework provides the MathHelper class for manipulating scalar values and retrieving some common mathematical constants. The MathHelper class also has utility methods for converting between degrees and radians.

.....

 

......

เช่า ห้อง apartment ห้องเช่า รายเดือน 

edit @ 12 Dec 2007 15:30:24 by xnanoob

Comment



smilebig smileopen-mounthed smileconfused smilesad smileangry smiletonguequestionembarrassedsurprised smilewinkdouble winkcry

โห ระดับนี้กันเลยทีเดียว
สู้ๆค่าconfused smile

#1 By mamaji on 2007-10-12 00:27