| 137 | } |
| 138 | |
| 139 | bool BoxBrush::Intersects(int32 surfaceIndex, const Ray& ray, Real& distance, Vector3& normal) const |
| 140 | { |
| 141 | distance = MAX_Real; |
| 142 | normal = Vector3::Up; |
| 143 | auto scene = GetScene(); |
| 144 | CHECK_RETURN(scene, false); |
| 145 | |
| 146 | // Get surface data handle |
| 147 | CSG::SceneCSGData::SurfaceData surfaceData; |
| 148 | if (scene->CSGData.TryGetSurfaceData(GetBrushID(), surfaceIndex, surfaceData)) |
| 149 | { |
| 150 | return surfaceData.Intersects(ray, distance, normal); |
| 151 | } |
| 152 | return false; |
| 153 | } |
| 154 | |
| 155 | void BoxBrush::GetVertices(int32 surfaceIndex, Array<Vector3>& outputData) const |
| 156 | { |
no test coverage detected