FMX.Types3D.RayCastSphereIntersect
Delphi
function RayCastSphereIntersect(const RayPos, RayDir, SphereCenter: TPoint3D; const SphereRadius: Single; var IntersectionNear, IntersectionFar: TPoint3D): Integer;
C++
extern DELPHI_PACKAGE int __fastcall RayCastSphereIntersect(const System::Math::Vectors::TPoint3D &RayPos, const System::Math::Vectors::TPoint3D &RayDir, const System::Math::Vectors::TPoint3D &SphereCenter, const float SphereRadius, System::Math::Vectors::TPoint3D &IntersectionNear, System::Math::Vectors::TPoint3D &IntersectionFar);
Propriétés
Type | Visibilité | Source | Unité | Parent |
---|---|---|---|---|
function | public | FMX.Types3D.pas FMX.Types3D.hpp |
FMX.Types3D | FMX.Types3D |
Description
Renvoie le nombre de fois que le rayon donné intersecte la sphère donnée.
RayCastSphereIntersect renvoie un nombre entier représentant le nombre de fois que le rayon donné par sa position et sa direction intersecte la sphère donnée. Si le rayon n'intersecte pas la sphère, RayCastSphereIntersect renvoie 0. Autrement, RayCastSphereIntersect peut renvoyer 1 (le rayon intersecte la sphère en exactement un point) ou 2 (le rayon intersecte la sphère en deux points -- entre dans la surface de la sphère et en sort).