Table of Contents

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

cameraPosition Point3D

The camera Position.

models Model3DCollection

The models.

worldTransform Transform3D

The world Transform.

GetDistanceSquared(Point3D, GeometryModel3D)

Gets the distance squared.

public static double GetDistanceSquared(Point3D position, GeometryModel3D model)

Parameters

position Point3D

The position.

model GeometryModel3D

The model.

Returns

double

The get distance squared.

GetDistanceSquared(Point3D, Visual3D)

Gets the distance squared.

public static double GetDistanceSquared(Point3D position, Visual3D visual)

Parameters

position Point3D

The position.

visual Visual3D

The visual.

Returns

double

The get distance squared.

IsTransparent(Brush)

Determines whether the specified brush is transparent.

public static bool IsTransparent(Brush brush)

Parameters

brush Brush

The brush.

Returns

bool

true if the specified brush is transparent; otherwise, false.

IsTransparent(GeometryModel3D)

Determines whether the specified model is transparent.

public static bool IsTransparent(GeometryModel3D gm3D)

Parameters

gm3D GeometryModel3D

The GM3 D.

Returns

bool

true if 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

material Material

The material.

Returns

bool

true if the specified material is transparent; otherwise, false.

IsTransparent(Model3D)

Determines whether the specified model is transparent.

public static bool IsTransparent(Model3D model)

Parameters

model Model3D

The model.

Returns

bool

true if the specified model is transparent; otherwise, false.

IsTransparent(Visual3D)

Determines whether the specified visual is transparent.

public static bool IsTransparent(Visual3D v)

Parameters

v Visual3D

The v.

Returns

bool

true if 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)

Parameters

position Point3D

The position.

model IList<Visual3D>

The model.