Occluderclass | sense.t[693] |
Superclass Tree | Subclass Tree | Global Objects | Property Summary | Method Summary | Property Details | Method Details |
This class is useful for situations where the view from one location to another is partially obstructed. For example, suppose we have two rooms, connected by a window between them. The window is the sense connector that connects the two top-level locations, and it makes objects in one room visible from the point of view of the other room. Suppose that one room contains a bookcase, with its back to the window. From the point of view of the other room, we can't see anything inside the bookcase. This class allows for such special situations.
Note that occlusion rules are applied "globally" within a room - that is, anything that an Occluder occludes will be removed from view, even if it's visible from another, non-occluding connector. Hence, occlusion always takes precedence over "inclusion" - if an object is occluded just once, then it won't be in view, no matter how many times it's added back into view by other connectors. This comes from the order in which the occlusion rules are considered. Occlusion rules are always run last, and they can't distinguish the connector that added an object to view. So, we first run around and collect up everything that can be seen, by considering all of the different paths to seeing those things. Then, we go through all of the occlusion rules that apply to the room, and we remove from view everything that the occluding connectors want to occlude.
class
Occluder : object
clearSenseInfo
finishSensePath
occludeObj
clearSenseInfo ( ) | sense.t[712] |
finishSensePath (objs, sense) | sense.t[735] |
Since our job is to occlude certain objects from view, we'll run through the table and test each object using our occlusion rule. If we find that we do occlude an object, we'll set its transparency to 'opaque' to indicate that it cannot be seen.
occludeObj (obj, sense, pov) | sense.t[700] |