Record TBox3D

Unit

Declaration

type TBox3D = record

Description

Axis-aligned box. Rectangular prism with all sides parallel to basic planes X = 0, Y = 0 and Z = 0. This is sometimes called AABB, "axis-aligned bounding box". Many geometric operations are fast and easy on this type.

The actual box dimensions are stored inside the Data field, as two 3D points. First point has always all the smaller coords, second point has all the larger coords. I.e. always

Data[0].X <= Data[1].X and
Data[0].Y <= Data[1].Y and
Data[0].Z <= Data[1].Z

The only exception is the special value TBox3D.Empty.

Note that the box may still have all sizes equal 0. Consider a 3D model with only a single 3D point — it's not empty, but all the sizes must be 0.

Overview

Fields

Public Data: array [0..1] of TVector3;

Methods

Public class function Empty: TBox3D; static;
Public function IsEmpty: boolean;
Public function IsEmptyOrZero: boolean;
Public procedure CheckNonEmpty;
Public function Middle: TVector3; deprecated 'use Center';
Public function Center: TVector3;
Public function AverageSize: Single; overload;
Public function MaxSize: Single; overload;
Public function MinSize: Single; overload;
Public function SizeX: Single;
Public function SizeY: Single;
Public function SizeZ: Single;
Public function AverageSize(const AllowZero: boolean; const EmptyBoxSize: Single): Single; overload;
Public function AverageSize2D(const AllowZero: boolean; const EmptyBoxSize: Single; const IgnoreIndex: T3DAxis): Single; overload;
Public function MaxSize(const AllowZero: boolean; const EmptyBoxSize: Single): Single; overload;
Public function Area(const AllowZero: boolean; const EmptyBoxArea: Single): Single;
Public procedure ExpandMe(const AExpand: Single); overload;
Public procedure ExpandMe(const AExpand: TVector3); overload;
Public function Grow(const AExpand: Single): TBox3D; overload;
Public function Grow(const AExpand: TVector3): TBox3D; overload;
Public function Expand(const AExpand: Single): TBox3D; overload; deprecated 'use Grow, consistent with TRectangle.Grow';
Public function Expand(const AExpand: TVector3): TBox3D; overload; deprecated 'use Grow, consistent with TRectangle.Grow';
Public function Contains(const Point: TVector3): boolean; overload;
Public function PointInside(const Point: TVector3): boolean; overload; deprecated 'use Contains method, which is consistent with TRectangle';
Public function Contains2D(const Point: TVector2): boolean; overload;
Public function PointInside2D(const Point: TVector2): boolean; overload; deprecated 'use Contains2d method';
Public function Contains2D(const Point: TVector3; const IgnoreIndex: T3DAxis): boolean; overload;
Public function PointInside2D(const Point: TVector3; const IgnoreIndex: T3DAxis): boolean; overload; deprecated 'use Contains2D method';
Public procedure Include(const box2: TBox3D); overload;
Public procedure Include(const Point: TVector3); overload;
Public procedure Include(const Points: TVector3List); overload;
Public class function FromPoints(const Points: TVector3List): TBox3D; static;
Public function Sizes: TVector3; deprecated 'use Size';
Public function Size: TVector3;
Public procedure Corners(out AllPoints: TBoxCorners);
Public procedure GetAllPoints(AllPoints: PVector3Array); deprecated 'use Corners';
Public function Transform(const Matrix: TMatrix4): TBox3D;
Public function Translate(const Translation: TVector3): TBox3D;
Public function AntiTranslate(const Translation: TVector3): TBox3D;
Public function ToNiceStr: string; deprecated 'use ToString';
Public function ToRawStr: string; deprecated 'use ToRawString';
Public function ToString: string;
Public function ToRawString: string;
Public procedure ClampVar(var point: TVector3); overload;
Public function TryRayClosestIntersection( out Intersection: TVector3; out IntersectionDistance: Single; const RayOrigin, RayDirection: TVector3): boolean; overload;
Public function TryRayClosestIntersection( out Intersection: TVector3; const RayOrigin, RayDirection: TVector3): boolean; overload;
Public function TryRayClosestIntersection( out IntersectionDistance: Single; const RayOrigin, RayDirection: TVector3): boolean; overload;
Public function TryRayEntrance( out Entrance: TVector3; out EntranceDistance: Single; const RayOrigin, RayDirection: TVector3): boolean; overload;
Public function TryRayEntrance( out Entrance: TVector3; const RayOrigin, RayDirection: TVector3): boolean; overload;
Public function SegmentCollision( const Segment1, Segment2: TVector3): boolean;
Public function PlaneCollision(const Plane: TVector4): TPlaneCollision;
Public function PlaneCollisionInside(const Plane: TVector4): boolean;
Public function PlaneCollisionOutside(const Plane: TVector4): boolean;
Public function IsTriangleCollision( const Triangle: TTriangle3): boolean;
Public procedure BoundingSphere( var SphereCenter: TVector3; var SphereRadiusSqr: Single);
Public function Collision(const Box2: TBox3D): boolean;
Public function Collides(const Box2: TBox3D): boolean;
Public function Radius: Single;
Public function Radius2D(const IgnoreIndex: T3DAxis): Single;
Public function SphereSimpleCollision( const SphereCenter: TVector3; const SphereRadius: Single): boolean;
Public function SphereCollision( const SphereCenter: TVector3; const SphereRadius: Single): boolean;
Public function SphereCollision2D( const SphereCenter: TVector2; const SphereRadius: Single): boolean;
Public function MaximumPlane(const Direction: TVector3): TVector4;
Public function MinimumPlane(const Direction: TVector3): TVector4;
Public function MaximumCorner(const Direction: TVector3): TVector3;
Public function MinimumCorner(const Direction: TVector3): TVector3;
Public procedure PointDistances(const P: TVector3; out MinDistance, MaxDistance: Single);
Public procedure DirectionDistances( const Point, Dir: TVector3; out MinDistance, MaxDistance: Single);
Public function PointDistance(const Point: TVector3): Single;
Public function PointDistanceSqr(const Point: TVector3): Single;
Public function Equal(const Box2: TBox3D): boolean; overload;
Public function Equal(const Box2: TBox3D; const Epsilon: Single): boolean; overload;
Public function Diagonal: Single;
Public function RectangleXY: TFloatRectangle;
Public function RectangleXZ: TFloatRectangle;
Public function OrthoProject(const Pos, Dir, Side, Up: TVector3): TFloatRectangle;
Public class function CompareBackToFront2D( const A, B: TBox3D): Integer; static; deprecated 'rely on TCastleViewport.BlendingSort to sort shapes';
Public class operator + (const Box1, Box2: TBox3D): TBox3D;
Public class operator + (const B: TBox3D; const V: TVector3): TBox3D; deprecated 'use TBox3D.Translate. Operator is ambiguous (do we add a point, or translate?)';
Public class operator + (const V: TVector3; const B: TBox3D): TBox3D; deprecated 'use TBox3D.Translate. Operator is ambiguous (do we add a point, or translate?)';
Public class function FromCenterSize(const ACenter, ASize: TVector3): TBox3D; static;
Public procedure ToCenterSize(out ACenter, ASize: TVector3);

