[Inter, z, Ri, facet] = ObjectIntersect(RayOrig, RayDir, ...
v, f, fn, FacetCheck)Finds if and where a ray intersects an object.
|
Parameters |
Description |
|
RayOrig [array] |
Ray origin |
|
RayDir [array] |
Ray direction |
|
v [array] |
Location of object vertices |
|
f [array] |
Facet list |
|
fn [array] |
(Optional) Facet normals. If not input, these are computed internally. |
|
FacetCheck [logical] |
(Optional) Runs bounding box check for each facet |
|
Return Values |
Description |
|
Inter [logical] |
Flag indicating whether an intersection occurs |
|
z [vector] |
Distance to intersect for each facet intersected |
|
Ri [array] |
Point of intersection for each facet |
|
facet [vector] |
Facet(s) intercepted |
|
Copyright (c) MZA Associates 2009. All rights reserved.
|
|
What do you think about this topic? Send feedback!
|