summaryrefslogtreecommitdiffstats
path: root/libdimension/bench
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-09-14 18:56:08 -0400
committerTavian Barnes <tavianator@gmail.com>2011-09-14 19:03:07 -0400
commit1374b946398544a28ac989c75570d4b7c6937873 (patch)
treed3f05e23b5c39201292bfaddaca23220de6652f7 /libdimension/bench
parent4bfa19e5a0b426ea6ec99dfebaeb35e507136b74 (diff)
downloaddimension-1374b946398544a28ac989c75570d4b7c6937873.tar.xz
Transform normals as pseudovectors, not vectors.
Also clarify the vector transformation API. Instead of dmnsn_transform_vector(), we have: - dmnsn_transform_point() - dmnsn_transform_direction() - dmnsn_transform_normal()
Diffstat (limited to 'libdimension/bench')
-rw-r--r--libdimension/bench/geometry.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/libdimension/bench/geometry.c b/libdimension/bench/geometry.c
index a952631..4b8c12a 100644
--- a/libdimension/bench/geometry.c
+++ b/libdimension/bench/geometry.c
@@ -1,5 +1,5 @@
/*************************************************************************
- * Copyright (C) 2009-2010 Tavian Barnes <tavianator@tavianator.com> *
+ * Copyright (C) 2009-2011 Tavian Barnes <tavianator@tavianator.com> *
* *
* This file is part of The Dimension Benchmark Suite. *
* *
@@ -149,11 +149,23 @@ main(void)
});
printf("dmnsn_matrix_mul(): %ld\n", sandglass.grains);
- /* dmnsn_transform_vector() */
+ /* dmnsn_transform_point() */
sandglass_bench_fine(&sandglass, {
- vector = dmnsn_transform_vector(matrix, vector);
+ vector = dmnsn_transform_point(matrix, vector);
});
- printf("dmnsn_transform_vector(): %ld\n", sandglass.grains);
+ printf("dmnsn_transform_point(): %ld\n", sandglass.grains);
+
+ /* dmnsn_transform_direction() */
+ sandglass_bench_fine(&sandglass, {
+ vector = dmnsn_transform_direction(matrix, vector);
+ });
+ printf("dmnsn_transform_direction(): %ld\n", sandglass.grains);
+
+ /* dmnsn_transform_normal() */
+ sandglass_bench_fine(&sandglass, {
+ vector = dmnsn_transform_normal(matrix, vector);
+ });
+ printf("dmnsn_transform_normal(): %ld\n", sandglass.grains);
/* dmnsn_transform_line() */
sandglass_bench_fine(&sandglass, {