com.threerings.whirled.spot.data

## Class SpotSceneModel

- java.lang.Object
- - com.threerings.io.SimpleStreamableObject
  - - com.threerings.whirled.spot.data.SpotSceneModel

All Implemented Interfaces:
  com.threerings.io.Streamable, AuxModel, Cloneable

    public class SpotSceneModel
    extends com.threerings.io.SimpleStreamableObject
    implements AuxModel

The spot scene model extends the standard scene model with information on portals. Portals are referenced by an identifier, unique within the scene and unchanging, so that portals can stably reference the target portal in the scene to which they connect.

### Nested Class Summary

### Nested classes/interfaces inherited from interface com.threerings.io.Streamable

`com.threerings.io.Streamable.Closure`

### Field Summary

Fields
`int` `defaultEntranceId` The portal id of the default entrance to this scene.
`Portal[]` `portals` An array containing all portals in this scene.

### Constructor Summary

Constructors
Constructor and Description
`SpotSceneModel()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`void` `addPortal(Portal portal)` Adds a portal to this scene model.
`SpotSceneModel` `clone()` Creates a clone of this auxiliary model.
`static SpotSceneModel` `getSceneModel(SceneModel model)` Locates and returns the `SpotSceneModel` among the auxiliary scene models associated with the supplied scene model.
`void` `removePortal(Portal portal)` Removes a portal from this model.

### Methods inherited from class com.threerings.io.SimpleStreamableObject

`toString`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### portals

    public Portal[] portals

An array containing all portals in this scene.

#### defaultEntranceId

    public int defaultEntranceId

The portal id of the default entrance to this scene. If a body enters the scene without coming from another scene, this is the portal at which they would appear.

### Constructor Detail

#### SpotSceneModel

    public SpotSceneModel()

### Method Detail

#### addPortal

    public void addPortal(Portal portal)

Adds a portal to this scene model.

#### removePortal

    public void removePortal(Portal portal)

Removes a portal from this model.

#### clone

    public SpotSceneModel clone()
                         throws CloneNotSupportedException

Description copied from interface: `AuxModel`
Creates a clone of this auxiliary model.

Specified by:
  `clone` in interface `AuxModel`
Overrides:
  `clone` in class `Object`
Throws:
  `CloneNotSupportedException`

#### getSceneModel

    public static SpotSceneModel getSceneModel(SceneModel model)

Locates and returns the `SpotSceneModel` among the auxiliary scene models associated with the supplied scene model. `null` is returned if no spot scene model could be found.