| 817 | } |
| 818 | |
| 819 | int MeshPrimitiveEvaluator::intersectionPoints( const Imath::V3f &origin, const Imath::V3f &direction, |
| 820 | std::vector<PrimitiveEvaluator::ResultPtr> &results, float maxDistance ) const |
| 821 | { |
| 822 | results.clear(); |
| 823 | |
| 824 | if ( m_triangles.size() == 0) |
| 825 | { |
| 826 | return 0; |
| 827 | } |
| 828 | |
| 829 | assert( m_tree ); |
| 830 | |
| 831 | float maxDistSqrd = maxDistance * maxDistance; |
| 832 | |
| 833 | Imath::Line3f ray; |
| 834 | ray.pos = origin; |
| 835 | ray.dir = direction.normalized(); |
| 836 | |
| 837 | intersectionPointsWalk( m_tree->rootIndex(), ray, maxDistSqrd, results ); |
| 838 | |
| 839 | return results.size(); |
| 840 | } |
| 841 | |
| 842 | bool MeshPrimitiveEvaluator::barycentricPosition( unsigned int triangleIndex, const Imath::V3f &barycentricCoordinates, PrimitiveEvaluator::Result *result ) const |
| 843 | { |
no test coverage detected