Computer Science 102 Quiz 6 Name ______________________ 1. Suppose a ray is fired from the viewpoint V in direction D hits the plane at a distance t from V. The coordinates of the hitpoint are: a. P + tN b. V + tP c. D + tV d. V + tD 2. The use of a function pointer hits in the object structure double (*hits)(vec_t *base, vec_t *dir, struct object_type *); allows us to mimic what facility of a true O-O language in C. a. polymorphism d. inheritance c. unitarianism d. nihilism 3. Suppose a ray is fired from coordinate (4, 3, 6) in direction (0.707, 0, -0.707). Assuming it hits an object at a distance 10 units from the source (4, 3, 6) what are the coordinates of the hit point. 4. We will employ a distributed parsing strategy in which each specialization within the inheritance heirarchy is responsible for reading its own attributes. (e.g. object_init reads material but plane_init reads point and normal). Our system is designed to be compatible with C++. This will force us to specify the color of an object (e.g. material green) a. first b. last c. anywhere