Click or drag to resize
AB4D logo

ModelScalarVisual3D Class

ModelScalarVisual3D is a ModelVisual3D object that shows 3 axes created from smaller and bigger box. It can be used by user to scale a 3D model with dragging the boxes with the mouse.
Inheritance Hierarchy

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

The ModelScalarVisual3D type exposes the following members.

Constructors
 NameDescription
Public methodModelScalarVisual3D Initializes a new instance of the ModelScalarVisual3D class.
Public methodModelScalarVisual3D(Vector3D, Vector3D, Vector3D, String) Initializes a new instance of the ModelScalarVisual3D class with providing custom axes.
Top
Properties
 NameDescription
Public propertyAxisLength Gets or sets the length of axes that are shown by ModelMover. Default value is 100.
Public propertyCenterBoxColor Gets or sets the color of center box.
Public propertyCenterBoxScaleScreenDirection Gets or sets a Vector that specifies in which direction (in screen coordinates) the center box scales the model up. Note that (0, 0) at top left so positive y direction is down. It is possible to increase or decrease the length of this vector to increase or decrease the speed of scaling when using the center box. Default value is up (0, -1).
Public propertyCenterBoxWidth Gets or sets the radius of the box at the end of the scalar box.
Public propertyInnerBoxWidth Gets or sets the radius of the inner box.
Public propertyIsCenterBoxShown Gets or sets a Boolean that specifies if the X axis is shown. Default value is true.
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 propertyOuterBoxWidth Gets or sets the radius of the box at the end of the scalar box.
Public propertyPosition Gets or sets Point3D that specifies the position of the ModelScalar axis origin.
Public propertyScaleX Gets a double that specifies the amount of scale in X direction.
Public propertyScaleY Gets a double that specifies the amount of scale in Y direction.
Public propertyScaleZ Gets a double that specifies the amount of scale in Z direction.
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 propertyXAxisColor Gets or sets the color of X axis.
Public propertyYAxisColor Gets or sets the color of Y axis.
Public propertyZAxisColor Gets or sets the color of Z axis.
Top
Methods
 NameDescription
Protected methodOnModelScaled OnModelScaled
Protected methodOnModelScaledStarted OnModelScaledStarted
Protected methodOnModelScaleEnded OnModelScaleEnded
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 eventModelScaled ModelScaled event is fired when model is scaled.
Public eventModelScaleEnded ModelScaleEnded event is fired when scaling of the model is stopped.
Public eventModelScaleStarted ModelScaleStarted event is fired when scaling of the model is started.
Top
Fields
 NameDescription
Public fieldStatic memberAxisLengthProperty AxisLengthProperty
Public fieldStatic memberCenterBoxColorProperty CenterBoxColorProperty
Public fieldStatic memberCenterBoxScaleScreenDirectionProperty CenterBoxScaleScreenDirectionProperty
Public fieldStatic memberCenterBoxWidthProperty CenterBoxWidthProperty
Public fieldStatic memberDefaultXAxis X axis that is used by the default constructor (without any parameters or when defined in XAML).
Public fieldStatic memberDefaultYAxis Y axis that is used by the default constructor (without any parameters or when defined in XAML).
Public fieldStatic memberDefaultZAxis Z axis that is used by the default constructor (without any parameters or when defined in XAML).
Public fieldStatic memberInnerBoxWidthProperty InnerBoxWidthProperty
Public fieldStatic memberIsCenterBoxShownProperty IsCenterBoxShownProperty
Public fieldStatic memberIsXAxisShownProperty IsXAxisShownProperty
Public fieldStatic memberIsYAxisShownProperty IsYAxisShownProperty
Public fieldStatic memberIsZAxisShownProperty IsXAxisShownProperty
Public fieldStatic memberOuterBoxWidthProperty OuterBoxWidthProperty
Public fieldStatic memberPositionProperty PositionProperty
Public fieldStatic memberXAxisColorProperty XAxisColorProperty
Public fieldStatic memberYAxisColorProperty YAxisColorProperty
Public fieldStatic memberZAxisColorProperty ZAxisColorProperty
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