Table of Contents

Class Visual3DHelper

Namespace
HelixToolkit.Wpf
Assembly
HelixToolkit.Wpf.dll

Provides extension methods for Visual3D objects.

public static class Visual3DHelper
Inheritance
Visual3DHelper
Inherited Members

Methods

FindBounds(Visual3D, Transform3D)

Finds the bounding box for the specified visual.

public static Rect3D FindBounds(this Visual3D visual, Transform3D transform)

Parameters

visual Visual3D

The visual.

transform Transform3D

The transform of the visual.

Returns

Rect3D

A Rect3D.

FindBounds(Visual3DCollection)

Finds the bounding box for a collection of Visual3Ds.

public static Rect3D FindBounds(this Visual3DCollection children)

Parameters

children Visual3DCollection

The children.

Returns

Rect3D

A Rect3D.

Find<T>(DependencyObject)

Finds the first child of the specified type.

public static T? Find<T>(DependencyObject parent) where T : DependencyObject

Parameters

parent DependencyObject

The parent.

Returns

T

The first child of the specified type.

Type Parameters

T

The type.

GetTransform(Visual3D)

Gets the total transform for the specified visual.

public static Matrix3D GetTransform(this Visual3D visual)

Parameters

visual Visual3D

The visual.

Returns

Matrix3D

A Matrix3D.

GetTransformTo(Visual3D, Model3D)

Gets the transform from the specified Visual3D to the specified Model3D.

public static GeneralTransform3D? GetTransformTo(this Visual3D visual, Model3D model)

Parameters

visual Visual3D

The source visual.

model Model3D

The target model.

Returns

GeneralTransform3D

The transform.

GetViewport(Visual3D)

Gets the viewport for the specified visual.

public static Viewport3D? GetViewport(this Visual3D visual)

Parameters

visual Visual3D

The visual.

Returns

Viewport3D

The parent Viewport3D.

GetViewport3D(Visual3D)

Gets the parent Viewport3D from the specified visual.

public static Viewport3D? GetViewport3D(this Visual3D visual)

Parameters

visual Visual3D

The visual.

Returns

Viewport3D

The Viewport3D

GetViewportTransform(Visual3D)

Gets the transform to viewport space.

public static Matrix3D GetViewportTransform(this Visual3D visual)

Parameters

visual Visual3D

The visual.

Returns

Matrix3D

A transformation matrix.

IsAttachedToViewport3D(Visual3D)

Determines whether the visual is attached to a Viewport3D.

public static bool IsAttachedToViewport3D(this Visual3D visual)

Parameters

visual Visual3D

The visual.

Returns

bool

The is attached to viewport 3 d.

Traverse<T>(Visual3D, Action<T, Transform3D>)

Traverses the Visual3D/Model3D tree and invokes the specified action on each Model3D of the specified type.

public static void Traverse<T>(this Visual3D visual, Action<T, Transform3D> action) where T : Model3D

Parameters

visual Visual3D

The visual.

action Action<T, Transform3D>

The action.

Type Parameters

T

The type filter.

Traverse<T>(Visual3D, Action<T, Visual3D, Transform3D>)

Traverses the Visual3D/Model3D tree and invokes the specified action on each Model3D of the specified type.

public static void Traverse<T>(this Visual3D visual, Action<T, Visual3D, Transform3D> action) where T : Model3D

Parameters

visual Visual3D

The visual.

action Action<T, Visual3D, Transform3D>

The action.

Type Parameters

T

The type filter.

Traverse<T>(Visual3DCollection, Action<T, Transform3D>)

Traverses the Visual3D/Model3D tree and invokes the specified action on each Model3D of the specified type.

public static void Traverse<T>(this Visual3DCollection visuals, Action<T, Transform3D> action) where T : Model3D

Parameters

visuals Visual3DCollection

The visuals.

action Action<T, Transform3D>

The action.

Type Parameters

T

The type filter.

Traverse<T>(Visual3DCollection, Action<T, Visual3D, Transform3D>)

Traverses the Visual3D/Model3D tree and invokes the specified action on each Model3D of the specified type.

public static void Traverse<T>(this Visual3DCollection visuals, Action<T, Visual3D, Transform3D> action) where T : Model3D

Parameters

visuals Visual3DCollection

The visuals.

action Action<T, Visual3D, Transform3D>

The action.

Type Parameters

T

The type filter.