Class ViewportController
- Namespace
- Macad.Interaction
- Assembly
- Macad.Interaction.dll
public sealed class ViewportController : BaseObject
- Inheritance
-
objectViewportController
Properties
public double DpiScale { get; set; }
- Property Value: double
public double GizmoScale { get; }
- Property Value: double
public bool IsInRubberbandSelection { get; }
- Property Value: bool
public bool LockedToPlane { get; set; }
- Property Value: bool
public double PixelSize { get; }
- Property Value: double
public (int Width, int Height) ScreenSize { get; }
- Property Value: (int Width, int Height)
public V3d_View V3dView { get; }
- Property Value: V3d_View
public Viewport Viewport { get; }
- Property Value: Viewport
public WorkspaceController WorkspaceController { get; }
- Property Value: WorkspaceController
Methods
public void MouseDown(ModifierKeys modifierKeys = 0)
modifierKeysModifierKeys
public void MouseMove(ModifierKeys modifierKeys = 0)
modifierKeysModifierKeys
public void MouseMove(Point pos, ModifierKeys modifierKeys = 0, ViewportController.MouseMoveMode mode = MouseMoveMode.None)
posPointmodifierKeysModifierKeysmodeViewportController.MouseMoveMode
public void MouseUp(ModifierKeys modifierKeys = 0)
modifierKeysModifierKeys
public void Pan(double dX, double dY)
dXdoubledYdouble
public void PanToCenter(Pnt position)
Pans the viewport center on the specified position.
positionPntThe target position to center the viewport on.
public bool PointToScreen(Pnt pnt, out int screenX, out int screenY)
pntPntscreenXintscreenYint
- Returns: bool
public Bitmap RenderToBitmap(uint width, uint height)
widthuintheightuint
- Returns: Bitmap
public void Resize()
public void Rotate(double yawDeg, double pitchDeg, double rollDeg)
yawDegdoublepitchDegdoublerollDegdouble
public bool ScreenToPoint(Pln plane, int screenX, int screenY, out Pnt resultPnt)
planePlnscreenXintscreenYintresultPntPnt
- Returns: bool
public bool ScreenToPoint(int screenX, int screenY, out Pnt resultPnt)
screenXintscreenYintresultPntPnt
- Returns: bool
public Ax1 ScreenToViewAxis(int screenX, int screenY)
screenXintscreenYint
- Returns: Ax1
public void SetPredefinedView(ViewportController.PredefinedViews predefinedView)
predefinedViewViewportController.PredefinedViews
public void Zoom(double value)
valuedouble
public void Zoom(Point pos, double value)
posPointvaluedouble
public void ZoomFit(Bnd_Box boxToFit)
Adjusts the view to fit the specified bounding box within the viewport.
boxToFitBnd_BoxThe bounding box to fit within the viewport. Must have a positive square extent.
Remarks
If the bounding box has a too small square extent, the method does nothing. A margin of 10% will be added around the bounding box.
public void ZoomFitAll()
public void ZoomFitSelected()