summaryrefslogtreecommitdiff
path: root/src/modules/ray/ray.c
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@gnugeneration.com>2017-02-10 07:55:51 -0800
committerVito Caputo <vcaputo@gnugeneration.com>2017-02-10 08:18:11 -0800
commit35d8587b8e6b5a85fe0f978ff8cd5a899a8ff6a4 (patch)
tree9ec99df685acefa0df3530322bf7221c49227339 /src/modules/ray/ray.c
parenta4914d40fd9e25fa4c02af8d4c02d227064c1903 (diff)
ray: implement all orders in ray_euler_basis()
Originally I only implemented pitch->yaw->roll, and being new to all this didn't fully appreciate the limitation that resulted in. This adds all six permutations of pitch/yaw/roll, the scene must specify the desired order when setting up the camera with the euler angles, see the enum in ray_euler.h.
Diffstat (limited to 'src/modules/ray/ray.c')
-rw-r--r--src/modules/ray/ray.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/modules/ray/ray.c b/src/modules/ray/ray.c
index 60d08cf..951b1d7 100644
--- a/src/modules/ray/ray.c
+++ b/src/modules/ray/ray.c
@@ -90,6 +90,7 @@ static void ray(fb_fragment_t *fragment)
ray_camera_t camera = {
.position = { .x = 0.0, .y = 0.0, .z = 6.0 },
.orientation = {
+ .order = RAY_EULER_ORDER_YPR, /* yaw,pitch,roll */
.yaw = RAY_EULER_DEGREES(0.0f),
.pitch = RAY_EULER_DEGREES(0.0f),
.roll = RAY_EULER_DEGREES(180.0f),
© All Rights Reserved