FMX.Types3D.RayCastCuboidIntersect

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

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

プロパティ

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

説明

指定された光線が指定された 3D 直方体図形と何回交差するかを返します。


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

関連項目