diff options
author | gfb21 <gfb21@bf6ca9ba-c028-0410-8290-897cf20841d1> | 2007-02-17 13:50:28 +0000 |
---|---|---|
committer | gfb21 <gfb21@bf6ca9ba-c028-0410-8290-897cf20841d1> | 2007-02-17 13:50:28 +0000 |
commit | e3bfcf077994c70aa965f9422d778bae5088f382 (patch) | |
tree | 0a9eef8179f9b3770bf5c1d3a7b096d623e0d715 /src/reflections.c | |
parent | 7144216342686b49e4f759c2fdd8de4946db8fdb (diff) |
Added reflection-caching support
git-svn-id: svn://cook.msm.cam.ac.uk:745/diff-tomo/dtr@8 bf6ca9ba-c028-0410-8290-897cf20841d1
Diffstat (limited to 'src/reflections.c')
-rw-r--r-- | src/reflections.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/reflections.c b/src/reflections.c index d2bc9db..65e88a6 100644 --- a/src/reflections.c +++ b/src/reflections.c @@ -57,7 +57,7 @@ void reflection_clear(ReflectionContext *reflectionctx) { void reflection_add(ReflectionContext *reflectionctx, double x, double y, double z, double intensity, ReflectionType type) { Reflection *new_reflection; - + //printf("Added reflection (%f,%f,%f)\n",x,y,z); new_reflection = malloc(sizeof(Reflection)); new_reflection->next = NULL; new_reflection->x = x; @@ -184,3 +184,9 @@ void reflection_add_from_reciprocal(ControlContext *ctx, double x, double y, dou reflection_add(ctx->reflectionctx, nx, ny, nz, intensity, REFLECTION_NORMAL); } + +void reflection_add_from_reflection(ReflectionContext *rctx, Reflection *r) { + r->next = NULL; + rctx->last_reflection->next = r; + rctx->last_reflection = r; +} |