예제 #1
0
        public override bool Raycast(Ray ray, out float t)
        {
            List <Vector3> trianglePoints = GetPoints();

            if (_raycastMode == Shape3DRaycastMode.Solid)
            {
                return(TriangleMath.Raycast(ray, out t, trianglePoints[0], trianglePoints[1], trianglePoints[2], _epsilon));
            }
            else
            {
                return(TriangleMath.RaycastWire(ray, out t, trianglePoints[0], trianglePoints[1], trianglePoints[2], _epsilon));
            }
        }
예제 #2
0
        public override bool RaycastWire(Ray ray, out float t)
        {
            List <Vector3> trianglePoints = GetPoints();

            return(TriangleMath.RaycastWire(ray, out t, trianglePoints[0], trianglePoints[1], trianglePoints[2], _epsilon));
        }
예제 #3
0
 public override bool RaycastWire(Ray ray, out float t)
 {
     return(TriangleMath.RaycastWire(ray, out t, GetPoint(EqTrianglePoint.Left), GetPoint(EqTrianglePoint.Top), GetPoint(EqTrianglePoint.Right), _epsilon));
 }