Click or drag to resize
Ab4d.SharpEngine logo

ModelRotator Class

ModelRotator is a helper class that can be used to rotate selected 3D models in the 3D space. Its ModelRotatorGroupNode can show 3 circles that can be dragged by the user to rotate the selected 3D model.
Inheritance Hierarchy
SystemObject
  Ab4d.SharpEngine.UtilitiesModelRotator

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

The ModelRotator type exposes the following members.

Constructors
 NameDescription
Public methodModelRotator(ManualInputEventsManager) Initializes a new instance of the ModelRotator class with default axes and default circle radius (42 and 50).
Public methodModelRotator(ManualInputEventsManager, Single, Single, Single, Int32) Initializes a new instance of the ModelRotator class with default axes and custom circle radius (42 and 50).
Public methodModelRotator(ManualInputEventsManager, Vector3, Vector3, Vector3, Single, Single, Single, Int32) Initializes a new instance of the ModelRotator 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 propertyIsEnabled Gets or sets a Boolean that specifies if this ModelMover is enabled. When disabled, then also the Visibility of ModelRotatorGroupNode is set to Hidden.
Public propertyIsXAxisRotationCircleShown Gets or sets a Boolean that specifies if the X axis is shown. Default value is true.
Public propertyIsYAxisRotationCircleShown Gets or sets a Boolean that specifies if the Y axis is shown. Default value is true.
Public propertyIsZAxisRotationCircleShown Gets or sets a Boolean that specifies if the Z axis is shown. Default value is true.
Public propertyModelRotatorGroupNode Gets the GroupNode that can be added to the Scene and represents the 3D models that form the ModelRotator.
Public propertyPosition Gets or sets Vector3 that specifies the position of the ModelMover axis origin.
Public propertyRotateButtons Gets or sets button(s) that need to be pressed to start rotating this ModelRotator. Default value is left mouse button.
Public propertyRotateX Gets a float that specified the rotation angle in degrees around the X axis.
Public propertyRotateY Gets a float that specified the rotation angle in degrees around the Y axis.
Public propertyRotateZ Gets a float that specified the rotation angle in degrees around the Z axis.
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 propertyXAxisRotationCircleColor Gets or sets the color of rotation circle for X axis.
Public propertyXAxisVector XAxisVector
Public propertyYAxisRotationCircleColor Gets or sets the color of rotation circle for Y axis.
Public propertyYAxisVector YAxisVector
Public propertyZAxisRotationCircleColor Gets or sets the color of rotation circle for Z axis.
Public propertyZAxisVector ZAxisVector
Top
Methods
 NameDescription
Public methodDispose Dispose unsubscribed from all pointer events and sets IsEnabled to false.
Protected methodOnModelRotated OnModelRotated
Protected methodOnModelRotateEnded OnModelRotateEnded
Protected methodOnModelRotateStarted OnModelRotateStarted
Public methodSetRotation SetRotation rotates the ModelRotator by the specified rotation angles.
Top
Events
 NameDescription
Public eventModelRotated ModelRotating event is fired when model is rotated.
Public eventModelRotateEnded ModelMoveEnded event is fired when moving of the model is stopped.
Public eventModelRotateStarted ModelRotatingStarted event is fired when rotating of the model is started.
Top
Fields
 NameDescription
Public fieldStatic memberDefaultXRotationAxis XRotation axis that is used by the default constructor.
Public fieldStatic memberDefaultYRotationAxis YRotation axis that is used by the default constructor.
Public fieldStatic memberDefaultZRotationAxis ZRotation axis that is used by the default constructor.
Top
See Also