ABSTRACT

This chapter aims to understand how to intersect rays with transformed objects and shows why instancing is the preferred method; and also aims to understand how readers can model numerous beveled objects. It discusses the theory of affine transformations into practice by explaining how to ray trace transformed objects. The instance hit function checks if the object’s material pointer is not null before assigning it to its own material. It also correctly handles the case where the object being transformed is a compound object containing multiple materials. Objects are also smaller because the matrix is only stored in the instances. The disadvantages are that the transformed object hit functions are accessed through an additional indirection and the build-function syntax is slightly more complex.