geometry rewrite uncomplete

This commit is contained in:
Nitload
2023-04-17 03:25:02 +08:00
parent 06899dab7e
commit a58537a003
24 changed files with 172 additions and 255 deletions
@@ -21,6 +21,14 @@ namespace StgSharp
_id = id;
}
}
internal void SelfDestrcut()
{
_id._previous._next = _id._next;
_id._next._previous = _id._previous;
this._id = default;
}
}
+12
View File
@@ -49,6 +49,18 @@ namespace StgSharp
}
}
public void Remove(T node)
{
foreach (INode<T> item in this)
{
if (item == node)
{
node.SelfDestrcut();
break;
}
}
}
public void RemoveTail()
{
if (_tail==default(ContainerNode<T>))
+37 -3
View File
@@ -40,10 +40,44 @@ namespace StgSharp
}
public Pool( Geometries.Rectangle area)
{
if (Calc.Abs(area._centerToCorner1.X) == Calc.Abs(area._centerToCorner2.X)
&& Calc.Abs(area._centerToCorner1.Y) == Calc.Abs(area._centerToCorner2.Y))
vec3d vec = area._vertex1._position - area._vertex2._position;
if ((vec.X==0||vec.Y==0)&&vec.Z==0)
{
Line[] barders = area.GetAllSides();
if (area._vertex1.X>0)
{
if (area._vertex1.Y>0)
{
topBoader = barders[3];
rightBoader = barders[0];
bottomBoader = barders[1];
leftBoader = barders[2];
}
else
{
topBoader = barders[2];
rightBoader = barders[3];
bottomBoader = barders[0];
leftBoader = barders[1];
}
}
else
{
if (area._vertex1.Y > 0)
{
topBoader = barders[3];
rightBoader = barders[0];
bottomBoader = barders[1];
leftBoader = barders[2];
}
else
{
topBoader = barders[2];
rightBoader = barders[3];
bottomBoader = barders[0];
leftBoader = barders[1];
}
}
}
}