/// <summary>
 /// Create vertex arrays representing the <see cref="IBoundingVolume"/>, using lines delimiting the box volume.
 /// </summary>
 /// <param name="bbox"></param>
 /// <returns></returns>
 private static VertexArrays CreateBoundingVolumeArrays(IBoundingVolume bbox)
 {
     if (bbox.GetType() == typeof(BoundingBox))
     {
         return(CreateBoundingBoxArrays());
     }
     else
     {
         throw new NotImplementedException();
     }
 }
Exemple #2
0
 private VertexArrayObject CreateBBoxVertexArray(IBoundingVolume bbox)
 {
     if (bbox.GetType() == typeof(BoundingBox))
     {
         return(_BoundingBoxArray);
     }
     else
     {
         throw new NotImplementedException();
     }
 }
Exemple #3
0
        private GraphicsStateSet CreateBBoxState(IBoundingVolume bbox)
        {
            GraphicsStateSet bboxState;

            if (bbox.GetType() == typeof(BoundingBox))
            {
                bboxState = CreateBBoxState((BoundingBox)bbox);
            }
            else
            {
                throw new NotImplementedException();
            }

            // No blending
            bboxState.DefineState(new BlendState());

            return(bboxState);
        }
        private static void SetBoundingVolumeState(IBoundingVolume boundingVolume, GraphicsStateSet volumeState)
        {
            if (boundingVolume == null)
            {
                throw new ArgumentNullException("boundingVolume");
            }
            if (volumeState == null)
            {
                throw new ArgumentNullException("volumeState");
            }

            if (boundingVolume.GetType() == typeof(BoundingBox))
            {
                SetBoundingVolumeState((BoundingBox)boundingVolume, volumeState);
            }
            else
            {
                throw new NotImplementedException();
            }
        }