Click or drag to resize
Ab4d.SharpEngine logo

ModelMover Class

ModelMover is a helper class that can be used to move selected 3D models in the 3D space. Its ModelMoverGroupNode can show 3 arrows and 3 planes that can be dragged by the user.
Inheritance Hierarchy
SystemObject
  Ab4d.SharpEngine.UtilitiesModelMover

Namespace: Ab4d.SharpEngine.Utilities
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax
C#
public class ModelMover : IDisposable

The ModelMover type exposes the following members.

Constructors
 NameDescription
Public methodModelMover(ManualInputEventsManager) Initializes a new instance of the ModelMover class with default axes and size (axisLength: 50, axisRadius: 2, axisArrowRadius: 6).
Public methodModelMover(ManualInputEventsManager, Vector3, Vector3, Vector3, Single, Single, Single) Initializes a new instance of the ModelMover class with providing custom axes.
Top
Properties
 NameDescription
Public propertyCustomRenderingLayer Gets or sets a custom RenderingLayer that will be used by all ModelNodes in this ModelMover. For example, this is usually set to OverlayRenderingLayer.
Public propertyIsAutomaticallyMoved Gets or sets a Boolean that specifies if this ModelMover is automatically moved when user moves it around. It is possible to prevent individual moves by setting PreventMove in ModelMovedEventArgs to true. Default value is true.
Public propertyIsEnabled Gets or sets a Boolean that specifies if this ModelMover is enabled. When disabled, then also the Visibility of ModelMoverGroupNode is set to Hidden.
Public propertyIsXAxisShown Gets or sets a Boolean that specifies if the X axis is shown. Default value is true.
Public propertyIsYAxisShown Gets or sets a Boolean that specifies if the Y axis is shown. Default value is true.
Public propertyIsZAxisShown Gets or sets a Boolean that specifies if the Z axis is shown. Default value is true.
Public propertyModelMoverGroupNode Gets the GroupNode that can be added to the Scene and represents the 3D models that form the ModelMover.
Public propertyMoveButtons Gets or sets button(s) that need to be pressed to start moving this ModelMover. Default value is left mouse button.
Public propertyMoveVector Gets the Vector3 that specifies the amount of move that was performed by the user.
Public propertyPosition Gets or sets Vector3 that specifies the position of the ModelMover axis origin.
Public propertySelectedMaterial Gets or sets a Material that is used when pointer is over the arrow. If set to null, the arrow material is not changed. Default value is StandardMaterials.Yellow.
Public propertyShowMovablePlanes Gets or sets boolean that specifies if planes that allow moving object on a plane are visible. Default value is true.
Public propertyXAxisColor Gets or sets the color of X axis.
Public propertyXAxisVector XAxisVector
Public propertyYAxisColor Gets or sets the color of Y axis.
Public propertyYAxisVector YAxisVector
Public propertyZAxisColor Gets or sets the color of Z axis.
Public propertyZAxisVector ZAxisVector
Top
Methods
 NameDescription
Public methodDispose Dispose unsubscribed from all pointer events and sets IsEnabled to false.
Protected methodOnModelMoved OnModelMoved
Protected methodOnModelMoveEnded OnModelMoveEnded
Protected methodOnModelMoveStarted OnModelMoveStarted
Public methodSetRotation SetRotation rotates the ModelMover by the specified rotation angles.
Top
Events
 NameDescription
Public eventModelMoved ModelMoved event is fired when model is moved. Event handler can get the amount of move by getting the value of the MoveVector property.
Public eventModelMoveEnded ModelMoveEnded event is fired when moving of the model is stopped.
Public eventModelMoveStarted ModelMoveStarted event is fired when moving of the model is started.
Top
Fields
 NameDescription
Public fieldStatic memberDefaultXAxis X axis that is used by the default constructor.
Public fieldStatic memberDefaultYAxis Y axis that is used by the default constructor.
Public fieldStatic memberDefaultZAxis Z axis that is used by the default constructor.
Top
See Also