Table of Contents

Class Manipulator

Namespace
HelixToolkit.Wpf
Assembly
HelixToolkit.Wpf.dll

Provides an abstract base class for manipulators.

public abstract class Manipulator : UIElement3D, IAnimatable, IInputElement
Inheritance
Manipulator
Implements
Derived
Inherited Members
Extension Methods

Constructors

Manipulator()

Initializes a new instance of the Manipulator class.

protected Manipulator()

Fields

BackMaterialProperty

Identifies the BackMaterial dependency property.

public static readonly DependencyProperty BackMaterialProperty

Field Value

DependencyProperty

ColorProperty

Identifies the Color dependency property.

public static readonly DependencyProperty ColorProperty

Field Value

DependencyProperty

MaterialProperty

Identifies the Material dependency property.

public static readonly DependencyProperty MaterialProperty

Field Value

DependencyProperty

OffsetProperty

Identifies the Offset dependency property.

public static readonly DependencyProperty OffsetProperty

Field Value

DependencyProperty

PositionProperty

Identifies the Position dependency property.

public static readonly DependencyProperty PositionProperty

Field Value

DependencyProperty

TargetTransformProperty

Identifies the TargetTransform dependency property.

public static readonly DependencyProperty TargetTransformProperty

Field Value

DependencyProperty

ValueProperty

Identifies the Value dependency property.

public static readonly DependencyProperty ValueProperty

Field Value

DependencyProperty

Properties

BackMaterial

Gets or sets the back material of the manipulator.

public Material BackMaterial { get; set; }

Property Value

Material

Camera

Gets or sets the camera.

protected ProjectionCamera? Camera { get; set; }

Property Value

ProjectionCamera

Color

Gets or sets the color of the manipulator.

public Color Color { get; set; }

Property Value

Color

The color.

HitPlaneNormal

Gets or sets the hit plane normal.

protected Vector3D HitPlaneNormal { get; set; }

Property Value

Vector3D

Material

Gets or sets the material of the manipulator.

public Material Material { get; set; }

Property Value

Material

Model

Gets or sets the model.

protected GeometryModel3D Model { get; set; }

Property Value

GeometryModel3D

Offset

Gets or sets the offset of the visual (this vector is added to the Position point).

public Vector3D Offset { get; set; }

Property Value

Vector3D

The offset.

ParentViewport

Gets or sets the parent viewport.

protected Viewport3D? ParentViewport { get; set; }

Property Value

Viewport3D

Position

Gets or sets the position of the manipulator.

public Point3D Position { get; set; }

Property Value

Point3D

The position.

TargetTransform

Gets or sets the target transform.

public Transform3D TargetTransform { get; set; }

Property Value

Transform3D

Value

Gets or sets the manipulator value.

public double Value { get; set; }

Property Value

double

The value.

Methods

Bind(ModelVisual3D)

Binds this manipulator to a given Visual3D.

public virtual void Bind(ModelVisual3D source)

Parameters

source ModelVisual3D

Source Visual3D which receives the manipulator transforms.

GetHitPlanePoint(Point, Point3D, Vector3D)

Projects the point on the hit plane.

protected virtual Point3D? GetHitPlanePoint(Point p, Point3D hitPlaneOrigin, Vector3D hitPlaneNormal)

Parameters

p Point

The p.

hitPlaneOrigin Point3D

The hit Plane Origin.

hitPlaneNormal Vector3D

The hit plane normal (world coordinate system).

Returns

Point3D?

The point in world coordinates.

OnMouseDown(MouseButtonEventArgs)

Invoked when an unhandled System.Windows.Input.Mouse.MouseDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

protected override void OnMouseDown(MouseButtonEventArgs e)

Parameters

e MouseButtonEventArgs

The MouseButtonEventArgs that contains the event data. This event data reports details about the mouse button that was pressed and the handled state.

OnMouseUp(MouseButtonEventArgs)

Invoked when an unhandled System.Windows.Input.Mouse.MouseUp routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

protected override void OnMouseUp(MouseButtonEventArgs e)

Parameters

e MouseButtonEventArgs

The MouseButtonEventArgs that contains the event data. The event data reports that the mouse button was released.

PositionChanged(DependencyPropertyChangedEventArgs)

Handles changes in the Position property.

protected virtual void PositionChanged(DependencyPropertyChangedEventArgs e)

Parameters

e DependencyPropertyChangedEventArgs

The DependencyPropertyChangedEventArgs instance containing the event data.

ToLocal(Point3D)

Transforms from world to local coordinates.

protected Point3D ToLocal(Point3D worldPoint)

Parameters

worldPoint Point3D

The point (world coordinates).

Returns

Point3D

Transformed vector (local coordinates).

ToWorld(Point3D)

Transforms from local to world coordinates.

protected Point3D ToWorld(Point3D point)

Parameters

point Point3D

The point (local coordinates).

Returns

Point3D

Transformed point (world coordinates).

ToWorld(Vector3D)

Transforms from local to world coordinates.

protected Vector3D ToWorld(Vector3D vector)

Parameters

vector Vector3D

The vector (local coordinates).

Returns

Vector3D

Transformed vector (world coordinates).

UnBind()

Releases the binding of this manipulator.

public virtual void UnBind()

UpdateGeometry()

Updates the geometry.

protected abstract void UpdateGeometry()

UpdateGeometry(DependencyObject, DependencyPropertyChangedEventArgs)

Called when a property related to the geometry is changed.

protected static void UpdateGeometry(DependencyObject d, DependencyPropertyChangedEventArgs e)

Parameters

d DependencyObject

The sender.

e DependencyPropertyChangedEventArgs

The DependencyPropertyChangedEventArgs instance containing the event data.

ValueChanged(DependencyPropertyChangedEventArgs)

Handles changes in the Value property.

protected virtual void ValueChanged(DependencyPropertyChangedEventArgs e)

Parameters

e DependencyPropertyChangedEventArgs

The DependencyPropertyChangedEventArgs instance containing the event data.