! Intersects a single ray with the scene. */
| 143 | |
| 144 | /*! Intersects a single ray with the scene. */ |
| 145 | __forceinline bool intersect (RayHit& ray, unsigned int geomID, unsigned int primID, RayQueryContext* context) |
| 146 | { |
| 147 | assert(primID < size()); |
| 148 | |
| 149 | int mask = -1; |
| 150 | IntersectFunctionNArguments args; |
| 151 | args.valid = &mask; |
| 152 | args.geometryUserPtr = userPtr; |
| 153 | args.context = context->user; |
| 154 | args.rayhit = (RTCRayHitN*)&ray; |
| 155 | args.N = 1; |
| 156 | args.geomID = geomID; |
| 157 | args.primID = primID; |
| 158 | args.geometry = this; |
| 159 | args.forward_scene = nullptr; |
| 160 | args.args = context->args; |
| 161 | |
| 162 | IntersectFuncN intersectFunc = nullptr; |
| 163 | intersectFunc = intersectorN.intersect; |
| 164 | |
| 165 | if (context->getIntersectFunction()) |
| 166 | intersectFunc = context->getIntersectFunction(); |
| 167 | |
| 168 | assert(intersectFunc); |
| 169 | intersectFunc(&args); |
| 170 | |
| 171 | return mask != 0; |
| 172 | } |
| 173 | |
| 174 | /*! Tests if single ray is occluded by the scene. */ |
| 175 | __forceinline bool occluded (Ray& ray, unsigned int geomID, unsigned int primID, RayQueryContext* context) |
nothing calls this directly
no test coverage detected