... | ... | @@ -37,6 +37,9 @@ Lets have a closer look at the individual methods. |
|
|
* Tethering is not something that happens on an *ad hoc* basis. In order for **tetherable** objects to establish links between themselves, they first of all need to be aware of each other. The **addPotentialTether()** method allows registering a **tetherable** object as a potential tethering *partner*. The **removePotentialTether()** does the opposite.
|
|
|
* The **getTetheringDistance()** method returns the tethering distance defined for this particular tetherable object.
|
|
|
* When adding a **tetherable** object as a potential partner with the **addPotentialTether()** method, we also had to specify which **Tether** instance to use for this particular candidate. The **getTetherFor()** method will return for a given **tetherable** candidate the corresponding **Tether** object, provided the candidate is known to this **tetherable** instance.
|
|
|
* As already mentioned in the introduction, tethering is triggered through the relative proximity of potentially tetherable objects. Since proximity depends on the relative positions of involved parties, each **tetherable** object maintains an **Origin** property. The **getTetherOrigin()** property returns the current position of the origin whereas the **setTetherOrigin()** allows updating said position.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div align="center">
|
... | ... | |