diff options
author | Thomas White <taw@physics.org> | 2012-08-31 16:20:21 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-10-02 15:02:12 +0200 |
commit | 4b3ffa51ec169406185a76016a29833bc9637264 (patch) | |
tree | bf40ef935ec0dda9da90e2f72e52413b56023af6 /libcrystfel/src/cell.c | |
parent | 60ec4009e4bc28ab9ed772ee6fcd8c80c533dccd (diff) |
WIP on cell transformations
Diffstat (limited to 'libcrystfel/src/cell.c')
-rw-r--r-- | libcrystfel/src/cell.c | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/libcrystfel/src/cell.c b/libcrystfel/src/cell.c index 37e201e3..e2617dfc 100644 --- a/libcrystfel/src/cell.c +++ b/libcrystfel/src/cell.c @@ -599,3 +599,57 @@ const char *cell_rep(UnitCell *cell) return "unknown"; } + + +static UnitCellTransformation *inverse_transformation(UnitCellTransformation *t) +{ + /* FIXME: Implementation */ + return NULL; +} + + +/** + * cell_transform: + * @cell: A %UnitCell. + * @t: A %UnitCellTransformation. + * + * Applies @t to @cell. + * + * Returns: Transformed copy of @cell. + * + */ +UnitCell *cell_transform(UnitCell *cell, UnitCellTransformation *t) +{ + UnitCell *out; + + if ( t == NULL ) return NULL; + + out = cell_new(); + if ( out == NULL ) return NULL; + + /* FIXME: Implementation */ + + return out; +} + + +/** + * cell_transform: + * @cell: A %UnitCell. + * @t: A %UnitCellTransformation. + * + * Applies the inverse of @t to @cell. + * + * Returns: Transformed copy of @cell. + * + */ +UnitCell *cell_transform_inverse(UnitCell *cell, UnitCellTransformation *t) +{ + return cell_transform(cell, inverse_transformation(t)); +} + + +void cell_transformation_print(UnitCellTransformation *t) +{ + +} |