Rev | Line | |
---|
[2197] | 1 | #pragma once |
---|
| 2 | |
---|
| 3 | class Intersectable; |
---|
| 4 | |
---|
| 5 | /*!
|
---|
| 6 | \brief Result record for a ray-casting operation.
|
---|
| 7 | */ |
---|
| 8 | class HitRec { |
---|
| 9 | public: |
---|
| 10 | //! Intersectable hit by the ray |
---|
| 11 | Intersectable* object; |
---|
| 12 | |
---|
| 13 | //! point of the intersection |
---|
| 14 | Vector point; |
---|
| 15 | //! normal at the intersection |
---|
| 16 | Vector normal; |
---|
| 17 | //! texture coordinates at the intersection |
---|
| 18 | Vector texUV; |
---|
| 19 | //! Material of the Intersectable that was hit |
---|
| 20 | const Material* material; |
---|
| 21 | //! distance from ray origin |
---|
| 22 | float depth; |
---|
| 23 | |
---|
| 24 | //! valid flag |
---|
| 25 | bool isIntersect; |
---|
| 26 | |
---|
| 27 | //! constructor |
---|
| 28 | HitRec() { |
---|
| 29 | depth=0.0f; |
---|
| 30 | } |
---|
| 31 | }; |
---|
Note: See
TracBrowser
for help on using the repository browser.