Skip to content

Commit e30a656

Browse files
committed
Update documentation.
1 parent ed8be8d commit e30a656

File tree

4 files changed

+32
-50
lines changed

4 files changed

+32
-50
lines changed

GeometRi/ConvexPolyhedron.cs

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -976,54 +976,6 @@ public double DistanceTo(Triangle t)
976976

977977
#region "Intersection"
978978

979-
/// <summary>
980-
/// Intersection check between two polyhedrons.
981-
/// </summary>
982-
internal bool Intersects_Slow(ConvexPolyhedron cp)
983-
{
984-
Point3d c1 = this.Center;
985-
Point3d c2 = cp.Center;
986-
987-
if (c1.BelongsTo(cp) || c2.BelongsTo(this))
988-
{
989-
return true;
990-
}
991-
992-
for (int i = 0; i < numFaces; i++)
993-
{
994-
// test only visible faces
995-
//if (face[i].normal * new Vector3d(face[i].vertex[0], c2) < 0)
996-
//{
997-
// continue;
998-
//}
999-
1000-
for (int j = 0; j < face[i].vertex.Length - 2; j++)
1001-
{
1002-
Triangle t1 = new Triangle(face[i].Vertex[0], face[i].Vertex[j + 1], face[i].Vertex[j + 2]);
1003-
1004-
for (int k = 0; k < cp.numFaces; k++)
1005-
{
1006-
// test only visible faces
1007-
//if (cp.face[k].normal * new Vector3d(cp.face[k].vertex[0], c1) < 0)
1008-
//{
1009-
// continue;
1010-
//}
1011-
1012-
for (int l = 0; l < cp.face[k].vertex.Length - 2; l++)
1013-
{
1014-
Triangle t2 = new Triangle(cp.face[k].Vertex[0], cp.face[k].Vertex[l + 1], cp.face[k].Vertex[l + 2]);
1015-
1016-
if (t1.Intersects(t2))
1017-
{
1018-
return true;
1019-
}
1020-
}
1021-
}
1022-
}
1023-
}
1024-
return false;
1025-
}
1026-
1027979
/// <summary>
1028980
/// Intersection check between two polyhedrons.
1029981
/// </summary>

GeometRi/GeometRi.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ Compatible with .Net Framework 2.0, .Net Standard 1.0, .Net Core 3.1 and .Net 5.
1515
<PackageProjectUrl>https://github.com/RiSearcher/GeometRi.CSharp</PackageProjectUrl>
1616
<Version>1.4.1.0</Version>
1717
<PackageTags>computational geometry math 3D</PackageTags>
18-
<PackageReleaseNotes>Convex Polyhedron</PackageReleaseNotes>
18+
<PackageReleaseNotes>Convex polyhedron class.
19+
Axis aligned bounding box (AABB) class.</PackageReleaseNotes>
1920
<PackageLicenseUrl></PackageLicenseUrl>
2021
<RepositoryUrl>https://github.com/RiSearcher/GeometRi.CSharp</RepositoryUrl>
2122
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>

README.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Global tolerance property is used for proximity checking, not an exact robust al
3333
* [Box3d](https://github.com/RiSearcher/GeometRi.CSharp#box3d)
3434
* [Triangle](https://github.com/RiSearcher/GeometRi.CSharp#triangle)
3535
* [Tetrahedron](https://github.com/RiSearcher/GeometRi.CSharp#tetrahedron)
36+
* [ConvexPolyhedron](https://github.com/RiSearcher/GeometRi.CSharp#convexpolyhedron)
3637
* [Coord3d](https://github.com/RiSearcher/GeometRi.CSharp#coord3d)
3738
* [Matrix3d](https://github.com/RiSearcher/GeometRi.CSharp#matrix3d)
3839
* [Quaternion](https://github.com/RiSearcher/GeometRi.CSharp#quaternion)
@@ -397,6 +398,31 @@ Box object defined by center point, three dimensions and orientation in space.
397398
### Static Methods
398399
* __AABB__ - axis aligned bounding box for a cloud of points
399400

401+
## AABB
402+
403+
Axis aligned 3D box, can be degenerated with one or more dimensions equal 0. Defined only in Global CS.
404+
### Properties
405+
* __Center__ - center point of the box
406+
* __L1/L2/L3__ - dimensions of the box
407+
* __V1/V2/V3__ - orientation vectors of the box
408+
* __Orientation__ - box orientation
409+
* __P1/P2/P3/P4/P5/P6/P7/P8__ - corner points of the box
410+
* __ListOfPoints__ - list of corner points of the box
411+
* __ListOfTriangles__ - list of triangles forming the box's surface
412+
* __ListOfPlanes__ - list of planes forming the box's surface
413+
* __ListOfEdges__ - list of edges
414+
* __Area__ - area of the box
415+
* __Volume__ - volume of the box
416+
### Methods
417+
* __DistanceTo__ - shortest distance to point, circle or sphere
418+
* __Intersects__ - intersection check with box, circle, tetrahedron or triangle
419+
* __IntersectionWith__ - intersection of box with line, ray or segment
420+
* __Translate__ - translate box by vector
421+
* __Rotate__ - rotate box around origin or other point
422+
* __Reflect__ - reflect box in point, line or plane
423+
* __Equals__ - check if two ellipsoids are equals
424+
* __ToString__ - string representation of ellipsoid in global or local coordinate system
425+
400426
## Triangle
401427

402428
Defines a triangle in 3D space. Implements common translation, rotation and reflection methods. Calculates most of the standard
@@ -485,7 +511,6 @@ Defines a convex polyhedron in 3D space with counterclockwise oriented faces (se
485511
* __IsInside__ - check if object is located inside given box
486512
* __Translate__ - translate polyhedron by vector
487513
* __Rotate__ - rotate polyhedron around origin or other point
488-
* __Reflect__ - reflect polyhedron in point, line or plane
489514
* __Scale__ - scale polyhedron
490515
### Static Methods
491516
* __FromTetrahedron__ - Create ConvexPolyhedron object from a Tetrahedron object

ReleaseNotes.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# GeometRi
22
## Release notes
33

4+
### 1.4.1.0 (16/4/2024)
5+
* Convex polyhedron class.
6+
* Axis aligned bounding box (AABB) class.
7+
48
### 1.4.0.1 (13/9/2022)
59
* Fixed segment direction normalization.
610

0 commit comments

Comments
 (0)