geometry rewrite uncomplete
This commit is contained in:
@@ -21,6 +21,14 @@ namespace StgSharp
|
||||
_id = id;
|
||||
}
|
||||
}
|
||||
|
||||
internal void SelfDestrcut()
|
||||
{
|
||||
_id._previous._next = _id._next;
|
||||
_id._next._previous = _id._previous;
|
||||
this._id = default;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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>))
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user