Properties

Public property Min: TVector3 read GetMin write SetMin;
Public property Max: TVector3 read GetMax write SetMax;

Description

Fields

Public Data: array [0..1] of TVector3;

This item has no description.

Methods

Public class function Empty: TBox3D; static;

Special TBox3D value meaning "bounding box is empty". This is different than just bounding box with zero sizes, as bounding box with zero sizes still has some position. Empty bounding box doesn't contain any portion of 3D space.

Public function IsEmpty: boolean;

Check is box empty. You can think of this function as "compare Box with TBox3D.Empty".

But actually it works a little faster, by utilizing the assumption that TBox3D.Empty is the only allowed value that breaks Data[0].X <= Data[1].X rule.

Public function IsEmptyOrZero: boolean;

Check is box empty or has all the sizes equal 0.

Public procedure CheckNonEmpty;

This item has no description.

Public function Middle: TVector3; deprecated 'use Center';

Warning: this symbol is deprecated: use Center

Center of the box.

Exceptions raised
EBox3DEmpty
If the Box is empty.
Public function Center: TVector3;

Center of the box.

Exceptions raised
EBox3DEmpty
If the Box is empty.
Public function AverageSize: Single; overload;

Average size of the box.

Exceptions raised
EBox3DEmpty
If the Box is empty.
Public function MaxSize: Single; overload;

Largest size of the box.

Exceptions raised
EBox3DEmpty
If the Box is empty.
Public function MinSize: Single; overload;

Smallest size of the box.

Exceptions raised
EBox3DEmpty
If the Box is empty.
Public function SizeX: Single;

Size in X (width) of the box.

Exceptions raised
EBox3DEmpty
If the Box is empty.
Public function SizeY: Single;

