| 628 | } |
| 629 | |
| 630 | bool WaterBlock::castRay( const Point3F &start, const Point3F &end, RayInfo *info ) |
| 631 | { |
| 632 | // Simply look for the hit on the water plane |
| 633 | // and ignore any future issues with waves, etc. |
| 634 | const Point3F norm(0,0,1); |
| 635 | PlaneF plane( Point3F::Zero, norm ); |
| 636 | |
| 637 | F32 hit = plane.intersect( start, end ); |
| 638 | if ( hit < 0.0f || hit > 1.0f ) |
| 639 | return false; |
| 640 | |
| 641 | info->t = hit; |
| 642 | info->object = this; |
| 643 | info->point = start + ( ( end - start ) * hit ); |
| 644 | info->normal = norm; |
| 645 | info->material = mMatInstances[WaterMat]; |
| 646 | |
| 647 | return mObjBox.isContained(info->point); |
| 648 | } |
| 649 | |
| 650 | bool WaterBlock::buildPolyList( PolyListContext context, AbstractPolyList* polyList, const Box3F& box, const SphereF& ) |
| 651 | { |
nothing calls this directly
no test coverage detected