コード例 #1
0
        public Polygon3D Get3DPolygonFromCornerPointsProjectedOnPlane(Plane plane)
        {
            var polygon = new Polygon3D();

            polygon.SetPointsOnPolygonPlaneAndNormal(GetCornerPointsProjectedOnPlane(plane), plane.normal);

            return(polygon);
        }
コード例 #2
0
        private bool IsGameObjectPartiallyOverlapped(GameObject gameObject)
        {
            OrientedBox worldOrientedBox = gameObject.GetWorldOrientedBox();

            if (worldOrientedBox.IsValid())
            {
                Polygon3D projectedBoxCornerPointsPoly = worldOrientedBox.Get3DPolygonFromCornerPointsProjectedOnPlane(Plane);
                if (OverlapsPolygon(projectedBoxCornerPointsPoly) &&
                    DoesWorldOrientedBoxIntersectOrResideOnShapeSurface(worldOrientedBox))
                {
                    return(true);
                }
            }

            return(false);
        }
コード例 #3
0
        public bool OverlapsPolygon(Polygon3D polygon)
        {
            if (ContainsAnyPoint(polygon.PointsOnPolygonPlane))
            {
                return(true);
            }
            if (polygon.ContainsAnyPoint(GetExtentsPoints()))
            {
                return(true);
            }
            if (IntersectsAnyRay(polygon.GetEdgeRays()))
            {
                return(true);
            }

            return(false);
        }
コード例 #4
0
 public override bool OverlapsPolygon(Polygon3D polygon)
 {
     return(_ellipse.OverlapsPolygon(polygon));
 }
コード例 #5
0
 public abstract bool OverlapsPolygon(Polygon3D polygon);