Size in Y (height) of the box.

Exceptions raised
EBox3DEmpty
If the Box is empty.
Public function SizeZ: Single;

Size in Z (depth) of the box.

Exceptions raised
EBox3DEmpty
If the Box is empty.
Public function AverageSize(const AllowZero: boolean; const EmptyBoxSize: Single): Single; overload;

Average size of TBox3D, or EmptyBoxSize if box is empty.

Parameters
AllowZero
Decides what to do when box is not empty but the result would be zero, which means that the box is infinitely thin in all axes. If True, then result is just 0, otherwise it's EmptyBoxSize.
Public function AverageSize2D(const AllowZero: boolean; const EmptyBoxSize: Single; const IgnoreIndex: T3DAxis): Single; overload;

Average size of TBox3D, or EmptyBoxSize if box is empty. 2D box projection is obtained by rejecting the IgnoreIndex coordinate (must be 0, 1 or 2).

Parameters
AllowZero
Decides what to do when box is not empty but the result would be zero, which means that the box is infinitely thin in all axes. If True, then result is just 0, otherwise it's EmptyBoxSize.
Public function MaxSize(const AllowZero: boolean; const EmptyBoxSize: Single): Single; overload;

Largest size of TBox3D, or EmptyBoxSize if box is empty.

Parameters
AllowZero
Decides what to do when box is not empty but the result would be zero, which means that the box is infinitely thin in all axes. If True, then result is just 0, otherwise it's EmptyBoxSize.
Public function Area(const AllowZero: boolean; const EmptyBoxArea: Single): Single;

Area of the six TBox3D sides, EmptyBoxArea if box is empty.

Parameters
AllowZero
Decides what to do when box is not empty but the result would be zero, which means that the box is infinitely thin in all axes. If True, then result is just 0, otherwise it's EmptyBoxSize.
Public procedure ExpandMe(const AExpand: Single); overload;

Decrease "minimum corner" by (AExpand, AExpand, AExpand) vector, and increase "maximum corner" by the same vector. So you get Box with all sizes increased by 2 * AExpand.

Box must not be empty. Note that AExpand may be negative, but then you must be sure that it doesn't make Box empty.

Public procedure ExpandMe(const AExpand: TVector3); overload;

Decrease "minimum corner" by AExpand vector, and increase "maximum corner" by the same vector. So you get Box with all sizes increased by 2 * AExpand.

Box must not be empty. Note that AExpand may be negative, but then you must be sure that it doesn't make Box empty.

Public function Grow(const AExpand: Single): TBox3D; overload;

This item has no description.

Public function Grow(const AExpand: TVector3): TBox3D; overload;

This item has no description.

Public function Expand(const AExpand: Single): TBox3D; overload; deprecated 'use Grow, consistent with TRectangle.Grow';

Warning: this symbol is deprecated: use Grow, consistent with TRectangle.Grow

This item has no description.

Public function Expand(const AExpand: TVector3): TBox3D; overload; deprecated 'use Grow, consistent with TRectangle.Grow';

Warning: this symbol is deprecated: use Grow, consistent with TRectangle.Grow

This item has no description.

Public function Contains(const Point: TVector3): boolean; overload;

Check is the point inside the box. Always false if Box is empty (obviously, no point is inside an empty box).

Public function PointInside(const Point: TVector3): boolean; overload; deprecated 'use Contains method, which is consistent with TRectangle';

Warning: this symbol is deprecated: use Contains method, which is consistent with TRectangle

This item has no description.

Public function Contains2D(const Point: TVector2): boolean; overload;

Is the 2D point inside the 2D projection of the box, ignores the Z coord of box.

Public function PointInside2D(const Point: TVector2): boolean; overload; deprecated 'use Contains2d method';

Warning: this symbol is deprecated: use Contains2d method

This item has no description.

Public function Contains2D(const Point: TVector3; const IgnoreIndex: T3DAxis): boolean; overload;

Is the 2D point inside the 2D projection of the box. 2D projection (of point and box) is obtained by rejecting the IgnoreIndex coordinate (must be 0, 1 or 2).

Public function PointInside2D(const Point: TVector3; const IgnoreIndex: T3DAxis): boolean; overload; deprecated 'use Contains2D method';

Warning: this symbol is deprecated: use Contains2D method

This item has no description.

Public procedure Include(const box2: TBox3D); overload;

