Click or drag to resize
AB4D logo

ModelRotatorVisual3D Class

ModelRotatorVisual3D is a ModelVisual3D object that shows 3 circles that can be used by user to rotate a 3D model with dragging the circles with the mouse.
Inheritance Hierarchy

Namespace: Ab3d.Visuals
Assembly: Ab3d.PowerToys (in Ab3d.PowerToys.dll) Version: 11.1.8864.1045
Syntax
C#
public class ModelRotatorVisual3D : ModelVisual3D

The ModelRotatorVisual3D type exposes the following members.

Constructors
 NameDescription
Public methodModelRotatorVisual3D Initializes a new instance of the ModelRotatorVisual3D class.
Public methodModelRotatorVisual3D(Vector3D, Vector3D, Vector3D, String) Initializes a new instance of the ModelRotatorVisual3D class with providing custom axes.
Top
Properties
 NameDescription
Public propertyCircleSegmentsCount Gets or sets the number of segments that are used to create the circle 3D model. Default value is 30.
Public propertyCircleWidth Gets or sets the width of the rotation circle model. When the value is not set (is double.NaN), then circle width is calculated as 0.05 * OuterRadius (this is the default value).
Public propertyCreateCustomCircleModelCallback Gets or sets a callback delegate that can be used to provide custom 3D model of the circle. See remarks for a sample that shows the code to create the default 3D model.
Public propertyInnerRadius Gets or sets the inner radius of rotation circles. Default value is 30.
Public propertyIsXAxisRotationCircleShown Gets or sets a Boolean that specifies if rotation circle for X axis is shown. Default value is true.
Public propertyIsYAxisRotationCircleShown Gets or sets a Boolean that specifies if rotation circle for Y axis is shown. Default value is true.
Public propertyIsZAxisRotationCircleShown Gets or sets a Boolean that specifies if rotation circle for Z axis is shown. Default value is true.
Public propertyOuterRadius Gets or sets the outer radius of rotation circles. Default value is 50.
Public propertyPosition Gets or sets Point3D that specifies the position of the ModelMover axis origin.
Public propertySelectedCursor Gets or sets a Cursor that is shown when mouse is over the arrow. If set to null, cursor is not changed. Default value is Hand.
Public propertySelectedMaterial Gets or sets a Material that is used when mouse is over the arrow. If set to null, the arrow material is not changed. Default value is Yellow DiffuseMaterial.
Public propertyXAxisRotationCircleColor Gets or sets the color of rotation circle for X axis.
Public propertyYAxisRotationCircleColor Gets or sets the color of rotation circle Y axis.
Public propertyZAxisRotationCircleColor Gets or sets the color of rotation circle Z axis.
Top
Methods
 NameDescription
Protected methodOnRotatingCallback OnRotatingCallback
Protected methodOnRotatingEndedCallback OnRotatingEndedCallback
Protected methodOnRotatingStartedCallback OnRotatingStartedCallback
Public methodSetRotation SetRotation rotates the ModelMoverVisual3D by the specified RotateTransform3D. When set to null, then rotation is removed from the ModelMoverVisual3D.
Public methodSubscribeWithEventManager3D SubscribeWithEventManager3D method can be used to use EventManager3D for mouse events processing instead of using UIElement3D for mouse events. This can be used when ModelMoverVisual3D is used inside Ab3d.DXEngine that does not support processing events on UIElement3D objects. In this case the CustomEventsSourceElement on EventManager3D must be set.
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 memberCircleSegmentsCountProperty CircleSegmentsCountProperty
Public fieldStatic memberCircleWidthProperty CircleWidthProperty
Public fieldStatic memberInnerRadiusProperty InnerRadiusProperty
Public fieldStatic memberIsXAxisRotationCircleShownProperty IsXAxisRotationCircleShownProperty
Public fieldStatic memberIsYAxisRotationCircleShownProperty IsYAxisRotationCircleShownProperty
Public fieldStatic memberIsZAxisRotationCircleShownProperty IsZAxisRotationCircleShownProperty
Public fieldStatic memberOuterRadiusProperty OuterRadiusProperty
Public fieldStatic memberPositionProperty PositionProperty
Public fieldStatic memberXAxisRotationCircleColorProperty XAxisRotationCircleColorProperty
Public fieldStatic memberXRotationAxis XRotation axis that is used by the default constructor (without any parameters or when defined in XAML).
Public fieldStatic memberYAxisRotationCircleColorProperty YAxisRotationCircleColorProperty
Public fieldStatic memberYRotationAxis YRotation axis that is used by the default constructor (without any parameters or when defined in XAML).
Public fieldStatic memberZAxisRotationCircleColorProperty ZAxisColorProperty
Public fieldStatic memberZRotationAxis ZRotation axis that is used by the default constructor (without any parameters or when defined in XAML).
Top
Extension Methods
 NameDescription
Public Extension MethodDumpHierarchy Display details about the hierarchy of Visual3D children to Debug console (for example to Visual Studio's Immediate window).
(Defined by Extensions)
Public Extension MethodForEachGeometryModel3D Performs the specified action on each GeometryModel3D inside the rootModelVisual3D.
(Defined by Extensions)
Public Extension MethodForEachVisual3D Performs the specified action on each ModelVisual3D inside the rootModelVisual3D.
(Defined by Extensions)
Public Extension MethodGetName Gets name of the Visual3D that was previously set by SetName extension method.
(Defined by Extensions)
Public Extension MethodSetName Sets Name property to Visual3D. Note that if name is not correct for WPF, it can be corrected (name must start with a letter or the underscore character (_), and must contain only letters, digits, or underscores). In this case the SetName method will set the corrected name to the object and return false (in this case you can call GetName to get the corrected name). True is returned when the original name is set to the object.
(Defined by Extensions)
Top
See Also