#include <volumerayintersector.h>
Internal. VolumeRayIntersectorInterface allows to access perform volume-ray intersection.
Public Member Functions | |
| MAXON_METHOD Result< void > | Init (const Volume &volumeObject, Bool isSDF=false) | 
| MAXON_METHOD Result< Bool > | GetClosestHit (const VolumeRay &ray, VolumeRayHit< TYPE > &hit, VOLUME_RAY_TYPE rayType=VOLUME_RAY_TYPE::WORLD_SPACE) | 
| MAXON_METHOD Result< Bool > | GetClosestHit (const VolumeRay &ray, VolumeRayHit< TYPE > &hit, const maxon::GridAccessorRef< TYPE > &accessor, VOLUME_RAY_TYPE rayType=VOLUME_RAY_TYPE::WORLD_SPACE) | 
| MAXON_METHOD Result< Bool > | GetClosestHit (const VolumeRay &ray, VolumeRayHit< TYPE > &hit, Delegate< Bool(TYPE, Bool)> &&condition, const maxon::GridAccessorRef< TYPE > &accessor, VOLUME_RAY_TYPE rayType=VOLUME_RAY_TYPE::WORLD_SPACE) | 
| MAXON_METHOD Result< Bool > | GetAllHits (const VolumeRay &ray, BaseArray< VolumeRayHit< TYPE >> &hit, Delegate< Bool(TYPE, Bool)> &&condition, const maxon::GridAccessorRef< TYPE > &accessor, VOLUME_RAY_TYPE rayType=VOLUME_RAY_TYPE::WORLD_SPACE) | 
Static Public Member Functions | |
| static MAXON_FUNCTION Result< VolumeRayIntersectorRef< TYPE > > | Create () | 
Private Member Functions | |
| MAXON_INTERFACE_SIMPLE_VIRTUAL (VolumeRayIntersectorInterface, MAXON_REFERENCE_NORMAL) | |
      
  | 
  private | 
      
  | 
  static | 
| MAXON_METHOD Result<void> Init | ( | const Volume & | volumeObject, | 
| Bool | isSDF = false  | 
        ||
| ) | 
Initialize the intersector with a volume object in a read only state.
| [in] | volumeObject | The volume object to initialize this intersector for. | 
| [in] | isSDF | If true this volume is interpreted as SDF and an SDF intersector is used instead of a value intersector. | 
| MAXON_METHOD Result<Bool> GetClosestHit | ( | const VolumeRay & | ray, | 
| VolumeRayHit< TYPE > & | hit, | ||
| VOLUME_RAY_TYPE | rayType = VOLUME_RAY_TYPE::WORLD_SPACE  | 
        ||
| ) | 
Perform a ray-volume intersection and gives the position of the hit (if any), but does not retrieve the value of the volume at the intersection point.
| [in] | ray | The ray used for the intersection test. | 
| [in] | hit | The structure holding the two intersection points. | 
| [in] | rayType | The space this ray should be cast in. | 
| MAXON_METHOD Result<Bool> GetClosestHit | ( | const VolumeRay & | ray, | 
| VolumeRayHit< TYPE > & | hit, | ||
| const maxon::GridAccessorRef< TYPE > & | accessor, | ||
| VOLUME_RAY_TYPE | rayType = VOLUME_RAY_TYPE::WORLD_SPACE  | 
        ||
| ) | 
Perform a ray-volume intersection and gives the position of the hit (if any), as well as the value of the volume at the intersection point.
| [in] | ray | The ray used for the intersection test. | 
| [in] | hit | The structure holding the two intersection points and the value. | 
| [in] | accessor | The accessor to use to sample the volume's value with. | 
| [in] | rayType | The space this ray should be cast in. | 
| MAXON_METHOD Result<Bool> GetClosestHit | ( | const VolumeRay & | ray, | 
| VolumeRayHit< TYPE > & | hit, | ||
| Delegate< Bool(TYPE, Bool)> && | condition, | ||
| const maxon::GridAccessorRef< TYPE > & | accessor, | ||
| VOLUME_RAY_TYPE | rayType = VOLUME_RAY_TYPE::WORLD_SPACE  | 
        ||
| ) | 
Perform a ray-volume intersection and gives the position of the first hit (if any) that verifies the given condition, and also gives the value of the volume at the intersection point.
| [in] | ray | The ray used for the intersection test. | 
| [in] | hit | The structure holding the two intersection points and the value. | 
| [in] | condition | The condition that needs to be fulfilled to choose an intersection point. The algorithm works by looking at the intersection points in a closest-first order, and stops and returns at the first point that fulfills the condition. | 
| [in] | accessor | The accessor to use to sample the volume's value with. | 
| [in] | rayType | The space this ray should be cast in. | 
| MAXON_METHOD Result<Bool> GetAllHits | ( | const VolumeRay & | ray, | 
| BaseArray< VolumeRayHit< TYPE >> & | hit, | ||
| Delegate< Bool(TYPE, Bool)> && | condition, | ||
| const maxon::GridAccessorRef< TYPE > & | accessor, | ||
| VOLUME_RAY_TYPE | rayType = VOLUME_RAY_TYPE::WORLD_SPACE  | 
        ||
| ) | 
Perform a ray-volume intersection and gives the position of all the hits (if any) that verify the given condition, and also gives the value of the volume at each intersection point.
| [in] | ray | The ray used for the intersection test. | 
| [in] | hit | The structure holding the two intersection points and the value. | 
| [in] | condition | The condition that needs to be fulfilled to choose an intersection point. The algorithm works by looking at the intersection points in a closest-first order, and stops and returns at the first point that fulfills the condition. | 
| [in] | accessor | The accessor to use to sample the volume's value with. | 
| [in] | rayType | The space this ray should be cast in. |