【D3D9日记】圆球、圆柱中的Stack与Slices

来源:互联网 发布:淘宝店铺运营策划书 编辑:程序博客网 时间:2024/04/26 13:37

摘自 http://chumbalum.swissquake.ch/ms3d/help/htmlfiles/Primitives/PrimSphere.html

Sphere Primitive

A sphere is constructed of stacks and slices. As the names suggest stack is the number of segments on the Y plane and slices is the number of segments in the X plane.

The point at which the mouse is clicked to create the sphere is where the origin of the sphere will lie. To achieve the sphere in the image (for example) I clicked in the centre point of the three coloured axis anddragged up to the next grid line directly above. The number of polygons in the above sphere is 120.

This image shows a greater detail in the sphere, this was achieved by multiplying the stacks and slices by two. The total number of polygons in this scene is 528. The formula for the number of triangles that will be in sphere is (((Stacks - 2) * Slices) * 2) + (Slices * 2).

 

0 0
原创粉丝点击