diff options
| author | Stan Seibert <stan@mtrr.org> | 2011-09-16 15:02:02 -0400 |
|---|---|---|
| committer | Stan Seibert <stan@mtrr.org> | 2011-09-16 15:02:02 -0400 |
| commit | 142b3c3caff164deb9bc7b2848e58e52387723ff (patch) | |
| tree | 417da3ad69a2756aff7a21dca4b08733d3e87afb /src/rotate.h | |
| parent | 084dfd08b714faefaea77cb7dc04d2e93dc04b1d (diff) | |
| download | chroma-142b3c3caff164deb9bc7b2848e58e52387723ff.tar.gz chroma-142b3c3caff164deb9bc7b2848e58e52387723ff.tar.bz2 chroma-142b3c3caff164deb9bc7b2848e58e52387723ff.zip | |
Move CUDA source inside chroma package, rename tests directory to test
Diffstat (limited to 'src/rotate.h')
| -rw-r--r-- | src/rotate.h | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/rotate.h b/src/rotate.h deleted file mode 100644 index 15f8037..0000000 --- a/src/rotate.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef __ROTATE_H__ -#define __ROTATE_H__ - -#include "linalg.h" -#include "matrix.h" - -__device__ const Matrix IDENTITY_MATRIX = {1,0,0,0,1,0,0,0,1}; - -__device__ Matrix -make_rotation_matrix(float phi, const float3 &n) -{ - float cos_phi = cosf(phi); - float sin_phi = sinf(phi); - - return IDENTITY_MATRIX*cos_phi + (1-cos_phi)*outer(n,n) + - sin_phi*make_matrix(0,n.z,-n.y,-n.z,0,n.x,n.y,-n.x,0); -} - -/* rotate points counterclockwise, when looking towards +infinity, - through an angle `phi` about the axis `n`. */ -__device__ float3 -rotate(const float3 &a, float phi, const float3 &n) -{ - return make_rotation_matrix(phi,n)*a; -} - -#endif |
