Rectangular Bounding Volumes for Popular Primitives
暂无分享,去创建一个
Publisher Summary This chapter provides derivations and source code for the generation of minimal bounding volumes for a cube, a group of polygons, a sphere, a cylinder, a cone, and a torus. The methods described in the chapter suggest that each object in an environment is created by applying a cumulative transformation matrix (CTM) to a canonical primitive object. To calculate the bounding volumes, components of the primitive object are transformed using a CTM. Extrema of the transformed components are then calculated. Those extrema are used to determine the extents of the bounding volume. The bounding volume for a cube is easily calculated by transforming each corner of the cube and performing simple min/max tests. Collections of polygons can be bounded in a manner similar to that for cubes. By transforming the circles at both ends of a cylinder and finding the extrema of those circles, a tight bounding volume can be determined. The bounding volume of a cone is calculated using the circle component formed by its base and the point component formed by its apex. A bounding volume can be generated for a spheroid by finding the extrema of the surface in world coordinates.