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
ColorProperty
Identifies the Color dependency property.
public static readonly DependencyProperty ColorProperty
Field Value
MaterialProperty
Identifies the Material dependency property.
public static readonly DependencyProperty MaterialProperty
Field Value
OffsetProperty
Identifies the Offset dependency property.
public static readonly DependencyProperty OffsetProperty
Field Value
PositionProperty
Identifies the Position dependency property.
public static readonly DependencyProperty PositionProperty
Field Value
TargetTransformProperty
Identifies the TargetTransform dependency property.
public static readonly DependencyProperty TargetTransformProperty
Field Value
ValueProperty
Identifies the Value dependency property.
public static readonly DependencyProperty ValueProperty
Field Value
Properties
BackMaterial
Gets or sets the back material of the manipulator.
public Material BackMaterial { get; set; }
Property Value
Camera
Gets or sets the camera.
protected ProjectionCamera? Camera { get; set; }
Property Value
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
Material
Gets or sets the material of the manipulator.
public Material Material { get; set; }
Property Value
Model
Gets or sets the model.
protected GeometryModel3D Model { get; set; }
Property Value
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
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
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
sourceModelVisual3DSource 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
pPointThe p.
hitPlaneOriginPoint3DThe hit Plane Origin.
hitPlaneNormalVector3DThe 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
eMouseButtonEventArgsThe 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
eMouseButtonEventArgsThe 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
eDependencyPropertyChangedEventArgsThe DependencyPropertyChangedEventArgs instance containing the event data.
ToLocal(Point3D)
Transforms from world to local coordinates.
protected Point3D ToLocal(Point3D worldPoint)
Parameters
worldPointPoint3DThe point (world coordinates).
Returns
- Point3D
Transformed vector (local coordinates).
ToWorld(Point3D)
Transforms from local to world coordinates.
protected Point3D ToWorld(Point3D point)
Parameters
pointPoint3DThe point (local coordinates).
Returns
- Point3D
Transformed point (world coordinates).
ToWorld(Vector3D)
Transforms from local to world coordinates.
protected Vector3D ToWorld(Vector3D vector)
Parameters
vectorVector3DThe 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
dDependencyObjectThe sender.
eDependencyPropertyChangedEventArgsThe DependencyPropertyChangedEventArgs instance containing the event data.
ValueChanged(DependencyPropertyChangedEventArgs)
Handles changes in the Value property.
protected virtual void ValueChanged(DependencyPropertyChangedEventArgs e)
Parameters
eDependencyPropertyChangedEventArgsThe DependencyPropertyChangedEventArgs instance containing the event data.