AABB Class |
The AABB class represents an axis-aligned 3d bounding box.
Inheritance Hierarchy
Namespace: Tekla.Structures.Geometry3d
Assembly: Tekla.Structures (in Tekla.Structures.dll) Version: 2023.0.3
Syntax
The AABB type exposes the following members.
Constructors
Name | Description | |
---|---|---|
AABB |
Instantiates a new axis-aligned 3d bounding box with the maximum point
initialized to the smallest possible value and the minimum point to the
largest possible value.
| |
AABB(AABB) |
Instantiates a new axis-aligned 3d bounding box which is a copy
of the given axis-aligned 3d bounding box.
| |
AABB(IEnumerablePoint) |
Constructs AABB from given point list.
| |
AABB(Point, Point) |
Instantiates a new axis-aligned 3d bounding box with the given minimum and maximum points.
|
Properties
Name | Description | |
---|---|---|
MaxPoint |
The maximum point of the axis-aligned 3d bounding box.
| |
MinPoint |
The minimum point of the axis-aligned 3d bounding box.
|
Methods
Name | Description | |
---|---|---|
Collide |
Checks if the current axis-aligned 3d bounding box collides with
another given axis-aligned 3d bounding box. Both axis-aligned 3d
bounding boxes need to be in the same coordinate system or in the
same workplane, so that they are defined using the same axes.
| |
GetCenterPoint |
Returns the geometric center point of the current axis-aligned 3d bounding box.
| |
GetCornerPoints |
Returns all corner points of the current axis-aligned 3d bounding box.
| |
IsInside(LineSegment) |
Checks if the given line segment is inside the current axis-aligned 3d bounding box.
| |
IsInside(Point) |
Checks if the given point is inside the current axis-aligned 3d bounding box.
|
Operators
Name | Description | |
---|---|---|
Addition(AABB, AABB) |
Combines (adds) the given two axis-aligned 3d bounding boxes.
| |
Addition(AABB, Point) |
Adds the given point to the given axis-aligned 3d bounding box.
| |
Addition(Point, AABB) |
Adds the given point to the given axis-aligned 3d bounding box.
|
Examples
using Tekla.Structures.Geometry3d; using Tekla.Structures.Model; using System; public class Example { public void Example1() { Beam MyBeam1 = new Beam(); Beam MyBeam2 = new Beam(); Solid MySolid1 = MyBeam1.GetSolid(); Solid MySolid2 = MyBeam2.GetSolid(); AABB MyAxisAlignedBoundingBox1 = new AABB(MySolid1.MinimumPoint, MySolid1.MaximumPoint); AABB MyAxisAlignedBoundingBox2 = new AABB(MySolid2.MinimumPoint, MySolid2.MaximumPoint); if (MyAxisAlignedBoundingBox1.Collide(MyAxisAlignedBoundingBox2)) { Console.WriteLine("Collision between beams!"); } } }
See Also