@@ -20,7 +20,7 @@ public static class Rect3DExtensions
20
20
/// </summary>
21
21
/// <param name="rect">The given Rect3D</param>
22
22
/// <returns>The center point of given Rect3D</returns>
23
- public static Point3D GetCenterPoint3D ( this Rect3D rect )
23
+ public static Point3D GetCenter ( this Rect3D rect )
24
24
{
25
25
return new Point3D (
26
26
rect . X + rect . SizeX / 2 ,
@@ -35,7 +35,7 @@ public static Point3D GetCenterPoint3D(this Rect3D rect)
35
35
/// <param name="rect3d">The given Rect3D</param>
36
36
/// <param name="expand">Amount of expansion</param>
37
37
/// <returns>A newly expanded Rect3D</returns>
38
- public static Rect3D ExpandRect3D ( Rect3D rect3d , double expand )
38
+ public static Rect3D Expand ( this Rect3D rect3d , double expand )
39
39
{
40
40
if ( rect3d == Rect3D . Empty
41
41
|| double . IsNaN ( expand )
@@ -58,7 +58,7 @@ public static Rect3D ExpandRect3D(Rect3D rect3d, double expand)
58
58
/// </summary>
59
59
/// <param name="rects">Collection Rect3D</param>
60
60
/// <returns>A newly total Rect3D</returns>
61
- public static Rect3D MergeRect3D ( IEnumerable < Rect3D > rects )
61
+ public static Rect3D Merge ( this IEnumerable < Rect3D > rects )
62
62
{
63
63
Rect3D result = Rect3D . Empty ;
64
64
foreach ( var rect in rects )
@@ -96,7 +96,7 @@ public static PlaneIntersectionType Intersects(this Rect3D rect, Point3D planePo
96
96
97
97
planeNormal . Normalize ( ) ;
98
98
Vector3D absPlaneNormal = new Vector3D ( Math . Abs ( planeNormal . X ) , Math . Abs ( planeNormal . Y ) , Math . Abs ( planeNormal . Z ) ) ;
99
- Point3D center = rect . GetCenterPoint3D ( ) ;
99
+ Point3D center = rect . GetCenter ( ) ;
100
100
Vector3D centerToCorner = center - rect . Location ;
101
101
double extents = Vector3D . DotProduct ( centerToCorner , absPlaneNormal ) ;
102
102
double distance = center . DistanceToPlane ( planePosition , planeNormal ) ;
0 commit comments