| 2789 | } |
| 2790 | |
| 2791 | bool ShapeBase::castRay(const Point3F &start, const Point3F &end, RayInfo* info) |
| 2792 | { |
| 2793 | if (mShapeInstance) |
| 2794 | { |
| 2795 | RayInfo shortest; |
| 2796 | shortest.t = 1e8; |
| 2797 | |
| 2798 | info->object = NULL; |
| 2799 | for (U32 i = 0; i < mDataBlock->LOSDetails.size(); i++) |
| 2800 | { |
| 2801 | mShapeInstance->animate(mDataBlock->LOSDetails[i]); |
| 2802 | if (mShapeInstance->castRay(start, end, info, mDataBlock->LOSDetails[i])) |
| 2803 | { |
| 2804 | info->object = this; |
| 2805 | if (info->t < shortest.t) |
| 2806 | shortest = *info; |
| 2807 | } |
| 2808 | } |
| 2809 | |
| 2810 | if (info->object == this) |
| 2811 | { |
| 2812 | // Copy out the shortest time... |
| 2813 | *info = shortest; |
| 2814 | return true; |
| 2815 | } |
| 2816 | } |
| 2817 | |
| 2818 | return false; |
| 2819 | } |
| 2820 | |
| 2821 | bool ShapeBase::castRayRendered(const Point3F &start, const Point3F &end, RayInfo* info) |
| 2822 | { |
no test coverage detected