From 4b3ffa51ec169406185a76016a29833bc9637264 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 31 Aug 2012 16:20:21 +0200 Subject: WIP on cell transformations --- libcrystfel/src/cell.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) (limited to 'libcrystfel/src/cell.c') 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) +{ + +} -- cgit v1.2.3