FMX.Types3D.TBoundingBox.Create

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

constructor Create(const AnOrigin: TPoint3D); overload;
constructor Create(const AnOrigin: TPoint3D; const Width, Height, Depth: Single); overload;
constructor Create(const Left, Top, Near, Right, Bottom, Far: Single); overload;
constructor Create(const APoint1, APoint2: TPoint3D; NormalizeBox: Boolean = False); overload;
constructor Create(const ABox: TBoundingBox; NormalizeBox: Boolean = False); overload;
constructor Create(const Points: TArray<TPoint3D>); overload;
constructor Create(const Points: PPoint3D; const PointCount: Integer); overload;

C++

__fastcall TBoundingBox(const System::Math::Vectors::TPoint3D &AnOrigin)/* overload */;
__fastcall TBoundingBox(const System::Math::Vectors::TPoint3D &AnOrigin, const float Width, const float Height, const float Depth)/* overload */;
__fastcall TBoundingBox(const float Left, const float Top, const float Near, const float Right, const float Bottom, const float Far)/* overload */;
__fastcall TBoundingBox(const System::Math::Vectors::TPoint3D &APoint1, const System::Math::Vectors::TPoint3D &APoint2, bool NormalizeBox)/* overload */;
__fastcall TBoundingBox(const TBoundingBox &ABox, bool NormalizeBox)/* overload */;
__fastcall TBoundingBox(const System::DynamicArray<System::Math::Vectors::TPoint3D> Points)/* overload */;
__fastcall TBoundingBox(const System::Math::Vectors::PPoint3D Points, const int PointCount)/* overload */;
TBoundingBox() {}

Properties

Type Visibility Source Unit Parent
constructor public
FMX.Types3D.pas
FMX.Types3D.hpp
FMX.Types3D TBoundingBox

Description

Creates an instance of TBoundingBox.

There are several different signatures that you can use to create a bounding box:

Parameters Description

Sets the value of TopLeftNear to the provided AnOrigin. Calculates the value of BottomRightFar from Width, Height and Depth. If you do not specify Width, Height and Depth, the BottomRightFar is the same as TopLeftNear.

  • Left: The integer that represents the X coordinate of the TopLeftNear corner.
  • Top: The integer that represents the Y coordinate of the TopLeftNear corner.
  • Near: The integer that represents the Z coordinate of the TopLeftNear corner.
  • Right: The integer that represents the X coordinate of the BottomRightFar corner.
  • Bottom: The integer that represents the Y coordinate of the BottomRightFar corner.
  • Far: The integer that represents the Z coordinate of the BottomRightFar corner.

Constructs a TBoundingBox from the coordinates that define the TopLeftNear corner and BottomRightFar corner.

Constructs a TBoundingBox from two points that represent TopLeftNear corner and BottomRightFar corner and optionally normalizes the new TBoundingBox.

  • ABox: An instance of TBoundingBox.
  • NormalizeBox: Optional. A flag that specifies whether the constructor normalizes the bounding box after creation. Default is False.

Constructs a TBoundingBox from an existing bounding box and optionally normalizes the new TBoundingBox.

  • Points: A Point cloud (either an array of points or a pointer to a TPoint3D variable).
  • PointCount: Optional. If you specify Points as a pointer, you need to provide this parameter.

Uses the provided parameters to define two corners of the bounding box and then calls the constructor that constructs a TBoundingBox from two points.

See Also