# Model3DView

## Content

# Class: Model3DView

Represens 3D view (or simply view) specifies parameters that shall be applied
to the virtual camera associated with a 3D annotation.

## Extends

- [`ObjectBase`](ObjectBase)

## Constructors

### Constructor

```ts
new Model3DView(om): Model3DView;
```

Creates a new Model3DView.

#### Parameters

##### om

[`ObjectManager`](ObjectManager)

[ObjectManager](ObjectManager) that controls the lifetime of the Model3DView.

#### Returns

`Model3DView`

#### Overrides

```ts
ObjectBase.constructor
```

### Constructor

```ts
new Model3DView(): Model3DView;
```

Creates a new Model3DView.

#### Returns

`Model3DView`

#### Overrides

```ts
ObjectBase.constructor
```

### Constructor

```ts
new Model3DView(
   om, 
   uiName, 
   cameraPosition, 
   cameraDistance?): Model3DView;
```

Creates a new Model3DView.

#### Parameters

##### om

[`ObjectManager`](ObjectManager)

[ObjectManager](ObjectManager) that controls the lifetime of the Model3DView.

##### uiName

`string`

The value of [Model3DView.uiName](#uiname) property.

##### cameraPosition

[`Matrix3D`](../type-aliases/Matrix3D)

The transformation matrix that specifies a position and orientation of the camera in world coordinates.

##### cameraDistance?

`number`

The camera distance.

#### Returns

`Model3DView`

#### Overrides

```ts
ObjectBase.constructor
```

### Constructor

```ts
new Model3DView(
   uiName, 
   cameraPosition, 
   cameraDistance?): Model3DView;
```

Creates a new Model3DView.

#### Parameters

##### uiName

`string`

The value of [Model3DView.uiName](#uiname) property.

##### cameraPosition

[`Matrix3D`](../type-aliases/Matrix3D)

The transformation matrix that specifies a position and orientation of the camera in world coordinates.

##### cameraDistance?

`number`

The camera distance.

#### Returns

`Model3DView`

#### Overrides

```ts
ObjectBase.constructor
```

## Accessors

### backgroundColor

#### Get Signature

```ts
get backgroundColor(): Color;
```

Gets the background of the Model3DView as a solid color,
returns null if background color can't be parsed.

##### Returns

[`Color`](../type-aliases/Color)

#### Set Signature

```ts
set backgroundColor(value): void;
```

Sets the background of the Model3DView as a solid color.

##### Parameters

###### value

[`Color`](../type-aliases/Color)

##### Returns

`void`

***

### cameraDistance

#### Get Signature

```ts
get cameraDistance(): number;
```

Gets a non-negative number indicating a distance in the camera coordinate system
along the z axis to the centre of orbit for this view;
If this entry is not present, the interactive PDF processor shall determine the centre of orbit.

##### Returns

`number`

#### Set Signature

```ts
set cameraDistance(value): void;
```

Sets a non-negative number indicating a distance in the camera coordinate system
along the z axis to the centre of orbit for this view;
If this entry is not present, the interactive PDF processor shall determine the centre of orbit.

##### Parameters

###### value

`number`

##### Returns

`void`

***

### cameraPosition

#### Get Signature

```ts
get cameraPosition(): Matrix3D;
```

Gets the transformation matrix that specifies a position and orientation of the camera in world coordinates,
returns null of transformation matrix not specified or has unknown/unsupported format.

##### Returns

[`Matrix3D`](../type-aliases/Matrix3D)

#### Set Signature

```ts
set cameraPosition(value): void;
```

Sets the transformation matrix that specifies a position and orientation of the camera in world coordinates.

##### Parameters

###### value

[`Matrix3D`](../type-aliases/Matrix3D)

##### Returns

`void`

***

### id

#### Get Signature

```ts
get id(): number;
```

Gets the reference to the object.

##### Returns

`number`

#### Inherited from

[`ObjectBase`](ObjectBase).[`id`](ObjectBase#id)

***

### lightingSchemeType

#### Get Signature

```ts
get lightingSchemeType(): string;
```

Gets the type of lighting scheme that shall be used when rendering 3D artwork
If omitted, the lighting scheme specified in the 3D artwork shall be used.
The [Model3DLightingSchemeType](../variables/Model3DLightingSchemeType) defines the values listed in the PDF specification;
this list may be extended in future revisions.

##### Returns

`string`

#### Set Signature

```ts
set lightingSchemeType(value): void;
```

Sets the type of lighting scheme that shall be used when rendering 3D artwork
If omitted, the lighting scheme specified in the 3D artwork shall be used.
The [Model3DLightingSchemeType](../variables/Model3DLightingSchemeType) defines the values listed in the PDF specification;
this list may be extended in future revisions.

##### Parameters

###### value

`string`

##### Returns

`void`

***

### name

#### Get Signature

```ts
get name(): string;
```

Gets the internal name of the view, used to refer to the Model3DView
from other objects.
If omitted, the external name [uiName](#uiname) shall be used.

##### Returns

`string`

#### Set Signature

```ts
set name(value): void;
```

Sets the internal name of the view, used to refer to the Model3DView
from other objects.
If omitted, the external name [uiName](#uiname) shall be used.

##### Parameters

###### value

`string`

##### Returns

`void`

***

### om

#### Get Signature

```ts
get om(): ObjectManager;
```

Gets the owner [ObjectManager](ObjectManager) instance.

##### Returns

[`ObjectManager`](ObjectManager)

#### Inherited from

[`ObjectBase`](ObjectBase).[`om`](ObjectBase#om)

***

### renderingModeType

#### Get Signature

```ts
get renderingModeType(): string;
```

Gets the type of render mode to use when rendering 3D artwork.
If omitted, the render mode specified in the 3D artwork shall be used.
The [Model3DRenderingModeType](../variables/Model3DRenderingModeType) defines the values listed in the PDF specification;
this list may be extended in future revisions.

##### Returns

`string`

#### Set Signature

```ts
set renderingModeType(value): void;
```

Sets the type of render mode to use when rendering 3D artwork.
If omitted, the render mode specified in the 3D artwork shall be used.
The [Model3DRenderingModeType](../variables/Model3DRenderingModeType) defines the values listed in the PDF specification;
this list may be extended in future revisions.

##### Parameters

###### value

`string`

##### Returns

`void`

***

### uiName

#### Get Signature

```ts
get uiName(): string;
```

Gets the external name of the view, suitable for presentation in a user interface.

##### Returns

`string`

#### Set Signature

```ts
set uiName(value): void;
```

Sets the external name of the view, suitable for presentation in a user interface.

##### Parameters

###### value

`string`

##### Returns

`void`

## Methods

### free()

```ts
free(): void;
```

Detaches the object from the [ObjectManager](ObjectManager) and deallocates its memory, if possible.

#### Returns

`void`

#### Inherited from

[`ObjectBase`](ObjectBase).[`free`](ObjectBase#free)

***

### rebind()

```ts
rebind(omTo): void;
```

Rebinds the object from the current [ObjectManager](ObjectManager) to the specified one.

#### Parameters

##### omTo

[`ObjectManager`](ObjectManager)

The new [ObjectManager](ObjectManager) for the object.

#### Returns

`void`

#### Inherited from

[`ObjectBase`](ObjectBase).[`rebind`](ObjectBase#rebind)
