    

 ## On this page

  

 

 # Class View3D

 Last update: 16.07.2025 

Namespace: [VM.Managed](VM.Managed.md)  
Assembly: VMAppCore.dll

This class is to represent the 3D view.

```csharp
public class View3D : HandledView

```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ← [View](VM.Managed.View.md) ← [HandledView](VM.Managed.HandledView.md) ← [View3D](VM.Managed.View3D.md)

#### Derived

[View3DSpecialFit](VM.Managed.View3DSpecialFit.md)

#### Inherited Members

[HandledView.Dispose(bool)](VM.Managed.HandledView.md#VM_Managed_HandledView_Dispose_System_Boolean_), [HandledView.Handle](VM.Managed.HandledView.md#VM_Managed_HandledView_Handle), [View.Activate(bool)](VM.Managed.View.md#VM_Managed_View_Activate_System_Boolean_), [View.Close()](VM.Managed.View.md#VM_Managed_View_Close), [View.Draw()](VM.Managed.View.md#VM_Managed_View_Draw), [View.Resize(int, int)](VM.Managed.View.md#VM_Managed_View_Resize_System_Int32_System_Int32_), [View.OnLButtonDblClk(uint, Point)](VM.Managed.View.md#VM_Managed_View_OnLButtonDblClk_System_UInt32_System_Drawing_Point_), [View.OnLButtonDown(uint, Point)](VM.Managed.View.md#VM_Managed_View_OnLButtonDown_System_UInt32_System_Drawing_Point_), [View.OnLButtonUp(uint, Point)](VM.Managed.View.md#VM_Managed_View_OnLButtonUp_System_UInt32_System_Drawing_Point_), [View.OnMButtonDown(uint, Point)](VM.Managed.View.md#VM_Managed_View_OnMButtonDown_System_UInt32_System_Drawing_Point_), [View.OnMButtonUp(uint, Point)](VM.Managed.View.md#VM_Managed_View_OnMButtonUp_System_UInt32_System_Drawing_Point_), [View.OnRButtonDown(uint, Point)](VM.Managed.View.md#VM_Managed_View_OnRButtonDown_System_UInt32_System_Drawing_Point_), [View.OnRButtonUp(uint, Point)](VM.Managed.View.md#VM_Managed_View_OnRButtonUp_System_UInt32_System_Drawing_Point_), [View.OnMouseMove(uint, Point)](VM.Managed.View.md#VM_Managed_View_OnMouseMove_System_UInt32_System_Drawing_Point_), [View.OnMouseWheel(uint, short, Point)](VM.Managed.View.md#VM_Managed_View_OnMouseWheel_System_UInt32_System_Int16_System_Drawing_Point_), [View.Dispose(bool)](VM.Managed.View.md#VM_Managed_View_Dispose_System_Boolean_), [View.Dispose()](VM.Managed.View.md#VM_Managed_View_Dispose), [View.Document](VM.Managed.View.md#VM_Managed_View_Document)

#### Extension Methods

[LinkPropertyItemCache.GetLinkProperties(object, LinkPropertyType)](VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkProperties_System_Object_VM_Models_Pre_LinkPropertyType_), [LinkPropertyItemCache.GetLinkPropertiesAndValues(object, LinkPropertyType)](VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkPropertiesAndValues_System_Object_VM_Models_Pre_LinkPropertyType_), [LinkPropertyItemCache.GetLinkedObjects&lt;T&gt;(object, LinkPropertyType)](VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkedObjects__1_System_Object_VM_Models_Pre_LinkPropertyType_)

## Constructors

### View3D(UIntPtr, Document)

Initializes a new instance of the  class

```csharp
public View3D(UIntPtr handleView, Document doc)

```

#### Parameters

`handleView` [UIntPtr](https://learn.microsoft.com/dotnet/api/system.uintptr)

The view handle.

`doc` [Document](VM.Managed.Document.md)

The document.

## Fields

### g\_FrontViewPlane

```csharp
public static ViewPlane g_FrontViewPlane

```

#### Field Value

[ViewPlane](VM.Managed.ViewPlane.md)

### g\_bAdjacent

```csharp
public static bool g_bAdjacent

```

#### Field Value

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

## Properties

### BackgroundColor

Gets the color of background.

```csharp
public View3D.ViewBackgroundColor BackgroundColor { get; }

```

#### Property Value

[View3D](VM.Managed.View3D.md).[ViewBackgroundColor](VM.Managed.View3D.ViewBackgroundColor.md)

### IsPropertySupport

```csharp
public virtual bool IsPropertySupport { get; }

```

#### Property Value

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### Perspective

Gets or sets the perspective.

```csharp
public bool Perspective { get; set; }

```

#### Property Value

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### RenderMode

Gets or sets the rendering mode.

```csharp
public View3D.RenderingMode RenderMode { get; set; }

```

#### Property Value

[View3D](VM.Managed.View3D.md).[RenderingMode](VM.Managed.View3D.RenderingMode.md)

### Shadow

Gets or sets the shadow.

```csharp
public bool Shadow { get; set; }

```

#### Property Value

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

## Methods

### Activate(bool)

Activate view.

```csharp
public override void Activate(bool bActivate)

```

#### Parameters

`bActivate` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### Close()

Close view.

```csharp
public override void Close()

```

### Dispose(bool)

```csharp
[HandleProcessCorruptedStateExceptions]
protected override void Dispose(bool A_0)

```

#### Parameters

`A_0` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### Draw()

Draw.

```csharp
public override void Draw()

```

### Fit()

Fit

```csharp
public void Fit()

```

### FitCore()

Fits the core.

```csharp
protected virtual void FitCore()

```

### GetCursorMode()

Get cursor mode .

```csharp
public View3D.CursorMode GetCursorMode()

```

#### Returns

[View3D](VM.Managed.View3D.md).[CursorMode](VM.Managed.View3D.CursorMode.md)

The cursor mode.

### GetData(XmlNode)

Gets the view3d information data.

```csharp
public virtual void GetData(XmlNode writer)

```

#### Parameters

`writer` [XmlNode](https://learn.microsoft.com/dotnet/api/system.xml.xmlnode)

The writer.

### GetModelBoundingBox(ref VectorBase, ref VectorBase)

Gets the bounding box of model.

```csharp
public virtual bool GetModelBoundingBox(ref VectorBase vecMin, ref VectorBase vecMax)

```

#### Parameters

`vecMin` [VectorBase](VM.Managed.VectorBase.md)

The min value of bounding box.

`vecMax` [VectorBase](VM.Managed.VectorBase.md)

The max value of bounding box.

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### GetPopupMenuResult()

Get result for popup menu.

```csharp
public int GetPopupMenuResult()

```

#### Returns

[int](https://learn.microsoft.com/dotnet/api/system.int32)

The result.

### GetSpecialMenuResult()

Get result for special menu.

```csharp
public int GetSpecialMenuResult()

```

#### Returns

[int](https://learn.microsoft.com/dotnet/api/system.int32)

The result.

### GetUseFaceNormal()

Get face normal.

```csharp
public bool GetUseFaceNormal()

```

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

The use.

### IsDefaultOperation()

Whether default or not for orientation.

```csharp
public bool IsDefaultOperation()

```

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

`true` if default; otherwise, `false`.

### OnContextMenu()

Called when \[show context menu\].

```csharp
public virtual void OnContextMenu()

```

### OnLButtonDblClk(uint, Point)

Called when \[L-button double click\].

```csharp
public override void OnLButtonDblClk(uint nFlags, Point point)

```

#### Parameters

`nFlags` [uint](https://learn.microsoft.com/dotnet/api/system.uint32)

`point` [Point](https://learn.microsoft.com/dotnet/api/system.drawing.point)

### OnLButtonDown(uint, Point)

Called when \[L-button down\].

```csharp
public override void OnLButtonDown(uint nFlags, Point point)

```

#### Parameters

`nFlags` [uint](https://learn.microsoft.com/dotnet/api/system.uint32)

`point` [Point](https://learn.microsoft.com/dotnet/api/system.drawing.point)

### OnLButtonUp(uint, Point)

Called when \[L-button up\].

```csharp
public override void OnLButtonUp(uint nFlags, Point point)

```

#### Parameters

`nFlags` [uint](https://learn.microsoft.com/dotnet/api/system.uint32)

`point` [Point](https://learn.microsoft.com/dotnet/api/system.drawing.point)

### OnMButtonDown(uint, Point)

Called when \[M-button down\].

```csharp
public override void OnMButtonDown(uint nFlags, Point point)

```

#### Parameters

`nFlags` [uint](https://learn.microsoft.com/dotnet/api/system.uint32)

`point` [Point](https://learn.microsoft.com/dotnet/api/system.drawing.point)

### OnMButtonUp(uint, Point)

Called when \[M-button up\].

```csharp
public override void OnMButtonUp(uint nFlags, Point point)

```

#### Parameters

`nFlags` [uint](https://learn.microsoft.com/dotnet/api/system.uint32)

`point` [Point](https://learn.microsoft.com/dotnet/api/system.drawing.point)

### OnMouseMove(uint, Point)

Called when \[mouse move\].

```csharp
public override void OnMouseMove(uint nFlags, Point point)

```

#### Parameters

`nFlags` [uint](https://learn.microsoft.com/dotnet/api/system.uint32)

`point` [Point](https://learn.microsoft.com/dotnet/api/system.drawing.point)

### OnMouseWheel(uint, short, Point)

Called when \[use mouse wheel\].

```csharp
public override void OnMouseWheel(uint nFlags, short zDelta, Point pt)

```

#### Parameters

`nFlags` [uint](https://learn.microsoft.com/dotnet/api/system.uint32)

`zDelta` [short](https://learn.microsoft.com/dotnet/api/system.int16)

`pt` [Point](https://learn.microsoft.com/dotnet/api/system.drawing.point)

### OnRButtonDown(uint, Point)

Called when \[R-button down\].

```csharp
public override void OnRButtonDown(uint nFlags, Point point)

```

#### Parameters

`nFlags` [uint](https://learn.microsoft.com/dotnet/api/system.uint32)

`point` [Point](https://learn.microsoft.com/dotnet/api/system.drawing.point)

### OnRButtonUp(uint, Point)

Called when \[R-button up\].

```csharp
public override void OnRButtonUp(uint nFlags, Point point)

```

#### Parameters

`nFlags` [uint](https://learn.microsoft.com/dotnet/api/system.uint32)

`point` [Point](https://learn.microsoft.com/dotnet/api/system.drawing.point)

### Resize(int, int)

Re-size.

```csharp
public override void Resize(int nWidth, int nHeight)

```

#### Parameters

`nWidth` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The width.

`nHeight` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The height.

### SetData(XmlNode)

Sets the view3d information data.

```csharp
public virtual void SetData(XmlNode reader)

```

#### Parameters

`reader` [XmlNode](https://learn.microsoft.com/dotnet/api/system.xml.xmlnode)

The reader.

### SetPopupMenuResult(int)

```csharp
public void SetPopupMenuResult(int nResult)

```

#### Parameters

`nResult` [int](https://learn.microsoft.com/dotnet/api/system.int32)

### SetSpecialMenuResult(int)

Set result for special menu.

```csharp
public void SetSpecialMenuResult(int nResult)

```

#### Parameters

`nResult` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The result.

### SetSurfaceTolerance(double)

Set surface tolerance.

```csharp
public void SetSurfaceTolerance(double dSurfaceTolerance)

```

#### Parameters

`dSurfaceTolerance` [double](https://learn.microsoft.com/dotnet/api/system.double)

The surface tolerance.

### SetUseFaceNormal(bool)

Set face normal.

```csharp
public void SetUseFaceNormal(bool bNormal)

```

#### Parameters

`bNormal` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

The use.

### SetViewMode(ViewMode)

Set mode of view.

```csharp
public void SetViewMode(View3D.ViewMode mode)

```

#### Parameters

`mode` [View3D](VM.Managed.View3D.md).[ViewMode](VM.Managed.View3D.ViewMode.md)

The view mode.

### TransformCamera(TMatrix)

Transform.

```csharp
public void TransformCamera(TMatrix mat)

```

#### Parameters

`mat` [TMatrix](VM.Managed.TMatrix.md)

The transform.