aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/cell.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2012-08-31 16:20:21 +0200
committerThomas White <taw@physics.org>2012-10-02 15:02:12 +0200
commit4b3ffa51ec169406185a76016a29833bc9637264 (patch)
treebf40ef935ec0dda9da90e2f72e52413b56023af6 /libcrystfel/src/cell.c
parent60ec4009e4bc28ab9ed772ee6fcd8c80c533dccd (diff)
WIP on cell transformations
Diffstat (limited to 'libcrystfel/src/cell.c')
-rw-r--r--libcrystfel/src/cell.c54
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)
+{
+
+}