FMX.Types3D.RayCastCuboidIntersect

De RAD Studio API Documentation
Aller à : navigation, rechercher

Delphi

function RayCastCuboidIntersect(const RayPos, RayDir, CuboidCenter: TPoint3D; const Width, Height, Depth: Single; var IntersectionNear, IntersectionFar: TPoint3D): Integer;

C++

extern DELPHI_PACKAGE int __fastcall RayCastCuboidIntersect(const System::Math::Vectors::TPoint3D &RayPos, const System::Math::Vectors::TPoint3D &RayDir, const System::Math::Vectors::TPoint3D &CuboidCenter, const float Width, const float Height, const float Depth, 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 forme 3D cubique donnée.

RayCastCuboidIntersect renvoie un nombre entier représentant le nombre de fois que le rayon donné par sa position et sa direction intersecte la forme cubique donnée. Si le rayon n'intersecte pas la forme cubique, RayCastCuboidIntersect renvoie 0. Autrement, RayCastCuboidIntersect peut renvoyer 1 (le rayon intersecte la forme cubique en exactement un point) ou 2 (le rayon intersecte la forme cubique en deux points -- entre dans la surface de la forme 3D cubique et en sort).

Voir aussi