12 |
|
|
13 |
|
/* |
14 |
|
* Clipping objects permit holes and sections to be taken out |
15 |
< |
* of other objects. The method is simple: |
15 |
> |
* of other objects. |
16 |
|
* |
17 |
|
* The argument is the clipped materials; |
18 |
|
* the first is used to shade upon exit. |
19 |
+ |
* |
20 |
+ |
* In the simple case of the first argument being "void", we |
21 |
+ |
* just add or subtract (depending on whether we're coming or going) |
22 |
+ |
* the list of modifiers to the ray's "newcset", which will then |
23 |
+ |
* take over for "clipset" on penetration. Any surface modifier |
24 |
+ |
* names found in "clipset" will be treated as invisible in raycont(). |
25 |
+ |
* |
26 |
+ |
* In the more complicated case of a non-void material as the |
27 |
+ |
* first argument, we have to backtrack up the ray tree to count |
28 |
+ |
* the number of times we've penetrated the front side of one of |
29 |
+ |
* the surfaces we care about. This relies on outward-facing |
30 |
+ |
* surface normals and closed objects, so is somewhat error-prone. |
31 |
|
*/ |
32 |
|
|
33 |
|
|