FMX.Types3D.RayCastEllipsoidIntersect
Delphi
function RayCastEllipsoidIntersect(const RayPos, RayDir, EllipsoidCenter: TPoint3D; const XRadius, YRadius,
ZRadius: Single; var IntersectionNear, IntersectionFar: TPoint3D): Integer;
C++
extern DELPHI_PACKAGE int __fastcall RayCastEllipsoidIntersect(const System::Math::Vectors::TPoint3D &RayPos, const System::Math::Vectors::TPoint3D &RayDir, const System::Math::Vectors::TPoint3D &EllipsoidCenter, const float XRadius, const float YRadius, const float ZRadius, System::Math::Vectors::TPoint3D &IntersectionNear, System::Math::Vectors::TPoint3D &IntersectionFar);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | FMX.Types3D.pas FMX.Types3D.hpp |
FMX.Types3D | FMX.Types3D |
Description
Returns how many times the given ray intersects the given ellipsoid shape.
RayCastEllipsoidIntersect returns an integer number representing how many times the ray given through its position and direction intersects the given ellipsoid shape. If the ray does not intersect the ellipsoid, RayCastEllipsoidIntersect returns 0. Otherwise RayCastEllipsoidIntersect may return 1 (the ray intersects the ellipsoid in exactly one point) or 2 (the ray intersects the ellipsoid in two points--enters and exits the surface of the ellipsoid 3D shape).
RayCastEllipsoidIntersect internally uses RayCastSphereIntersect to determine how many times the ray intersects the ellipsoid 3D shape.