Add another box to our box. This calculates the smallest box that encloses both the current box, and Box2. Doing MyBox.Include(AnotherBox) is equivalent to doing MyBox := MyBox + AnotherBox.

Public procedure Include(const Point: TVector3); overload;

Make box larger, if necessary, to contain given Point.

Public procedure Include(const Points: TVector3List); overload;

This item has no description.

Public class function FromPoints(const Points: TVector3List): TBox3D; static;

Make a box that contains given points.

Public function Sizes: TVector3; deprecated 'use Size';

Warning: this symbol is deprecated: use Size

Three box sizes.

Public function Size: TVector3;

Three box sizes. Name consistent with TBoxNode.Size.

Exceptions raised
EBox3DEmpty
If the Box is empty.
Public procedure Corners(out AllPoints: TBoxCorners);

Calculate eight corners of the box.

Public procedure GetAllPoints(AllPoints: PVector3Array); deprecated 'use Corners';

Warning: this symbol is deprecated: use Corners

This item has no description.

Public function Transform(const Matrix: TMatrix4): TBox3D;

Transform the Box by given matrix. Since this is still an axis-aligned box, rotating etc. of the box usually makes larger box.

Note that this is very optimized for Matrix with no projection (where last row of the last matrix = [0, 0, 0, 1]). It still works for all matrices (eventually fallbacks to simple "transform 8 corners and get box enclosing them" method).

Exceptions raised
ETransformedResultInvalid
When the Matrix will transform some point to a direction (vector with 4th component equal zero). In this case we just cannot interpret the result as a 3D point, so we also cannot interpret the final result as a box.
Public function Translate(const Translation: TVector3): TBox3D;

Move Box. Does nothing if Box is empty.

Public function AntiTranslate(const Translation: TVector3): TBox3D;

Move Box, by -Translation. Does nothing if Box is empty.

Public function ToNiceStr: string; deprecated 'use ToString';

Warning: this symbol is deprecated: use ToString

This item has no description.

Public function ToRawStr: string; deprecated 'use ToRawString';

Warning: this symbol is deprecated: use ToRawString

This item has no description.

Public function ToString: string;

This item has no description.

Public function ToRawString: string;

This item has no description.

Public procedure ClampVar(var point: TVector3); overload;

This item has no description.

Public function TryRayClosestIntersection( out Intersection: TVector3; out IntersectionDistance: Single; const RayOrigin, RayDirection: TVector3): boolean; overload;

TryBoxRayClosestIntersection calculates intersection between the ray (returns closest intersection to RayOrigin) and the box.

The box is treated just like a set of 6 rectangles in 3D. This means that the intersection will always be placed on one of the box sides, even if RayOrigin starts inside the box. See TryBoxRayEntrance for the other version.

Returns also IntersectionDistance, which is the distance to the Intersection relative to RayDirection (i.e. Intersection is always = RayOrigin + IntersectionDistance * RayDirection).

Public function TryRayClosestIntersection( out Intersection: TVector3; const RayOrigin, RayDirection: TVector3): boolean; overload;

This item has no description.

Public function TryRayClosestIntersection( out IntersectionDistance: Single; const RayOrigin, RayDirection: TVector3): boolean; overload;

This item has no description.

Public function TryRayEntrance( out Entrance: TVector3; out EntranceDistance: Single; const RayOrigin, RayDirection: TVector3): boolean; overload;

Intersection between the ray (returns closest intersection to RayOrigin) and the box, treating the box as a filled volume.

If RayOrigin is inside the box, TryBoxRayEntrance simply returns RayOrigin. If RayOrigin is outside of the box, the answer is the same as with TryBoxRayClosestIntersection.

Public function TryRayEntrance( out Entrance: TVector3; const RayOrigin, RayDirection: TVector3): boolean; overload;

This item has no description.

Public function SegmentCollision( const Segment1, Segment2: TVector3): boolean;

This item has no description.

Public function PlaneCollision(const Plane: TVector4): TPlaneCollision;

Collision between axis-aligned box (TBox3D) and 3D plane. Returns detailed result as TPlaneCollision.

Public function PlaneCollisionInside(const Plane: TVector4): boolean;

Check is axis-aligned box (TBox3D) fully inside/outside the plane.

Inside/outside are defined as for TPlaneCollision: Outside is where plane direction (normal) points. Inside is where the inverted plane direction (normal) points.

They work exactly like Box3DPlaneCollision, except they returns True when box is inside/outside (when Box3DPlaneCollision returned pcInside/pcOutside), and False otherwise.

