Eyeshot 11 WinForms API Reference
WinForms Assembly / devDept.Eyeshot Namespace / ViewportLayout Class / SortEntitiesForTransparency Method
The viewport
Example

In This Topic
    SortEntitiesForTransparency Method
    In This Topic
    Sorts the transparent entities from the farthest to the nearest to the camera for better rendering.
    Syntax
    'Declaration
     
    Protected Function SortEntitiesForTransparency( _
       ByVal viewport As Viewport, _
       ByVal ents As IList(Of Entity) _
    ) As IList(Of Entity)
    protected IList<Entity> SortEntitiesForTransparency( 
       Viewport viewport,
       IList<Entity> ents
    )

    Parameters

    viewport
    The viewport
    ents

    Return Value

    The sorted list of entities.
    Remarks
    It can be called in a viewportLayout derived class in the DrawViewport method when AccurateTransparency is false.
    Example
    Usage Sample.
    public class MyViewportLayout : ViewportLayout
    {
        protected override void DrawViewport(DrawSceneParams myParams)
        {
            myParams.Entities = SortEntitiesForTransparency(myParams.Viewport);
            base.DrawViewport(myParams);
        }
    }
    Public Class MyViewportLayout
    Inherits ViewportLayout
        Protected Overrides Sub DrawViewport(myParams As DrawSceneParams)
            myParams.Entities = SortEntitiesForTransparency(myParams.Viewport)
            MyBase.DrawViewport(myParams)
        End Sub
    End Class
    See Also