Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions TessellationAndVoxelizationGeometryLibrary/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -769,4 +769,32 @@ public enum BooleanOperationType
XOR
}

public enum QuadricType
{
Unknown,
Ellipsoid,
ImaginaryEllipsoid,
EllipticParaboloid,
HyperbolicParaboloid,
HyperboloidOneSheet,
HyperboloidTwoSheets,
EllipticCylinder,
ImaginaryEllipticCylinder,
ParabolicCylinder,
HyperbolicCylinder,
Cone,
ImaginaryCone,
IntersectingPlanes,
ImaginaryIntersectingPlanes,
ParallelPlanes,
ImaginaryParallelPlanes,
Plane,
Sphere,
Line,
Point,
NoPoint,
AllPoints,
Other
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ internal Vector4 GetNormal(bool tryToRepair)
if (face == null) continue;
var other = face.OwnedTetra == this ? face.OtherTetra : face.OwnedTetra;
if (other == null) continue;
if (other.Normal.IsNull()) continue;
if (other.Normal.IsNegligible()) continue;
normal += other.Normal;
validNeighborCount++;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ private static Circle FindCircle(Vector2[] points)
var minRadiusSqd = double.PositiveInfinity;
if (Circle.CreateFrom3Points(points[0], points[1], points[2], out tempCircle)
&& (points[3] - tempCircle.Center).LengthSquared() <= tempCircle.RadiusSquared)
{ // this one uses IsGreaterThanNonNegligible to prevent infinite cycling when more points are on the circle
{
circle = tempCircle;
minRadiusSqd = circle.RadiusSquared;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ private static Plane CreatePlaneFrom2Points(Vector3 p1, Vector3 p2, Vector3 orie
{
var center = (p1 + p2) / 2;
var plane = new Plane(center, center);
if (plane.Normal.IsNull())
if (plane.Normal.IsNegligible())
{ // the two points midpoint happens to be the origin
plane.Normal = orientingVector.Normalize();
plane.DistanceToOrigin = 0;
Expand All @@ -154,6 +154,5 @@ private static Plane CreatePlaneFrom2Points(Vector3 p1, Vector3 p2, Vector3 orie
}
return plane;
}

}
}

Large diffs are not rendered by default.

Loading