For example Box3DPlaneCollisionInside doesn't differentiate between case when box is empty, of partially intersects the plane, and is on the outside. But it works (very slightly) faster.

Public function PlaneCollisionOutside(const Plane: TVector4): boolean;

This item has no description.

Public function IsTriangleCollision( const Triangle: TTriangle3): boolean;

This item has no description.

Public procedure BoundingSphere( var SphereCenter: TVector3; var SphereRadiusSqr: Single);

Smallest possible sphere completely enclosing the current box. When this is empty (IsEmpty) we return SphereRadiusSqr = 0 and an undefined SphereCenter.

Parameters
SphereCenter
The calculated sphere center.
SphereRadiusSqr
The calculated sphere radius, squared.

Use Sqrt to get the actual value. Often the square of the radius is enough, and this way you can avoid calculating expensive Sqrt, and thus gain some speed.

But please remember the general guideline: "do not optimize when there's no need". Sometimes it is simpler to just use Sqrt to get the actual radius, and there's no measurable difference in performance. So don't worry and do SphereRadius := Sqrt(SphereRadiusSqr).

Public function Collision(const Box2: TBox3D): boolean;

Does it have any common part with another box. Better use Collides, which has a name consistent with TFloatRectangle.Collides, this method will be deprecated some day and later removed.

Public function Collides(const Box2: TBox3D): boolean;

Does it have any common part with another box.

Public function Radius: Single;

Radius of the minimal sphere that contains this box. Sphere center is assumed to be in (0, 0, 0). 0 if box is empty.

Public function Radius2D(const IgnoreIndex: T3DAxis): Single;

Radius of the minimal circle that contains the 2D projection of this box. 2D box projection is obtained by rejecting the IgnoreIndex coordinate (must be 0, 1 or 2). Circle center is assumed to be in (0, 0). 0 if box is empty.

Public function SphereSimpleCollision( const SphereCenter: TVector3; const SphereRadius: Single): boolean;

Check for collision between box and sphere, fast but not entirely correct.

This considers a Box enlarged by SphereRadius in each direction. Then checks whether SphereCenter is inside such enlarged Box. So this check will incorrectly report collision while in fact there's no collision in the case when the sphere center is near the corner of the Box.

So this check is not 100% correct. But often this is good enough — in games, if you know that the SphereRadius is going to be relatively small compared to the Box, this may be perfectly acceptable. And it's fast.

Public function SphereCollision( const SphereCenter: TVector3; const SphereRadius: Single): boolean;

Check box vs sphere collision.

Public function SphereCollision2D( const SphereCenter: TVector2; const SphereRadius: Single): boolean;

Check box vs sphere collision in 2D (ignores Z coordinates of box).

Public function MaximumPlane(const Direction: TVector3): TVector4;

Calculate a plane in 3D space with direction = given Direction, moved maximally in Direction and still intersecting the given Box.

For example, if Direction = -Z = (0, 0, -1), then this will return the bottom plane of this box. For Direction = (1, 1, 1), this will return a plane intersecting the Data[1] (maximum) point, with slope = (1, 1, 1). The resulting plane always intersects at least one of the 8 corners of the box.

Exceptions raised
EBox3DEmpty
If the Box is empty.
Public function MinimumPlane(const Direction: TVector3): TVector4;

Calculate a plane in 3D space with direction = given Direction, moved such that it touches the Box but takes minimum volume of this box.

For example, if Direction = +Z = (0, 0, 1), then this will return the bottom plane of this box. For Direction = (1, 1, 1), this will return a plane intersecting the Data[0] (minimum) point, with slope = (1, 1, 1). The resulting plane always intersects at least one of the 8 corners of the box.

Exceptions raised
EBox3DEmpty
If the Box is empty.
Public function MaximumCorner(const Direction: TVector3): TVector3;

Farthest corner of the box in the given Direction.

Exceptions raised
EBox3DEmpty
If the Box is empty.
Public function MinimumCorner(const Direction: TVector3): TVector3;

Corner of the box such that the rest of the box lies in the given Direction from this corner.

Exceptions raised
EBox3DEmpty
If the Box is empty.
Public procedure PointDistances(const P: TVector3; out MinDistance, MaxDistance: Single);

Calculate the distances between a given 3D point and a box. MinDistance is the distance to the closest point of the box, MaxDistance is the distance to the farthest point of the box.

Note that always MinDistance <= MaxDistance. Note that both distances are always >= 0.

When the point is inside the box, it works correct too: minimum distance is zero in this case.

