summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-11-14 21:20:43 -0500
committerTavian Barnes <tavianator@gmail.com>2010-11-14 21:20:43 -0500
commit8fe33a340b8979a73fa84f201c15519a9b5d0266 (patch)
tree12cdbb1c1b9a48f533ab36980602785be1e1deeb /tests
parent20a55aa78050d94b187d4edfaac91ea00efea505 (diff)
downloaddimension-8fe33a340b8979a73fa84f201c15519a9b5d0266.tar.xz
Document libdimension with Doxygen.
Diffstat (limited to 'tests')
-rw-r--r--tests/libdimension/render.c8
-rw-r--r--tests/libdimension/tests.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/libdimension/render.c b/tests/libdimension/render.c
index 1de9fba..440333c 100644
--- a/tests/libdimension/render.c
+++ b/tests/libdimension/render.c
@@ -45,7 +45,7 @@ dmnsn_new_test_scene(void)
/* Set up the transformation matrix for the perspective camera */
dmnsn_matrix trans = dmnsn_scale_matrix(
dmnsn_new_vector(
- ((double)scene->canvas->x)/scene->canvas->y, 1.0, 1.0
+ ((double)scene->canvas->width)/scene->canvas->height, 1.0, 1.0
)
);
trans = dmnsn_matrix_mul(
@@ -63,7 +63,7 @@ dmnsn_new_test_scene(void)
/* Create a perspective camera */
scene->camera = dmnsn_new_perspective_camera();
- dmnsn_set_perspective_camera_trans(scene->camera, trans);
+ scene->camera->trans = trans;
/* Background color */
scene->background = dmnsn_color_from_sRGB((dmnsn_sRGB){ 0.0, 0.1, 0.2 });
@@ -106,11 +106,11 @@ dmnsn_new_test_scene(void)
dmnsn_array *arrow_array = dmnsn_new_array(sizeof(dmnsn_object *));
- dmnsn_object *cylinder = dmnsn_new_cylinder(0.1, 0.1, false);
+ dmnsn_object *cylinder = dmnsn_new_cone(0.1, 0.1, false);
cylinder->trans = dmnsn_scale_matrix(dmnsn_new_vector(1.0, 1.25, 1.0));
dmnsn_array_push(arrow_array, &cylinder);
- dmnsn_object *cone = dmnsn_new_cylinder(0.1, 0.0, true);
+ dmnsn_object *cone = dmnsn_new_cone(0.1, 0.0, true);
cone->trans =
dmnsn_matrix_mul(
dmnsn_translation_matrix(dmnsn_new_vector(0.0, 1.375, 0.0)),
diff --git a/tests/libdimension/tests.c b/tests/libdimension/tests.c
index 9d1d38c..e2e0d18 100644
--- a/tests/libdimension/tests.c
+++ b/tests/libdimension/tests.c
@@ -86,7 +86,7 @@ dmnsn_new_display(const dmnsn_canvas *canvas)
swa.event_mask = StructureNotifyMask;
display->win = XCreateWindow(display->dpy,
RootWindow(display->dpy, display->vi->screen),
- 0, 0, canvas->x, canvas->y,
+ 0, 0, canvas->width, canvas->height,
0, display->vi->depth, InputOutput,
display->vi->visual,
CWBorderPixel|CWColormap|CWEventMask, &swa);