Ejemplo n.º 1
0
        /// <summary>
        /// Determines whenever a specific position is inside the volume.
        /// </summary>
        public static bool IsInside(this IVolume volume, float3 x)
        {
            var hits = volume.Raycast(x, Gfx.normalize(new float3(3.001f, 5.003f, 7.021f)));

            return(hits.Length % 2 == 1);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates a ray that goes from a in direction to b
 /// </summary>
 public static Ray3D CreateFromTo(float3 a, float3 b)
 {
     return(new Ray3D(a, Gfx.normalize(b - a)));
 }