PointPair
Kind: global class
Brief: couple of points
Details: PointPair
class represents a pair of point, the observer and the mobile.
Construct a point pair by giving position of the observer and the mobile as Vector3
.
-
Perform geometrical transformation on the segment joining the two points.
-
Manipulate relative coordinates of the mobile.
Author: samiBendou
Properties
Name | Type | Description |
---|---|---|
vector | Vector3 |
absolute coordinates of the mobile |
origin | Vector3 |
absolute coordinates the observer |
relative | Vector3 |
relative coordinates of the mobile |
length | number |
length distance between the mobile and the observer |
-
PointPair
- instance
- static
pointPair.translate(vector) ⇒ PointPair
Kind: instance method of PointPair
Returns: PointPair
- reference to this
Brief: translation a point pair
Param | Type | Description |
---|---|---|
vector | Vector3 |
translation vector |
pointPair.homothetic(scalar) ⇒ PointPair
Kind: instance method of PointPair
Returns: PointPair
- reference to this
Brief: homothetic transformation of a point pair
Details: Scalar multiplication of the of the two points by the ratio.
Param | Type | Description |
---|---|---|
scalar | number |
ratio of transformation |
pointPair.transform(matrix) ⇒ PointPair
Kind: instance method of PointPair
Returns: PointPair
- reference to this
Brief: matrix transformation of the point pair
Param | Type | Description |
---|---|---|
matrix | Matrix3 |
transformation matrix |
pointPair.affine(matrix, vector) ⇒ PointPair
Kind: instance method of PointPair
Returns: PointPair
- reference to this
Brief: affine transformation of the point pair
Param | Type | Description |
---|---|---|
matrix | Matrix3 |
transformation matrix |
vector | Vector3 |
translation vector |
Kind: instance method of PointPair
Returns: boolean
- true
if the point pairs are equal
Brief: equality between two point pairs
Details: Verifies if relatives position of mobile are equal.
Param | Type | Description |
---|---|---|
om | PointPair |
other point pair |
PointPair.zeros(u) ⇒ PointPair
Kind: static method of PointPair
Returns: PointPair
- new instance of point pair
Brief: point pair of length 0
Details: The observer can be located everywhere.
Param | Type | Description |
---|---|---|
u | Vector3 |
absolution position of both the observer and mobile |
PointPair.vect(u) ⇒ PointPair
Kind: static method of PointPair
Returns: PointPair
- new instance of point pair
Brief: point pair by providing mobile's position only
Details: Observer's position is set to zero.
Param | Type | Description |
---|---|---|
u | Vector3 |
absolute position of the mobile |
Copyright © 2019 Sami Dahoux Github, All Rights Reserved