Environment.SortEntitiesForTransparency Method

Sorts the transparent entities from the farthest to the nearest to the camera for better rendering.
Protected Function SortEntitiesForTransparency( _ 
ByVal viewport As Viewport, _ 
ByVal ents As IList(Of Entity) _ 
) As IList(Of Entity)
This language is not supported or no code example is available.
protected IList<Entity> SortEntitiesForTransparency( 
Viewport viewport
IList<Entity> ents 
)
This language is not supported or no code example is available.

Parameters

viewport
Viewport

The viewport

ents
IList<Entity>

Return Value

IList<Entity>

The sorted list of entities.

Remarks
 
It can be called in an Environment derived class in the DrawViewport method when AccurateTransparency is false.
Example
 
Usage Sample.
 public class MyModel : Model
 {
     protected override void DrawViewport(DrawSceneParams myParams)
     {
         myParams.Entities = SortEntitiesForTransparency(myParams.Viewport);
         base.DrawViewport(myParams);
     }
 }
 					
This language is not supported or no code example is available.
 Public Class MyModel
 Inherits Model
     Protected Overrides Sub DrawViewport(myParams As DrawSceneParams)
         myParams.Entities = SortEntitiesForTransparency(myParams.Viewport)
         MyBase.DrawViewport(myParams)
     End Sub
 End Class
 					
This language is not supported or no code example is available.

.NET Framework

Supported in: 4.5, 4.6, 4.7

In this article

Definition