# ModelOptions


```
public class ModelOptions implements Parcelable
```

<br />

*** ** * ** ***

Model options class to represent the options for a 3D model object within a 3D map scene.

## Summary

| ### Public fields |
|---|---|
| `int` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/ModelOptions#altitudeMode()` |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/ModelOptions#id()` |
| `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Orientation` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/ModelOptions#orientation()` |
| `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LatLngAltitude` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/ModelOptions#position()` |
| `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Vector3D` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/ModelOptions#scale()` |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/ModelOptions#url()` |

| ### Public constructors |
|---|
| `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/ModelOptions#ModelOptions()()` Default constructor for ModelOptions. |
| `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/ModelOptions#ModelOptions(java.lang.String,com.google.android.gms.maps3d.model.LatLngAltitude,java.lang.String,int,com.google.android.gms.maps3d.model.Vector3D,com.google.android.gms.maps3d.model.Orientation)( https://developer.android.com/reference/java/lang/String.html id, https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LatLngAltitude position, https://developer.android.com/reference/java/lang/String.html url, @https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/AltitudeMode int altitudeMode, https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Vector3D scale, https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Orientation orientation )` Constructor for ModelOptions with parameters for required fields. |

| ### Public methods |
|---|---|
| `int` | `@https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/AltitudeMode https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/ModelOptions#getAltitudeMode()()` The altitude mode of the model. |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/ModelOptions#getId()()` The unique identifier of the model. |
| `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Orientation` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/ModelOptions#getOrientation()()` The orientation of the model. |
| `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LatLngAltitude` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/ModelOptions#getPosition()()` The position of the model. |
| `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Vector3D` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/ModelOptions#getScale()()` The scale of the model. |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/ModelOptions#getUrl()()` The url of the 3D model asset to use. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/ModelOptions#setAltitudeMode(int)(@https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/AltitudeMode int altitudeMode)` Sets the altitude mode of the model. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/ModelOptions#setId(java.lang.String)(https://developer.android.com/reference/java/lang/String.html id)` Sets the unique identifier of the model. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/ModelOptions#setOrientation(com.google.android.gms.maps3d.model.Orientation)(https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Orientation orientation)` Sets the orientation of the model. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/ModelOptions#setPosition(com.google.android.gms.maps3d.model.LatLngAltitude)(https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LatLngAltitude position)` Sets the position of the model. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/ModelOptions#setScale(com.google.android.gms.maps3d.model.Vector3D)(https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Vector3D scale)` Sets the scale of the model. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/ModelOptions#setUrl(java.lang.String)(https://developer.android.com/reference/java/lang/String.html url)` Sets the url of the 3D model asset to use. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/ModelOptions#writeToParcel(android.os.Parcel,int)(https://developer.android.com/reference/android/os/Parcel.html dest, int flags)` |

| ### Extension functions |
|---|---|
| `final void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/ValidatorsKt.https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/ModelOptions#(com.google.android.gms.maps3d.model.ModelOptions).validate()(@https://developer.android.com/reference/androidx/annotation/NonNull.html https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/ModelOptions receiver)` Validates a specified `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/ModelOptions` object. |

### Inherited Constants

From [android.os.Parcelable](https://developer.android.com/reference/android/os/Parcelable.html) `static final int` `https://developer.android.com/reference/android/os/Parcelable.html#CONTENTS_FILE_DESCRIPTOR = 1` `static final int` `https://developer.android.com/reference/android/os/Parcelable.html#PARCELABLE_WRITE_RETURN_VALUE = 1`

### Inherited methods

From [android.os.Parcelable](https://developer.android.com/reference/android/os/Parcelable.html) `abstract int` `https://developer.android.com/reference/android/os/Parcelable.html#describeContents()()`

## Public fields

### altitudeMode

```
public int altitudeMode
```

### id

```
public String id
```

### orientation

```
public Orientation orientation
```

### position

```
public LatLngAltitude position
```

### scale

```
public Vector3D scale
```

### url

```
public String url
```

## Public constructors

### ModelOptions

```
public ModelOptions()
```

Default constructor for ModelOptions.

### ModelOptions

```
public ModelOptions(
    String id,
    LatLngAltitude position,
    String url,
    @AltitudeMode int altitudeMode,
    Vector3D scale,
    Orientation orientation
)
```

Constructor for ModelOptions with parameters for required fields.

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/lang/String.html id` | The unique identifier of the model. |
| `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LatLngAltitude position` | The position of the model. |
| `https://developer.android.com/reference/java/lang/String.html url` | The url of the 3D model asset to use. |
| `@https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/AltitudeMode int altitudeMode` | The altitude mode of the model. |
| `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Vector3D scale` | The scale of the model. |
| `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Orientation orientation` | The orientation of the model. |

## Public methods

### getAltitudeMode

```
@AltitudeMode
public int getAltitudeMode()
```

The altitude mode of the model.

### getId

```
public String getId()
```

The unique identifier of the model.

### getOrientation

```
public Orientation getOrientation()
```

The orientation of the model.

### getPosition

```
public LatLngAltitude getPosition()
```

The position of the model.

### getScale

```
public Vector3D getScale()
```

The scale of the model.

### getUrl

```
public String getUrl()
```

The url of the 3D model asset to use.

### setAltitudeMode

```
public void setAltitudeMode(@AltitudeMode int altitudeMode)
```

Sets the altitude mode of the model.

### setId

```
public void setId(String id)
```

Sets the unique identifier of the model.

### setOrientation

```
public void setOrientation(Orientation orientation)
```

Sets the orientation of the model.

### setPosition

```
public void setPosition(LatLngAltitude position)
```

Sets the position of the model.

### setScale

```
public void setScale(Vector3D scale)
```

Sets the scale of the model.

### setUrl

```
public void setUrl(String url)
```

Sets the url of the 3D model asset to use.

### writeToParcel

```
public void writeToParcel(Parcel dest, int flags)
```

## Extension functions

### ValidatorsKt.validate

```
public final void ValidatorsKt.validate(@NonNull ModelOptions receiver)
```

Validates a specified `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/ModelOptions` object.

| Throws |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-illegal-argument-exception/index.html` | If the `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/ModelOptions` is not valid. |