# RelPosition

## RelPosition

Relative position. A general position is represented as a pair (h,p) where

• h (cellBoost) is an GroupElement representing an element of a discrete subgroups
• p (local) is a Position The frame represented by the relative position is the image by h of the frame represented by the position p

We split the isometry part (hg) in two pieces. The idea is to g should gives a position in the fundamental domain of the (implicit) underlying lattice. This will keep the coordinates of g in a bounded range.

For simplicity we also keep track of the inverse of the cellBoost.

## Constructor

#### new RelPosition(set)

Source:

Constructor. Return the position corresponding to the origin with the reference frame.

##### Parameters:
Name Type Description
`set` TeleportationSet

the underlying discrete subgroups.

### Members

#### cellBoost :GroupElement

Source:

the "discrete" component of the isometry par of the boost

#### facing

Source:

Facing of the local part of the relative position

#### globalBoost

Source:

Return the global isometry (cellBoost * local boost) of the current position

#### globalPosition

Source:

Return a global position (with no cell boost) representing the current relative position

#### invCellBoost :GroupElement

Source:

the inverse of cellBoost

#### local :Position

Source:

the local position

#### localPoint :Point

Source:

The underlying local point (i.e. ignoring the cell boost)

#### point :Point

Source:

The underlying point (taking into account the cell boost)

#### set :TeleportationSet

Source:

the isometry component of the position inside the fundamental domain

### Methods

#### applyQuaternion(quaternion) → {RelPosition}

Source:

Rotate the facing by `m` (right action of O(3) in the set of positions).

##### Parameters:
Name Type Description
`quaternion` Quaternion

An isometry of the tangent space at the origin, i.e. a matrix in O(3).

##### Returns:

the updated version of the current Position

Type
RelPosition

#### clone() → {RelPosition}

Source:

Return a new copy of the current position.

##### Returns:

the clone of the current relative position

Type
RelPosition

#### copy(position) → {RelPosition}

Source:

Set the current position with the given position.

##### Parameters:
Name Type Description
`position` RelPosition

the relative position to copy

##### Returns:

the current relative position

Type
RelPosition

#### equals(position) → {boolean}

Source:

Check if the current position and `position ` are the same. Mainly for debugging purposes

##### Parameters:
Name Type Description
`position` RelPosition
##### Returns:

true if the relative positions are the same, false otherwise

Type
boolean

#### fakeDiffExpMap(matrix) → {RelPosition}

Source:

Fake version of the differential of the exponential map. We do not incorporate any teleportation here. (See Position for details)

##### Parameters:
Name Type Description
`matrix` Matrix4

an affine isometry of the tangent space at the origin

Type
RelPosition

#### flow(v) → {RelPosition}

Source:

Flow the current position. `v` is the pull back at the origin by the position of the direction in which we flow The time by which we flow is the norm of `v` This method makes sure that the boost stays in the fundamental domain

##### Parameters:
Name Type Description
`v` Vector

the direction (and length) to follow

##### Returns:

the current relative position

Type
RelPosition

#### reduceError() → {RelPosition}

Source:

Reduce the eventual numerical error of the current position.

##### Returns:

the current relative position

Type
RelPosition

#### reduceErrorBoost() → {RelPosition}

Source:

Reduce the eventual numerical error of the current boost.

##### Returns:

the current relative position

Type
RelPosition

#### reduceErrorFacing() → {RelPosition}

Source:
To Do:
• To be completed

Reduce the eventual numerical error of the current facing.

##### Returns:

the current relative position

Type
RelPosition

#### reduceErrorLocal() → {RelPosition}

Source:
To Do:
• To be completed

Reduce the eventual numerical error of the current facing.

##### Returns:

the current relative position

Type
RelPosition

#### reset() → {RelPosition}

Source:

Reset the position in its default position (boost = identity, quaternion = 1)

##### Returns:

The current position

Type
RelPosition

#### teleport() → {RelPosition}

Source:

Apply if needed a teleportation to bring back the local boos in the fundamental domain

##### Returns:

the current relative position

Type
RelPosition