@@ -14,13 +14,13 @@ localization and mapping).
14
14
15
15
The package provide two main pieces of functionality
16
16
17
- 1 . Primarily, an interface for defining ` AbstractTransformation ` s and applying
17
+ 1 . Primarily, an interface for defining ` Transformation ` s and applying
18
18
(` transform() ` ), inverting (` inv() ` ), composing (` ∘ ` or ` compose() ` ) and
19
19
differentiating (` transform_deriv() ` and ` transform_deriv_params() ` ) them.
20
20
21
21
2 . A small set of built-in, composable, primitive transformations for
22
- transforming 2D and 3D points (leveraging the * FixedSizeArrays* and
23
- * Rotations* packages).
22
+ transforming 2D and 3D points (optionally leveraging the * FixedSizeArrays*
23
+ and * Rotations* packages).
24
24
25
25
### Quick start
26
26
@@ -66,16 +66,11 @@ rotation angle:
66
66
67
67
### The interface
68
68
69
- Transformations are derived from ` AbstractTransformation{OutType, InType} ` .
70
- ` InType ` is a (possibly abstract or union) type describing which inputs
71
- ` transform() ` will accept with the given transformation, and ` OutType ` describes
72
- the (possible range of) outputs given. These parameters allow for a level of
73
- safety, so that transformations are only applied to appropriate data types and
74
- to catch early-on any problems with composing or chaining transformations.
75
-
76
- As an example, we have ` Translation{T} <: AbstractTransformation{FixedVector, FixedVector} ` .
77
- A translation will expect data in the ` FixedVector ` format and will always return
78
- the same base type as given (of course, type promotion may occur for the element type itself).
69
+ Transformations are derived from ` Transformation ` . As an example, we have
70
+ ` Translation{T} <: Transformation ` . A translation will accept points in a
71
+ variety of formats, such as ` Vector ` , ` FixedVector ` , ` Tuple ` , etc, and will try
72
+ to return the same type as given (of course, type promotion may occur for the
73
+ element type itself).
79
74
80
75
Transformations can be reversed using ` inv(trans) ` . They can be chained
81
76
together using the ` ∘ ` operator (` trans1 ∘ trans2 ` ) or ` compose ` function (` compose(trans1, trans2) ` ).
@@ -97,22 +92,22 @@ techniques, and can be parameterized by *DualNumbers*' `DualNumber` or *ForwardD
97
92
### Built-in transformations
98
93
99
94
A small number of 2D and 3D coordinate systems and transformations are included.
100
- We also have ` IdentityTransform{InOutType} ` and ` ComposedTransformation{InType,OutType} ` ,
101
- which allows us to nest together arbitrary transformations to create a
102
- complex yet efficient transformation chain.
95
+ We also have ` IdentityTransform ` and ` ComposedTransformation ` , which allows us
96
+ to nest together arbitrary transformations to create a complex yet efficient
97
+ transformation chain.
103
98
104
99
#### Coordinate types
105
100
106
- The canonical Cartesian coordinate data types are any type which inherited from
107
- * FixedSizeArrays* ' ` FixedVector{2} ` and ` FixedVector{3} ` in 2D and 3D,
108
- respectively. The concrete datatypes ` Point ` and ` Vec ` are provided by
109
- * FixedSizeArrays* , and here we tend to favor ` Point ` for output where it is not
110
- specified. (Of course, users may define their own transformations and types, as
111
- they wish).
112
-
113
- The ` Polar(r, θ) ` type is a 2D polar representation of a point, and similarly
114
- in 3D we have defined ` Spherical(r, θ, ϕ) ` and ` Cylindrical(r, θ, z) ` .
101
+ The package does not assume any specific coordinate types for Cartesian
102
+ coordinates, and aims to accept any indexable container (such as ` Vector ` ,
103
+ ` Tuple ` , * FixedSizeArrays* ' ` FixedSizeVector{N} ` or any other duck-typed vector).
104
+ For speed, we recommend using a statically-sized container such as ` Point{N} ` or
105
+ ` Vec{N} ` from * FixedSizeArrays* , or even an ` NTuple{N} ` . However, it is
106
+ attempted that the package will not change your data type.
115
107
108
+ We do provide a few specialist coordinate types. The ` Polar(r, θ) ` type is a 2D
109
+ polar representation of a point, and similarly in 3D we have defined
110
+ ` Spherical(r, θ, ϕ) ` and ` Cylindrical(r, θ, z) ` .
116
111
117
112
#### Coordinate system transformations
118
113
0 commit comments