FMX.Types3D.RayCastSphereIntersect

提供: RAD Studio API Documentation
移動先: 案内検索

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);

プロパティ

種類 可視性 ソース ユニット
function public
FMX.Types3D.pas
FMX.Types3D.hpp
FMX.Types3D FMX.Types3D

説明

指定された光線が指定された球体と何度交差するかを返します。


RayCastSphereIntersect は、位置と方向で指定された光線が指定された球体と何度交差するかを表す整数を返します。光線が球体と交差しない場合には、RayCastSphereIntersect は 0 を返します。そうでなければ RayCastSphereIntersect は 1(光線は球体と 1 点だけで交差する)または 2(光線は球体と 2 点で交差する、つまり、球体の表面に入って出る)を返します。

関連項目