TODO: calculation of MinDistance is not perfect now. We assume that the closest/farthest point of the box is one of the 8 box corners. Which may not be true in case of the closest point, because it may lie in the middle of some box face (imagine a sphere with increasing radius reaching from a point to a box). So our minimum may be a *little* too large.

Exceptions raised
EBox3DEmpty
When used with an empty box.
Public procedure DirectionDistances( const Point, Dir: TVector3; out MinDistance, MaxDistance: Single);

Calculate the distances along a direction to a box. The idea is that you have a 3D plane orthogonal to direction Dir and passing through Point. You can move this plane, but you have to keep it's direction constant. MinDistance is the minimal distance along the Dir that you can move this plane, such that it touches the box. MaxDistance is the maximum such distance.

Note that always MinDistance <= MaxDistance. Note that one distance (MinDistance) or both distances may be negative.

As a practical example: imagine a DirectionalLight (light rays are parallel) that has a location. Now MinDistance and MaxDistance give ranges of depth where the Box is, as seen from the light source.

Exceptions raised
EBox3DEmpty
When used with an empty box.
Public function PointDistance(const Point: TVector3): Single;

Shortest distance between the box and a point. Always zero when the point is inside the box.

Exceptions raised
EBox3DEmpty
When used with an empty box.
Public function PointDistanceSqr(const Point: TVector3): Single;

Shortest distance between the box and a point, squared. Always zero when the point is inside the box.

Exceptions raised
EBox3DEmpty
When used with an empty box.
Public function Equal(const Box2: TBox3D): boolean; overload;

{ Maximum distance between the box and a point. Returns EmptyBoxDistance when box is empty. } function PointMaxDistance(const Point: TVector3; const EmptyBoxDistance: Single): Single;

{ Maximum distance between the box and a point, squared. Returns EmptyBoxDistance when box is empty. } function PointMaxDistanceSqr(const Point: TVector3; const EmptyBoxDistance: Single): Single;

Public function Equal(const Box2: TBox3D; const Epsilon: Single): boolean; overload;

This item has no description.

Public function Diagonal: Single;

Diagonal of the box, zero if empty.

Public function RectangleXY: TFloatRectangle;

This item has no description.

Public function RectangleXZ: TFloatRectangle;

This item has no description.

Public function OrthoProject(const Pos, Dir, Side, Up: TVector3): TFloatRectangle;

Project box along a given direction to a 2D rectangle. Assumes that Dir, Side and Up vectors are already orthogonal and normalized.

Public class function CompareBackToFront2D( const A, B: TBox3D): Integer; static; deprecated 'rely on TCastleViewport.BlendingSort to sort shapes';

Warning: this symbol is deprecated: rely on TCastleViewport.BlendingSort to sort shapes

Compare two bounding boxes based on their Z coordinates, suitable for depth sorting in 2D. Follows the algorithm documented at sort2D. Returns -1 if A < B, 1 if A > B, 0 if A = B.

Using this with a typical sorting function will result in boxes back-to-front ordering, which means that the farthest box will be first.

Public class operator + (const Box1, Box2: TBox3D): TBox3D;

This item has no description.

Public class operator + (const B: TBox3D; const V: TVector3): TBox3D; deprecated 'use TBox3D.Translate. Operator is ambiguous (do we add a point, or translate?)';

Warning: this symbol is deprecated: use TBox3D.Translate. Operator is ambiguous (do we add a point, or translate?)

This item has no description.

Public class operator + (const V: TVector3; const B: TBox3D): TBox3D; deprecated 'use TBox3D.Translate. Operator is ambiguous (do we add a point, or translate?)';

Warning: this symbol is deprecated: use TBox3D.Translate. Operator is ambiguous (do we add a point, or translate?)

This item has no description.

Public class function FromCenterSize(const ACenter, ASize: TVector3): TBox3D; static;

Convert from center and size vector. Empty box has size (-1,-1,-1).

Public procedure ToCenterSize(out ACenter, ASize: TVector3);

Convert to center and size vector. Empty box has size (-1,-1,-1).

Properties

Public property Min: TVector3 read GetMin write SetMin;

The minimum 3D position within this box. Use only if not IsEmpty, in which case this is just a shortcut for Data[0].

Public property Max: TVector3 read GetMax write SetMax;

The maximum 3D position within this box. Use only if not IsEmpty, in which case this is just a shortcut for Data[1].


Generated by PasDoc 0.16.0-snapshot.