public bool IntersectsRay(Ray3D ray, out float t) { Ray3D circleSpaceRay = TransformRayInEllipseCircleSpace(ray); XZOrientedCircle3D circle = TransformToCircleLocalSpace(); return(circle.IntersectsRay(circleSpaceRay, out t)); }
private XZOrientedCircle3D TransformToCircleLocalSpace() { var circle = new XZOrientedCircle3D(); circle.Rotation = Quaternion.identity; circle.SetScale(1.0f); circle.ModelSpaceRadius = 1.0f; circle.Center = Vector3.zero; return(circle); }
public bool ContainsAllPoints(List <Vector3> points) { XZOrientedCircle3D circle = TransformToCircleLocalSpace(); foreach (Vector3 point in points) { if (!circle.ContainsPoint(TransformPointInEllipseCircleLocalSpace(point))) { return(false); } } return(true); }
public bool ContainsPoint(Vector3 point) { XZOrientedCircle3D circle = TransformToCircleLocalSpace(); return(circle.ContainsPoint(TransformPointInEllipseCircleLocalSpace(point))); }
public XZOrientedCircle3D(XZOrientedCircle3D source) { Center = source.Center; ModelSpaceRadius = source.ModelSpaceRadius; Rotation = source.Rotation; }