Class ElementSortingHelper
- Namespace
- HelixToolkit.Wpf
- Assembly
- HelixToolkit.Wpf.dll
Sorts element by opacity and distance from camera.
public static class ElementSortingHelper
- Inheritance
-
ElementSortingHelper
- Inherited Members
Methods
AlphaSort(Point3D, Model3DCollection, Transform3D)
Sort Modelgroups in Farthest to Closest order, to enable transparency Should be applied whenever the scene is significantly re-oriented
public static void AlphaSort(Point3D cameraPosition, Model3DCollection models, Transform3D worldTransform)
Parameters
cameraPositionPoint3DThe camera Position.
modelsModel3DCollectionThe models.
worldTransformTransform3DThe world Transform.
GetDistanceSquared(Point3D, GeometryModel3D)
Gets the distance squared.
public static double GetDistanceSquared(Point3D position, GeometryModel3D model)
Parameters
positionPoint3DThe position.
modelGeometryModel3DThe model.
Returns
- double
The get distance squared.
GetDistanceSquared(Point3D, Visual3D)
Gets the distance squared.
public static double GetDistanceSquared(Point3D position, Visual3D visual)
Parameters
Returns
- double
The get distance squared.
IsTransparent(Brush)
Determines whether the specified brush is transparent.
public static bool IsTransparent(Brush brush)
Parameters
brushBrushThe brush.
Returns
- bool
trueif the specified brush is transparent; otherwise,false.
IsTransparent(GeometryModel3D)
Determines whether the specified model is transparent.
public static bool IsTransparent(GeometryModel3D gm3D)
Parameters
gm3DGeometryModel3DThe GM3 D.
Returns
- bool
trueif the specified GM3 D is transparent; otherwise,false.
IsTransparent(Material)
Determines whether any part of the specified material is transparent.
public static bool IsTransparent(Material material)
Parameters
materialMaterialThe material.
Returns
- bool
trueif the specified material is transparent; otherwise,false.
IsTransparent(Model3D)
Determines whether the specified model is transparent.
public static bool IsTransparent(Model3D model)
Parameters
modelModel3DThe model.
Returns
- bool
trueif the specified model is transparent; otherwise,false.
IsTransparent(Visual3D)
Determines whether the specified visual is transparent.
public static bool IsTransparent(Visual3D v)
Parameters
vVisual3DThe v.
Returns
- bool
trueif the specified visual is transparent; otherwise,false.
SortModel(Point3D, IList<Visual3D>)
Sort scene - first opaque objects, then transparent objects sorted by distance from camera
public static void SortModel(Point3D position, IList<Visual3D> model)